git: c62eaf8af905 - main - stand: Update riscv efi booting to edk2 includes
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 17 Nov 2025 06:01:13 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=c62eaf8af9054b9f370bdd396cae411848bc617b
commit c62eaf8af9054b9f370bdd396cae411848bc617b
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-11-17 05:09:34 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-11-17 05:58:03 +0000
stand: Update riscv efi booting to edk2 includes
Update to include the right includes for the riscv protocol to get the
hypervisor details.
Note: I expanded the GUID inline rather than using a #define because
there was none. This is only listed in UefiCpuPkg/UefiCpuPkg.dec, so
include it here inline until we can automate using those files.
Fixes: 43b8edb32051
Sponsored by: Netflix
---
stand/efi/loader/arch/riscv/exec.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/stand/efi/loader/arch/riscv/exec.c b/stand/efi/loader/arch/riscv/exec.c
index a53fbd9442b0..8d1a0bd03de0 100644
--- a/stand/efi/loader/arch/riscv/exec.c
+++ b/stand/efi/loader/arch/riscv/exec.c
@@ -41,10 +41,14 @@
#include "bootstrap.h"
#include "loader_efi.h"
+#include <Uefi.h>
+#include <Protocol/RiscVBootProtocol.h>
+
static void
riscv_set_boot_hart(struct preloaded_file *fp)
{
- EFI_GUID riscvboot = RISCV_EFI_BOOT_PROTOCOL_GUID;
+ // No #define in EDK2 for this
+ EFI_GUID riscvboot = { 0xccd15fec, 0x6f73, 0x4eec, { 0x83, 0x95, 0x3e, 0x69, 0xe4, 0xb9, 0x40, 0xbf }};
RISCV_EFI_BOOT_PROTOCOL *proto;
EFI_STATUS status = 0;
uint64_t boot_hartid = ULONG_MAX;