XTLDR Rewrite #7
@ -11,7 +11,20 @@
|
||||
|
||||
/* Dummy module information */
|
||||
XTBL_MODINFO = L"Dummy XTLDR module";
|
||||
XTBL_MODDEPS = {L"dummy2"};
|
||||
// XTBL_MODDEPS = {L"dummy2"};
|
||||
|
||||
/* XTLDR protocol handler */
|
||||
PXTBL_LOADER_PROTOCOL XtLdrProto;
|
||||
|
||||
/* Dummy Boot Protocol handler */
|
||||
XTBL_BOOT_PROTOCOL DummyProtocol;
|
||||
|
||||
XTCDECL
|
||||
EFI_STATUS
|
||||
BootDummyOS(IN PXTBL_BOOT_PARAMETERS Parameters)
|
||||
{
|
||||
return STATUS_EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine is the entry point of the XT EFI boot loader module.
|
||||
@ -31,5 +44,25 @@ EFI_STATUS
|
||||
XtLdrModuleMain(IN EFI_HANDLE ImageHandle,
|
||||
IN PEFI_SYSTEM_TABLE SystemTable)
|
||||
{
|
||||
return STATUS_EFI_SUCCESS;
|
||||
EFI_GUID DummyGuid = XT_XTOS_BOOT_PROTOCOL_GUID;
|
||||
EFI_HANDLE Handle = NULL;
|
||||
EFI_STATUS Status;
|
||||
|
||||
/* Open the XTLDR protocol */
|
||||
Status = BlGetXtLdrProtocol(SystemTable, ImageHandle, &XtLdrProto);
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to open the protocol, return error */
|
||||
return STATUS_EFI_LOAD_ERROR;
|
||||
}
|
||||
|
||||
/* Set boot protocol routines */
|
||||
DummyProtocol.BootSystem = BootDummyOS;
|
||||
|
||||
/* Register XTOS boot protocol */
|
||||
XtLdrProto->Boot.RegisterProtocol(L"XTOS", &DummyGuid);
|
||||
|
||||
/* Register DUMMY protocol as XTOS boot protocol */
|
||||
return SystemTable->BootServices->InstallProtocolInterface(&Handle, &DummyGuid, EFI_NATIVE_INTERFACE,
|
||||
&DummyProtocol);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user