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 1515#include <log.h>
1616#include <malloc.h>
1717#include <net.h>
18+ #include <part.h>
1819#include <efi_loader.h>
1920#include <efi_variable.h>
2021#include <asm/unaligned.h>
@@ -310,6 +311,7 @@ static efi_status_t search_default_file(struct udevice *dev,
310311static efi_status_t fill_default_file_path (struct udevice * blk ,
311312 struct efi_device_path * * dp )
312313{
314+ struct blk_desc * desc = dev_get_uclass_plat (blk );
313315 efi_status_t ret ;
314316 struct udevice * partition ;
315317
@@ -318,6 +320,26 @@ static efi_status_t fill_default_file_path(struct udevice *blk,
318320 if (ret == EFI_SUCCESS )
319321 return ret ;
320322
323+ /* try EFI system partition */
324+ if (desc -> uclass_id == efi_system_partition .uclass_id &&
325+ desc -> devnum == efi_system_partition .devnum ) {
326+ device_foreach_child (partition , blk ) {
327+ struct disk_part * part ;
328+ enum uclass_id id ;
329+
330+ id = device_get_uclass_id (partition );
331+ if (id != UCLASS_PARTITION )
332+ continue ;
333+
334+ part = dev_get_uclass_plat (partition );
335+ if (part -> partnum == efi_system_partition .part ) {
336+ ret = search_default_file (partition , dp );
337+ if (ret == EFI_SUCCESS )
338+ return ret ;
339+ }
340+ }
341+ }
342+
321343 /* try the partitions */
322344 device_foreach_child (partition , blk ) {
323345 enum uclass_id id ;
You can’t perform that action at this time.
0 commit comments