69 lines
1.8 KiB
C
69 lines
1.8 KiB
C
/**
|
|
* PROJECT: ExectOS
|
|
* COPYRIGHT: See COPYING.md in the top level directory
|
|
* FILE: xtldr/modules/dummy/dummy.c
|
|
* DESCRIPTION: Dummy XTLDR module
|
|
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
|
|
*/
|
|
|
|
#include <xtblapi.h>
|
|
|
|
|
|
/* Dummy module information */
|
|
XTBL_MODINFO = L"Dummy XTLDR module";
|
|
// 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.
|
|
*
|
|
* @param ImageHandle
|
|
* Firmware-allocated handle that identifies the image.
|
|
*
|
|
* @param SystemTable
|
|
* Provides the EFI system table.
|
|
*
|
|
* @return This routine returns status code.
|
|
*
|
|
* @since XT 1.0
|
|
*/
|
|
XTCDECL
|
|
EFI_STATUS
|
|
XtLdrModuleMain(IN EFI_HANDLE ImageHandle,
|
|
IN PEFI_SYSTEM_TABLE SystemTable)
|
|
{
|
|
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);
|
|
}
|