mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-17 16:53:06 +00:00
7a85f32413
The requsted partition disk sector incorrectly has the parition start sector added in twice for UCLASS_PARTITION devices. The efi_disk_rw_blocks() routine adds the diskobj->offset to the requested lba. When the device is a UCLASS_PARTITION, the dev_read() or dev_write() routine is called which adds part-gpt_part_info.start. This causes I/O to the wrong sector. Takahiro Akashi suggested removing the offset field from the efi_disk_obj structure since disk-uclass.c handles the partition start biasing. Device types other than UCLASS_PARTITION set the diskobj->offset field to zero which makes the field unnecessary. This change removes the offset field from the structure and removes all references from the code which is isolated to the lib/efi_loader/efi_disk.c module. This change also adds a test for the EFI ReadBlocks() API in the EFI selftest code. There is already a test for reading a FAT file. The new test uses ReadBlocks() to read the same "disk" block and compare it to the data read from the file system API. Signed-Off-by: Paul Barbieri <plb365@gmail.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> |
||
---|---|---|
.. | ||
.gitignore | ||
efi_freestanding.c | ||
efi_miniapp_tcg2_arm.h | ||
efi_miniapp_tcg2_arm64.h | ||
efi_miniapp_tcg2_ia32.h | ||
efi_miniapp_tcg2_riscv32.h | ||
efi_miniapp_tcg2_riscv64.h | ||
efi_miniapp_tcg2_x86_64.h | ||
efi_selftest.c | ||
efi_selftest_bitblt.c | ||
efi_selftest_block_device.c | ||
efi_selftest_config_table.c | ||
efi_selftest_console.c | ||
efi_selftest_controllers.c | ||
efi_selftest_crc32.c | ||
efi_selftest_devicepath.c | ||
efi_selftest_devicepath_util.c | ||
efi_selftest_disk_image.h | ||
efi_selftest_esrt.c | ||
efi_selftest_event_groups.c | ||
efi_selftest_events.c | ||
efi_selftest_exception.c | ||
efi_selftest_exitbootservices.c | ||
efi_selftest_fdt.c | ||
efi_selftest_gop.c | ||
efi_selftest_hii.c | ||
efi_selftest_hii_data.c | ||
efi_selftest_load_file.c | ||
efi_selftest_loaded_image.c | ||
efi_selftest_loadimage.c | ||
efi_selftest_manageprotocols.c | ||
efi_selftest_mem.c | ||
efi_selftest_memory.c | ||
efi_selftest_miniapp_exception.c | ||
efi_selftest_miniapp_exit.c | ||
efi_selftest_miniapp_return.c | ||
efi_selftest_open_protocol.c | ||
efi_selftest_register_notify.c | ||
efi_selftest_reset.c | ||
efi_selftest_rng.c | ||
efi_selftest_rtc.c | ||
efi_selftest_set_virtual_address_map.c | ||
efi_selftest_snp.c | ||
efi_selftest_startimage_exit.c | ||
efi_selftest_startimage_return.c | ||
efi_selftest_tcg2.c | ||
efi_selftest_textinput.c | ||
efi_selftest_textinputex.c | ||
efi_selftest_textoutput.c | ||
efi_selftest_tpl.c | ||
efi_selftest_unaligned.c | ||
efi_selftest_unicode_collation.c | ||
efi_selftest_util.c | ||
efi_selftest_variables.c | ||
efi_selftest_variables_runtime.c | ||
efi_selftest_watchdog.c | ||
Kconfig | ||
Makefile |