efi_loader: definition of efi_virtual_address_map()
[oweals/u-boot.git] / lib / efi_loader / efi_image_loader.c
index 93feefd366cd0a267cb01bff247d51bf5e461ff3..13541cfa7a2873862239fcfc889c45685b403ac2 100644 (file)
 #include <pe.h>
 
 const efi_guid_t efi_global_variable_guid = EFI_GLOBAL_VARIABLE_GUID;
-const efi_guid_t efi_guid_device_path = DEVICE_PATH_GUID;
-const efi_guid_t efi_guid_loaded_image = LOADED_IMAGE_GUID;
-const efi_guid_t efi_guid_loaded_image_device_path
-               = LOADED_IMAGE_DEVICE_PATH_GUID;
+const efi_guid_t efi_guid_device_path = EFI_DEVICE_PATH_PROTOCOL_GUID;
+const efi_guid_t efi_guid_loaded_image = EFI_LOADED_IMAGE_PROTOCOL_GUID;
+const efi_guid_t efi_guid_loaded_image_device_path =
+               EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID;
 const efi_guid_t efi_simple_file_system_protocol_guid =
                EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID;
 const efi_guid_t efi_file_info_guid = EFI_FILE_INFO_GUID;
@@ -273,6 +273,7 @@ efi_status_t efi_load_pe(struct efi_loaded_image_obj *handle, void *efi,
                IMAGE_OPTIONAL_HEADER64 *opt = &nt64->OptionalHeader;
                image_base = opt->ImageBase;
                efi_set_code_and_data_type(loaded_image_info, opt->Subsystem);
+               handle->image_type = opt->Subsystem;
                efi_reloc = efi_alloc(virt_size,
                                      loaded_image_info->image_code_type);
                if (!efi_reloc) {
@@ -288,6 +289,7 @@ efi_status_t efi_load_pe(struct efi_loaded_image_obj *handle, void *efi,
                IMAGE_OPTIONAL_HEADER32 *opt = &nt->OptionalHeader;
                image_base = opt->ImageBase;
                efi_set_code_and_data_type(loaded_image_info, opt->Subsystem);
+               handle->image_type = opt->Subsystem;
                efi_reloc = efi_alloc(virt_size,
                                      loaded_image_info->image_code_type);
                if (!efi_reloc) {