entry/uefi: Abort if loaded above 4GiB. Fix #206
This commit is contained in:
parent
a89b843673
commit
ed0c32f20a
@ -26,6 +26,8 @@
|
||||
void stage3_common(void);
|
||||
|
||||
#if uefi == 1
|
||||
extern symbol __image_base;
|
||||
|
||||
noreturn void uefi_entry(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) {
|
||||
gST = SystemTable;
|
||||
gBS = SystemTable->BootServices;
|
||||
@ -49,6 +51,10 @@ noreturn void uefi_entry(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
|
||||
init_gdt();
|
||||
#endif
|
||||
|
||||
if ((uintptr_t)__image_base > 0x100000000) {
|
||||
panic(false, "Limine does not support being loaded above 4GiB");
|
||||
}
|
||||
|
||||
disk_create_index();
|
||||
|
||||
boot_volume = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user