Refactor code and fix loader protocol support

这个提交包含在:
2022-10-12 23:09:19 +02:00
父节点 09e58d0b67
当前提交 3fa2ec90aa
共有 4 个文件被更改,包括 17 次插入29 次删除

查看文件

@@ -12,6 +12,9 @@
/* EFI Image Handle */
EFI_HANDLE EfiImageHandle;
/* XT Boot Loader protocol */
XT_BOOT_LOADER_PROTOCOL EfiLdrProtocol;
/* EFI System Table */
PEFI_SYSTEM_TABLE EfiSystemTable;
@@ -254,16 +257,15 @@ EFI_STATUS
BlRegisterXtLoaderProtocol()
{
EFI_GUID Guid = XT_BOOT_LOADER_PROTOCOL_GUID;
XT_BOOT_LOADER_PROTOCOL LoaderProtocol;
EFI_HANDLE Handle;
EFI_HANDLE Handle = NULL;
/* Set all routines available via loader protocol */
LoaderProtocol.DbgPrint = BlDbgPrint;
LoaderProtocol.EfiPrint = BlEfiPrint;
EfiLdrProtocol.DbgPrint = BlDbgPrint;
EfiLdrProtocol.EfiPrint = BlEfiPrint;
/* Register loader protocol */
BlDbgPrint(L"Registering XT loader protocol\n");
return EfiSystemTable->BootServices->InstallProtocolInterface(&Handle, &Guid, EFI_NATIVE_INTERFACE, &LoaderProtocol);
return EfiSystemTable->BootServices->InstallProtocolInterface(&Handle, &Guid, EFI_NATIVE_INTERFACE, &EfiLdrProtocol);
}
/**