File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1616#include <log.h>
1717#include <malloc.h>
1818#include <net.h>
19+ #include <part.h>
1920#include <efi_loader.h>
2021#include <efi_variable.h>
2122#include <asm/unaligned.h>
@@ -313,6 +314,7 @@ static efi_status_t search_default_file(struct udevice *dev,
313314static efi_status_t fill_default_file_path (struct udevice * blk ,
314315 struct efi_device_path * * dp )
315316{
317+ struct blk_desc * desc = dev_get_uclass_plat (blk );
316318 efi_status_t ret ;
317319 struct udevice * partition ;
318320
@@ -321,6 +323,26 @@ static efi_status_t fill_default_file_path(struct udevice *blk,
321323 if (ret == EFI_SUCCESS )
322324 return ret ;
323325
326+ /* try EFI system partition */
327+ if (desc -> uclass_id == efi_system_partition .uclass_id &&
328+ desc -> devnum == efi_system_partition .devnum ) {
329+ device_foreach_child (partition , blk ) {
330+ struct disk_part * part ;
331+ enum uclass_id id ;
332+
333+ id = device_get_uclass_id (partition );
334+ if (id != UCLASS_PARTITION )
335+ continue ;
336+
337+ part = dev_get_uclass_plat (partition );
338+ if (part -> partnum == efi_system_partition .part ) {
339+ ret = search_default_file (partition , dp );
340+ if (ret == EFI_SUCCESS )
341+ return ret ;
342+ }
343+ }
344+ }
345+
324346 /* try the partitions */
325347 device_foreach_child (partition , blk ) {
326348 enum uclass_id id ;
You can’t perform that action at this time.
0 commit comments