From 9bf419b4e0516ac23c3e49af0a10cb79ac1fd063 Mon Sep 17 00:00:00 2001 From: "Ian M." Date: Fri, 11 Sep 2026 05:40:51 +0000 Subject: core: Get platform memory map and exit boot services Signed-off-by: Ian M. --- core/sboot.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'core/sboot.c') diff --git a/core/sboot.c b/core/sboot.c index 604c768..53366a0 100644 --- a/core/sboot.c +++ b/core/sboot.c @@ -7,11 +7,13 @@ #include #include #include +#include #include #include /* Private globals */ static UINT8 *KernelBin = NULL; +static PLATFORM_MEMMAP MemMap; /* Globals */ EFI_FILE_HANDLE gBootVolume; @@ -50,5 +52,22 @@ efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) Hcf(); } + Status = SBootGetMemmap(&MemMap); + if (EFI_ERROR(Status)) { + Hcf(); + } + + /* Get out of here! */ + Status = uefi_call_wrapper( + gBS->ExitBootServices, + 2, + ImageHandle, + MemMap.MapKey + ); + + if (EFI_ERROR(Status)) { + Hcf(); + } + for (;;); } -- cgit v1.2.3