Update dummy module
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 27s
Builds / ExectOS (i686) (push) Successful in 27s

This commit is contained in:
Rafal Kupiec 2024-01-01 16:28:29 +01:00
parent 89caaa977e
commit 35f36adfa6
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4

View File

@ -11,7 +11,20 @@
/* Dummy module information */ /* Dummy module information */
XTBL_MODINFO = L"Dummy XTLDR module"; 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. * This routine is the entry point of the XT EFI boot loader module.
@ -31,5 +44,25 @@ EFI_STATUS
XtLdrModuleMain(IN EFI_HANDLE ImageHandle, XtLdrModuleMain(IN EFI_HANDLE ImageHandle,
IN PEFI_SYSTEM_TABLE SystemTable) 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);
} }