ganboing
(Bo Gan)
February 2, 2026, 10:16pm
8
You are really hacking deep! Basically you can’t change OpenSBI on the fly when the 64-bit cores (MCPU) has already started opensbi/u-boot, so no, you can’t do it in u-boot. However, good news is that you can do it with UART boot. See my instructions here:
## HiFive P550 UART Boot Guide
Some background regarding P550 bootflow. For P550, it's a 1 DIE configuration (EIC7702 is 2 DIE).
Thus, the stock stable bootchain (w/o secure boot) comes only with 3 parts:
- Secondary Boot aka. "FIRMWARE": A tiny blob right after firmware to do basic initialization, such as PLL clock.
- DDR Init aka. "DDR": Blob for initializing DDR memory. Ver. 1.3 is the smallest blob with size ~270KB.
- U-Boot/OpenSBI payload aka. "BOOTLOADER": The actual bootloader.
These parts are packaged in a container image (bootchain) with ESWIN custom format that's similar to tar/cpio.
The program `nsign` is used to generate such container image. For each component in the image, there's
also metadata to describe its type FIRMWARE/DDR/BOOTLOADER, the load and entry point address, and the
CPU (SCPU or MCPU) that's responsible for running it. In regular boot configuration, such image is
flashed to boot SPI, and DIP switches are set to `[0 0 1 0]`. After power-on, the SCPU (32bit) starts
executing Masked ROM, where there's logic to check DIP switch states and parse, then load the blobs
from the bootchain and invoke them in a pre-defined order: FIRMWARE->DDR->BOOTLOADER
For bootloader developers, such as OpenSBI/U-Boot or EDK2, it might be helpful to a. replace the "BOOTLOADER"
at will, and b. start JTAG debugging as early as possible. EIC7700(X)/P550 has the ability to boot from UART.
In UART boot mode, the bootchain image is read from UART, bypassing boot SPI. Hence, there's zero possibility
This file has been truncated. show original
I used it to be able to iterate quickly. That’s how I managed to code up the support for EIC7700 in upstream OpenSBI. It allows me to boot a new OpenSBI/u-boot build without flash in 1 minute, which is pretty fast actually.
1 Like