Basic memory management for UEFI only
This commit is contained in:
parent
1fc97f9c5f
commit
50093e70e4
9 changed files with 146 additions and 11 deletions
|
@ -20,10 +20,16 @@
|
|||
#include <efi.h>
|
||||
#include <efilib.h>
|
||||
|
||||
#include <mem/mman.h>
|
||||
#include <lib/string.h>
|
||||
#include <print.h>
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
EFI_HANDLE gImageHandle;
|
||||
EFI_SYSTEM_TABLE *gSystemTable;
|
||||
EFI_BOOT_SERVICES *gBootServices;
|
||||
|
||||
EFI_STATUS uefi_entry(EFI_HANDLE ImageHandle,
|
||||
EFI_SYSTEM_TABLE *SystemTable)
|
||||
{
|
||||
|
@ -31,6 +37,7 @@ EFI_STATUS uefi_entry(EFI_HANDLE ImageHandle,
|
|||
|
||||
gImageHandle = ImageHandle;
|
||||
gSystemTable = SystemTable;
|
||||
gBootServices = SystemTable->BootServices;
|
||||
|
||||
// clear the screen
|
||||
gSystemTable->ConOut->ClearScreen(gSystemTable->ConOut);
|
||||
|
@ -38,7 +45,7 @@ EFI_STATUS uefi_entry(EFI_HANDLE ImageHandle,
|
|||
// disable UEFI watchdog
|
||||
Status = gSystemTable->BootServices->SetWatchdogTimer(0, 0, 0, NULL);
|
||||
if (EFI_ERROR(Status)) {
|
||||
debug("Couldn't disable UEFI watchdog!\n");
|
||||
debug("Couldn't disable UEFI watchdog: %s (%x)\n", efi_status_to_str(Status), Status);
|
||||
}
|
||||
|
||||
while(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue