Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ The currently supported boards are:

* ariane
* cheshire
* hifive_p550
* imx8mm_evk
* imx8mp_evk
* imx8mq_evk
Expand Down
12 changes: 12 additions & 0 deletions build_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,18 @@ class ConfigInfo:
"KernelAllowSMCCalls": True,
},
),
BoardInfo(
name="hifive_p550",
arch=KernelArch.RISCV64,
gcc_cpu=None,
loader_link_address=0x90000000,
kernel_options={
"KernelIsMCS": True,
"KernelPlatform": "hifive-p550",
"KernelRiscvExtD": True,
"KernelRiscvExtF": True,
},
),
BoardInfo(
name="star64",
arch=KernelArch.RISCV64,
Expand Down
26 changes: 26 additions & 0 deletions docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,32 @@ Microkit produces a raw binary file, so when using U-Boot you must execute the i

=> go 0x20000000

## SiFive Premier P550

The SiFive Premier P550 is a development board based on the ESWIN EIC7700X system-on-chip.

Right now Microkit will always produce raw binary file, however when using U-Boot on the
P550 it is recommended to instead convert the image to the `uImage` format.

This can be done with the `mkimage` tool:
```sh
mkimage -A riscv -O linux -T kernel -C none -a 0x90000000 -e 0x90000000 -d loader.img loader.uimg
```

To load the image you will need to use the `bootm` command. `bootm` expects an address of where
the Device Tree Blob (DTB) will be as well as the image.

If you do not have a DTB for the P550 you can get it from the seL4 source code with:
```sh
dtc -I dts -O dtb seL4/tools/dts/hifive-p550.dts > hifive_p550.dtb
```

Now you can load the images into U-Boot at the appropriate addresses, for example via TFTP:

=> tftpboot 0x90000000 /path/to/loader.uimg
=> tftpboot 0x90000000 /path/to/hifive_p550.dtb
=> bootm 0x90000000 - 0xa0000000

## QEMU virt (AArch64)

Support is available for the virtual AArch64 QEMU platform. This is a platform that is not based
Expand Down
2 changes: 1 addition & 1 deletion loader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ifeq ($(ARCH),aarch64)
ARCH_DIR := aarch64
else ifeq ($(ARCH),riscv64)
CFLAGS_RISCV64 := -mcmodel=medany -march=rv64imac_zicsr_zifencei -mabi=lp64
CFLAGS_ARCH := $(CFLAGS_RISCV64) -DARCH_riscv64
CFLAGS_ARCH := $(CFLAGS_RISCV64) -DARCH_riscv64 -DFIRST_HART_ID=$(FIRST_HART_ID)
ASM_FLAGS_ARCH := -march=rv64imac_zicsr_zifencei -mabi=lp64 -DFIRST_HART_ID=$(FIRST_HART_ID)
ARCH_DIR := riscv
endif
Expand Down
6 changes: 6 additions & 0 deletions loader/src/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,12 @@ int main(void)
goto fail;
}

#ifdef ARCH_riscv64
puts("LDR|INFO: configured with FIRST_HART_ID ");
puthex32(FIRST_HART_ID);
puts("\n");
#endif

print_loader_data();

/* past here we have trashed u-boot so any errors should go to the
Expand Down
Loading