HiFive Premier P550
The HiFive Premier P550 is a RISC-V development platform from SiFive based on the ESWIN EIC7700X SoC. It is a quad-core SoC using the SiFive P550 CPU.
Platform | HiFive Premier P550 |
Architecture | RV64GC |
System-on-chip | ESWIN EIC7700X |
CPU | P550 |
seL4 virtualisation support | – |
seL4 SMMU support | – |
Verification status | Unverified |
seL4 CMake platform name | hifive-p550 |
Contributed by | Community |
Maintained by | seL4 Foundation |
Details and links to manuals can be found on the SiFive product page.
The SoC technical reference manual can be found on GitHub.
The HiFive P550 arrives with the following boot process from the SPI flash:
- Firmware starts
- OpenSBI starts
- U-Boot proper starts
From U-Boot proper you can then load and start an seL4 image, see below for details.
Building the GCC toolchain
It is recommended to build the toolchain from source.
git clone https://github.com/riscv/riscv-gnu-toolchain.git
cd riscv-gnu-toolchain
git submodule update --init --recursive
export RISCV=/opt/riscv
./configure --prefix="${RISCV}" --enable-multilib
make linux
After it is built, add the $RISCV/bin
folder to your PATH. The built
toolchain works for both 32-bit and 64-bit.
Alternatively, any pre-built toolchain with multilib
enabled should work.
Building seL4test
Checkout the sel4test project using repo as per seL4Test
repo init -u https://github.com/seL4/sel4test-manifest.git
repo sync
mkdir cbuild
cd cbuild
../init-build.sh -DPLATFORM=hifive-p550 -DRISCV64=1
# The default cmake wrapper sets up a default configuration for the target platform.
# To change individual settings, run `ccmake .` and change the configuration
# parameters to suit your needs.
ninja
Generated binaries can be found in the images/
directory.
Booting
There are multiple ways to boot from U-Boot, documented below is booting via TFTP and from a microSD card.
Obtaining the DTB
Since we are using a uImage
for the HiFive P550, U-Boot requires a Device Tree Blob (DTB) alongside
the binary image to boot.
The Device Tree Source (DTS) can be compiled from the seL4 tree with the Device Tree Compiler (dtc
):
dtc -I dts -O dtb seL4/tools/dts/hifive-p550.dts > hifive_p550.dtb
Booting via microSD card
These instructions expect the microSD card to be paritioned with FAT.
The microSD card slot registers as device 1
in U-Boot so to see if the device
is recognised run:
mmc dev 1
# Check that the card info is expected
mmc info
# List partitions
mmc part
To load and run the image:
fatload mmc 1:<PARTITION> 0x90000000 sel4test-driver-image-riscv-hifive-p550
fatload mmc 1:<PARTITION> 0xa0000000 hifive_p550.dtb
bootm 0x90000000 - 0xa0000000
Booting via TFTP
If you have setup a TFTP server, enter the following commands on the U-Boot console to load an image via the network.
dhcp
tftpboot 0x90000000 <YOUR_TFTP_SERVER_IP_ADDRESS>:sel4test-driver-image-riscv-hifive-p550
tftpboot 0x90000000 <YOUR_TFTP_SERVER_IP_ADDRESS>:hifive_p550.dtb
bootm 0x90000000 - 0xa0000000