Skip to content
Snippets Groups Projects
  • xypron.glpk@gmx.de's avatar
    70bfcdc6
    efi_loader: disk: iterate only over valid block devices · 70bfcdc6
    xypron.glpk@gmx.de authored
    
    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: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
    Reviewed-by: default avatarAndreas Färber <afaerber@suse.de>
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    70bfcdc6
    History
    efi_loader: disk: iterate only over valid block devices
    xypron.glpk@gmx.de authored
    
    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: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
    Reviewed-by: default avatarAndreas Färber <afaerber@suse.de>
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>