27 lines
638 B
C
27 lines
638 B
C
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
// Copyright (c) 2026 0xKSor
|
|
|
|
#include "uefi.h"
|
|
|
|
efi_handle_t IM = NULL;
|
|
efi_system_table_t* ST = NULL;
|
|
efi_boot_services_t* BS = NULL;
|
|
efi_runtime_services_t* RT = NULL;
|
|
|
|
efi_status_t bootloader_main(void);
|
|
|
|
void __chkstk(void) {}
|
|
|
|
efi_status_t EFIAPI efi_main(efi_handle_t image, efi_system_table_t* system_table) {
|
|
if (image == NULL || system_table == NULL || system_table->BootServices == NULL) {
|
|
return EFI_UNSUPPORTED;
|
|
}
|
|
|
|
IM = image;
|
|
ST = system_table;
|
|
BS = system_table->BootServices;
|
|
RT = system_table->RuntimeServices;
|
|
|
|
return bootloader_main();
|
|
}
|