diff options
Diffstat (limited to 'core/sboot.c')
| -rw-r--r-- | core/sboot.c | 19 |
1 files changed, 19 insertions, 0 deletions
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 <efilib.h> #include <sboot/sboot.h> #include <sboot/config.h> +#include <sboot/memmap.h> #include <sboot/fwi.h> #include <sboot/file.h> /* 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 (;;); } |
