Skip to content

Add support for CONFIG_API on RISC-V

Heinrich Schuchardt u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 7 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 7 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] Add support for CONFIG_API on RISC-V
Quoted 29 lines · Tom Rini
Quoted 23 lines · Mitchell Horne
Quoted 5 lines · Tom Rini
Quoted 2 lines · mhorne at FreeBSD.org

From: Mitchell Horne <[email protected]>

Quoted 9 lines
Quoted 4 lines

FreeBSD makes use of u-boot's CONFIG_API to provide a version of its standard bootloader for embedded architectures. This series adds the necessary support for the RISC-V architecture, along with some small fixes to the API demo program for 64-bit systems.

Adding in the RISC-V maintainer and EFI maintainer. I thought the intention was for OSes to use the EFI loader here, even for "embedded" ? Thanks!

Hi Tom,

You are right, EFI is preferred. FreeBSD's loader has two implementations on arm: one that is an EFI application, and one based on this u-boot API (known as "ubldr"). ubldr precedes the EFI implementation by a few years.

Quoted 4 lines

For RISC-V my intention is also to implement both versions, and ubldr was simpler on FreeBSD's side, so I chose to do that first. Do you think this series is still worth pursuing if u-boot is going the way of EFI?

Quoted 8 lines

In my mind at least, the EFI interface is preferred as it's a defined external standard interface. If the architecture maintainers want to support both the U-Boot API and EFI on RISC-V, I don't object. But one of the intentions is to have there be less work for OS folks to have to do for example. So that you found this a good first step for your use case means perhaps we need to continue to have the U-Boot API method be around (not that we had planned any sort of removal). Thanks!

Hello Mitchell,

let me just give me an overview of where we currently are with UEFI support for RISC-V:

U-Boot supports UEFI to the point that we can start GRUB as EFI binary.

In Linux the UEFI support for RISC-V is being set up, cf.
https://lkml.org/lkml/2020/4/20/1800

In EDK2 RISC-V support is under active development
(https://edk2.groups.io/g/devel/search?q=RISC-V). In EDK2's staging repository (https://github.com/tianocore/edk2-staging.git) you can find a branch RISC-V-V2-CI-log-all-archs.

One challenge is the transfer of the HART id which is used for booting. In U-Boot this has been addressed by the patch 5370478d1c7a ("riscv: Add boot hartid to device tree").

@Atish:
Is there a corresponding patch for EDK2?

Best regards

Heinrich