u-boot/lib/efi_loader
xypron.glpk@gmx.de 70bfcdc6bb efi_loader: disk: iterate only over valid block devices
The efi_loader currently stops iterating over the available
block devices stopping at the first device that fails.
This may imply that no block device is found.

With the patch efi_loader only iterates over valid devices.

It is based on patch
06d592bf52f6 (dm: core: Add uclass_first/next_device_check())
which is currently in u-boot-dm.git.

For testing I used an odroid-c2 with a dts including
&sd_emmc_a {
	status = "okay";
};
This device does not exist on the board and cannot be initialized.

Without the patch:

=> bootefi hello
## Starting EFI application at 01000000 ...
WARNING: Invalid device tree, expect boot to fail
mmc_init: -95, time 1806
Found 0 disks
Hello, world!
## Application terminated, r = 0

With the patch:

=> bootefi hello
## Starting EFI application at 01000000 ...
WARNING: Invalid device tree, expect boot to fail
mmc_init: -95, time 1806
Scanning disk mmc@70000.blk...
Scanning disk mmc@72000.blk...
Card did not respond to voltage select!
mmc_init: -95, time 9
Scanning disk mmc@74000.blk...
Found 3 disks
Hello, world!
## Application terminated, r = 0

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-07-19 14:14:41 +02:00
..
.gitignore lib: gitignore *.elf and *.so generated by efi_loader 2017-01-09 10:30:24 -05:00
efi_boottime.c efi_loader: reimplement efi_locate_protocol 2017-07-19 14:14:40 +02:00
efi_console.c efi_loader: console: Correctly report modes 2016-11-14 23:24:02 +01:00
efi_device_path_to_text.c efi_loader: implement EFI_DEVICE_PATH_TO_TEXT_PROTOCOL 2017-07-19 14:14:40 +02:00
efi_disk.c efi_loader: disk: iterate only over valid block devices 2017-07-19 14:14:41 +02:00
efi_gop.c efi_loader: refactor efi_open_protocol 2017-07-19 14:14:23 +02:00
efi_image_loader.c efi_loader: refactor efi_open_protocol 2017-07-19 14:14:23 +02:00
efi_memory.c efi: Add a hook to allow adding memory mapping 2017-03-14 08:44:03 -07:00
efi_net.c efi_loader: refactor efi_open_protocol 2017-07-19 14:14:23 +02:00
efi_runtime.c efi_loader: Rename EFI_RUNTIME_{TEXT, DATA} to __efi_runtime{, _data} 2016-10-19 09:01:54 +02:00
efi_smbios.c smbios: Expose in efi_loader as table 2016-10-19 09:01:52 +02:00
helloworld.c efi: Add support for a hello world test program 2016-11-14 23:24:03 +01:00
Kconfig x86: Enable EFI loader support 2016-11-14 23:24:04 +01:00
Makefile efi_loader: implement EFI_DEVICE_PATH_TO_TEXT_PROTOCOL 2017-07-19 14:14:40 +02:00