This commit is contained in:
parent
f511cbc772
commit
78d8415c89
1 changed files with 12 additions and 9 deletions
|
@ -29,21 +29,20 @@ static inline void drawRectangle(UINT32 x, UINT32 y, UINT32 w, UINT32 h, UINT32
|
||||||
EFI_STATUS EFIAPI UefiEntry(IN EFI_HANDLE imgHandle, IN EFI_SYSTEM_TABLE* sysTable)
|
EFI_STATUS EFIAPI UefiEntry(IN EFI_HANDLE imgHandle, IN EFI_SYSTEM_TABLE* sysTable)
|
||||||
{
|
{
|
||||||
gST = sysTable;
|
gST = sysTable;
|
||||||
gBS = sysTable->BootServices;
|
gBS = gST->BootServices;
|
||||||
gImageHandle = imgHandle;
|
|
||||||
|
|
||||||
gBS->SetWatchdogTimer(0, 0, 0, NULL);
|
gBS->SetWatchdogTimer(0, 0, 0, NULL);
|
||||||
|
|
||||||
EFI_STATUS status = 0;
|
EFI_STATUS Status = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GOP Setup
|
* GOP Setup
|
||||||
*/
|
*/
|
||||||
|
|
||||||
status = gBS->LocateProtocol(&gop_guid, NULL, (VOID **)&Gop);
|
Status = gBS->LocateProtocol(&gop_guid, NULL, (VOID **)&Gop);
|
||||||
if (EFI_ERROR(status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
Print(u"\r\nERROR: %x; Cannot locate GOP protocol. Return.\r\n", status);
|
Print(u"\r\nERROR: %x; Cannot locate GOP protocol. Return.\r\n", Status);
|
||||||
return status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Gop_FrameBufferBase = Gop->Mode->FrameBufferBase;
|
Gop_FrameBufferBase = Gop->Mode->FrameBufferBase;
|
||||||
|
@ -85,8 +84,12 @@ EFI_STATUS EFIAPI UefiEntry(IN EFI_HANDLE imgHandle, IN EFI_SYSTEM_TABLE* sysTab
|
||||||
|
|
||||||
UINTN EventIndex = 0;
|
UINTN EventIndex = 0;
|
||||||
EFI_EVENT Event = NULL;
|
EFI_EVENT Event = NULL;
|
||||||
status = gBS->CreateEvent(EVT_TIMER, TPL_CALLBACK, (EFI_EVENT_NOTIFY)NULL, (VOID*)NULL, &Event);
|
Status = gBS->CreateEvent(EVT_TIMER, TPL_CALLBACK, (EFI_EVENT_NOTIFY)NULL, (VOID*)NULL, &Event);
|
||||||
status = gBS->SetTimer(Event, TimerPeriodic, 1e6);
|
Status = gBS->SetTimer(Event, TimerPeriodic, 1e6);
|
||||||
|
if (EFI_ERROR(Status)) {
|
||||||
|
Print(u"\r\nERROR: %x; Unable to set timer. Return.\r\n", Status);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue