4
|
1 #include <efi.h>
|
|
2 #include <efilib.h>
|
|
3
|
|
4 EFI_STATUS
|
6
|
5 efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *system_table)
|
4
|
6 {
|
6
|
7 InitializeLib(image, system_table);
|
8
|
8 /*
|
|
9 EFI_LOADED_IMAGE *loaded_image = NULL;
|
|
10 EFI_GUID loaded_image_protocol = LOADED_IMAGE_PROTOCOL;
|
|
11 EFI_STATUS status;
|
|
12
|
|
13 uefi_call_wrapper(BS->SetWatchdogTimer, 4, 0, 0x0, 0, NULL);
|
|
14
|
|
15 status = uefi_call_wrapper(
|
|
16 system_table->BootServices->HandleProtocol,
|
|
17 3,
|
|
18 image,
|
|
19 &loaded_image_protocol,
|
|
20 (void **) &loaded_image);
|
|
21
|
|
22 if (EFI_ERROR(status)) {
|
|
23 Print(L"handleprotocol: %r\n", status);
|
|
24 }
|
|
25
|
|
26 Print(L"Image base: %lx\n", loaded_image->ImageBase);
|
|
27 Print(L"Image size: %lx\n", loaded_image->ImageSize);
|
|
28 Print(L"Image file: %s\n", DevicePathToStr(loaded_image->FilePath));
|
|
29 */
|
|
30 return EFI_SUCCESS;
|
4
|
31 }
|