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 = uefi_call_wrapper(
37 &loaded_image_protocol,
41 Print(L"%xh (%r)\n", efi_status, efi_status);
43 if (efi_status != EFI_SUCCESS) {
47 Print(L" li: %xh\n", li);
50 return EFI_UNSUPPORTED;
53 Print(L" li->Revision: %xh\n", li->Revision);
54 Print(L" li->ParentHandle: %xh\n", li->ParentHandle);
55 Print(L" li->SystemTable: %xh\n", li->SystemTable);
56 Print(L" li->DeviceHandle: %xh\n", li->DeviceHandle);
57 Print(L" li->FilePath: %xh\n", li->FilePath);
58 Print(L" li->Reserved: %xh\n", li->Reserved);
59 Print(L" li->LoadOptionsSize: %xh\n", li->LoadOptionsSize);
60 Print(L" li->LoadOptions: %xh\n", li->LoadOptions);
61 Print(L" li->ImageBase: %xh\n", li->ImageBase);
62 Print(L" li->ImageSize: %xh\n", li->ImageSize);
63 Print(L" li->ImageCodeType: %xh\n", li->ImageCodeType);
64 Print(L" li->ImageDataType: %xh\n", li->ImageDataType);
65 Print(L" li->Unload: %xh\n", li->Unload);
70 EFI_HANDLE ParentHandle;
71 struct _EFI_SYSTEM_TABLE *SystemTable;
73 // Source location of image
74 EFI_HANDLE DeviceHandle;
75 EFI_DEVICE_PATH *FilePath;
78 // Images load options
79 UINT32 LoadOptionsSize;
82 // Location of where image was loaded
85 EFI_MEMORY_TYPE ImageCodeType;
86 EFI_MEMORY_TYPE ImageDataType;
88 // If the driver image supports a dynamic unload request
89 EFI_IMAGE_UNLOAD Unload;