]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
RISC-V boot1.efi and loader.efi support
authormhorne <mhorne@FreeBSD.org>
Mon, 6 Jul 2020 18:19:42 +0000 (18:19 +0000)
committermhorne <mhorne@FreeBSD.org>
Mon, 6 Jul 2020 18:19:42 +0000 (18:19 +0000)
commit4886ed8d88b5001f856de4cf09f2c677f31f808a
tree872aee6744b0815666d03ac69d53e2401d769874
parent4ae65669e3f01ce42303e188edf8e2e325178b2a
RISC-V boot1.efi and loader.efi support

This implementation doesn't have any major deviations from the other EFI
ports. I've copied the boilerplate from arm and arm64.

I've tested this with the following boot flows:
OpenSBI (M-mode) -> u-boot (S-mode) -> loader.efi -> FreeBSD
OpenSBI (M-mode) -> u-boot (S-mode) -> boot1.efi -> loader.efi -> FreeBSD

Due to the way that u-boot handles secondary CPUs, OpenSBI >= v0.7 is required,
as the HSM extension is needed to bring them up explicitly. Because of this,
using BBL as the SBI implementation will not be possible. Additionally, there
are a few recent u-boot changes that are required as well, all of which will be
present in the upcoming v2020.07 release.

Looks good: emaste
Differential Revision: https://reviews.freebsd.org/D25135
13 files changed:
share/mk/src.opts.mk
stand/common/self_reloc.c
stand/defs.mk
stand/efi/include/riscv/efibind.h [new file with mode: 0644]
stand/efi/libefi/Makefile
stand/efi/loader/arch/riscv/Makefile.inc [new file with mode: 0644]
stand/efi/loader/arch/riscv/exec.c [new file with mode: 0644]
stand/efi/loader/arch/riscv/ldscript.riscv [new file with mode: 0644]
stand/efi/loader/arch/riscv/start.S [new file with mode: 0644]
stand/efi/loader/copy.c
stand/efi/loader/main.c
stand/loader.mk
sys/riscv/include/metadata.h