summaryrefslogtreecommitdiff
path: root/core/sboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/sboot.c')
-rw-r--r--core/sboot.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/sboot.c b/core/sboot.c
index 1a3d7d1..5511ca4 100644
--- a/core/sboot.c
+++ b/core/sboot.c
@@ -8,12 +8,16 @@
#include <sboot/sboot.h>
#include <sboot/config.h>
#include <sboot/fwi.h>
+#include <sboot/file.h>
+
+EFI_FILE_HANDLE gBootVolume;
EFI_STATUS
EFIAPI
efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
{
BOOT_ENTRY Entry;
+ EFI_STATUS Status;
InitializeLib(ImageHandle, SystemTable);
@@ -25,6 +29,11 @@ efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
NULL
);
+ Status = FileGetVolume(ImageHandle, &gBootVolume);
+ if (EFI_ERROR(Status)) {
+ Hcf();
+ }
+
Print(
L"SBOOT %s - %d boot entrie(s)\n",
SBOOT_VERSION,