u-boot-brain/lib/efi_loader
AKASHI Takahiro 8458bf648f efi_loader: set image_base and image_size to correct values
Currently, image's image_base points to an address where the image was
temporarily uploaded for further loading. Since efi_loader relocates
the image to final destination, image_base and image_size should reflect
that.

This bug was detected in UEFI SCT, "Loaded Image Protocol Test - test 2,"
which shows that 'Unload' function doesn't fit into a range suggested by
image_base and image_size.

	TestCase/UEFI/EFI/Protocol/LoadedImage/BlackBoxTest/
	LoadedImageBBTestMain.c:1002

Changes in this patch also includes:
* reverts a patch, "efi_loader: save image relocation address
  and size" since newly added fields are no longer needed.
* copy PE headers as well since those information will be needed
  for module loading, in particular, at gurb.
  (This bug was reported by Heinrich.)

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>

Rebase patch.
Remove unused fields from struct efi_loaded_image_obj.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-04-07 14:17:06 +02:00
..
.gitignore lib: gitignore *.elf and *.so generated by efi_loader 2017-01-09 10:30:24 -05:00
efi_acpi.c efi_loader: Install ACPI configuration tables 2018-07-02 09:23:28 +08:00
efi_bootmgr.c efi_loader: bootmgr: support BootNext and BootCurrent variable behavior 2019-04-07 14:17:06 +02:00
efi_boottime.c efi_loader: release file buffer after loading image 2019-04-07 14:17:06 +02:00
efi_console.c efi_loader: Fix serial console size detection 2019-03-10 19:56:59 +01:00
efi_device_path_to_text.c efi_loader: fix typos 2018-12-02 21:59:37 +01:00
efi_device_path_utilities.c SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
efi_device_path.c efi_loader: do not add \ in efi_fs_from_name() 2019-03-02 23:34:26 +01:00
efi_disk.c efi_loader: rename parent to header 2018-12-02 21:59:36 +01:00
efi_file.c efi_loader: TODO for the EFI file protocol 2019-03-27 21:52:11 +01:00
efi_freestanding.c efi_loader: provide freestanding library 2019-02-13 09:40:06 +01:00
efi_gop.c efi_loader: fix typos 2018-12-02 21:59:37 +01:00
efi_hii_config.c efi_loader: debug output for HII protocols 2019-02-13 09:40:06 +01:00
efi_hii.c efi_loader: endless loop in add_strings_package() 2019-03-20 18:16:53 +01:00
efi_image_loader.c efi_loader: set image_base and image_size to correct values 2019-04-07 14:17:06 +02:00
efi_memory.c efi_loader: correct parameter size in efi_allocate_pool 2019-03-20 18:16:53 +01:00
efi_net.c efi_loader: fix simple network protocol 2018-12-02 21:59:37 +01:00
efi_root_node.c efi_loader: create root node 2018-09-23 21:55:31 +02:00
efi_runtime.c efi_loader: efi_add_runtime_mmio() 2019-02-13 09:40:05 +01:00
efi_setup.c efi_loader: move efi_init_obj_list() to a new efi_setup.c 2019-02-13 09:40:05 +01:00
efi_smbios.c sandbox: smbios: Update to support sandbox 2018-12-02 21:59:37 +01:00
efi_unicode_collation.c efi_loader: EFI_UNICODE_COLLATION_PROTOCOL 2018-09-23 21:55:29 +02:00
efi_variable.c efi_loader: missing return in efi_get_next_variable_name() 2019-03-20 18:16:53 +01:00
efi_watchdog.c SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
helloworld.c efi_loader: use library memcpy() in helloworld.efi 2019-02-13 09:40:06 +01:00
Kconfig efi_loader: Make HII a config option 2019-02-13 09:40:06 +01:00
Makefile efi: hii: add HII config routing/access protocols 2019-02-13 09:40:06 +01:00