blob: 5e03826a7267d5b4ed82487a69c492497ac1c919 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include <lib.h>
#include <comus/efi.h>
#include <comus/mboot.h>
#include <comus/memory.h>
#include <efi.h>
#include "efi.h"
void efi_init(EFI_HANDLE IH, EFI_SYSTEM_TABLE *ST)
{
EFI_STATUS status;
if (IH == NULL || ST == NULL)
return;
status = efi_load_mmap(ST);
if (EFI_ERROR(status))
panic("Failed to load efi memory map, EFI_STATUS = %lu\n", status);
status = efi_load_gop(ST);
if (EFI_ERROR(status))
panic(
"Failed to locate graphics output protocol (GOP), EFI_STATUS = %lu\n",
status);
ST->BootServices->ExitBootServices(IH, 0);
}
|