6
EFI_HANDLE image_handle,
7
EFI_SYSTEM_TABLE *systab
10
EFI_GUID loaded_image_protocol = LOADED_IMAGE_PROTOCOL;
11
EFI_STATUS efi_status;
13
UINTN pat = PoolAllocationType;
16
InitializeLib(image_handle, systab);
17
PoolAllocationType = 2; /* klooj */
19
Print(L"Hello World! (0xd=0x%x, 13=%d)\n", 13, 13);
21
Print(L"before InitializeLib(): PoolAllocationType=%d\n",
24
Print(L" after InitializeLib(): PoolAllocationType=%d\n",
28
* Locate loaded_image_handle instance.
31
Print(L"BS->HandleProtocol() ");
33
efi_status = BS->HandleProtocol(
35
&loaded_image_protocol,
39
Print(L"%xh (%r)\n", efi_status, efi_status);
41
if (efi_status != EFI_SUCCESS) {
45
Print(L" li: %xh\n", li);
48
return EFI_UNSUPPORTED;
51
Print(L" li->Revision: %xh\n", li->Revision);
52
Print(L" li->ParentHandle: %xh\n", li->ParentHandle);
53
Print(L" li->SystemTable: %xh\n", li->SystemTable);
54
Print(L" li->DeviceHandle: %xh\n", li->DeviceHandle);
55
Print(L" li->FilePath: %xh\n", li->FilePath);
56
Print(L" li->Reserved: %xh\n", li->Reserved);
57
Print(L" li->LoadOptionsSize: %xh\n", li->LoadOptionsSize);
58
Print(L" li->LoadOptions: %xh\n", li->LoadOptions);
59
Print(L" li->ImageBase: %xh\n", li->ImageBase);
60
Print(L" li->ImageSize: %xh\n", li->ImageSize);
61
Print(L" li->ImageCodeType: %xh\n", li->ImageCodeType);
62
Print(L" li->ImageDataType: %xh\n", li->ImageDataType);
63
Print(L" li->Unload: %xh\n", li->Unload);
68
EFI_HANDLE ParentHandle;
69
struct _EFI_SYSTEM_TABLE *SystemTable;
71
// Source location of image
72
EFI_HANDLE DeviceHandle;
73
EFI_DEVICE_PATH *FilePath;
76
// Images load options
77
UINT32 LoadOptionsSize;
80
// Location of where image was loaded
83
EFI_MEMORY_TYPE ImageCodeType;
84
EFI_MEMORY_TYPE ImageDataType;
86
// If the driver image supports a dynamic unload request
87
EFI_IMAGE_UNLOAD Unload;