[RFC PATCH] efi_loader: disk: Add print to show ESP device
Begari, Padmarao
Padmarao.Begari at amd.com
Thu Dec 4 11:37:09 CET 2025
[AMD Official Use Only - AMD Internal Distribution Only]
> From: Simek, Michal <michal.simek at amd.com>
> Sent: Thursday, December 4, 2025 3:31 PM
> To: Begari, Padmarao <Padmarao.Begari at amd.com>; u-boot at lists.denx.de;
> ilias.apalodimas at linaro.org
> Cc: git (AMD-Xilinx) <git at amd.com>; Toomey, John <john.toomey at amd.com>
> Subject: Re: [RFC PATCH] efi_loader: disk: Add print to show ESP device
>
>
>
> On 12/4/25 10:47, Padmarao Begari wrote:
> > Print a message for debug purposes when an EFI System Partition
> > (ESP) is detected on the device to indicate how many devices are
> > detected. Only one ESP device is used for capsule update; if multiple
> > ESP devices are found, it may indicate corruption in UEFI variables.
> > This is for informational purposes only, as the number of removable
> > media connected to a given board cannot be controlled.
> >
> > Signed-off-by: Padmarao Begari <padmarao.begari at amd.com>
> > ---
> > lib/efi_loader/efi_disk.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
> > index 130c4db9606..8391de1527c 100644
> > --- a/lib/efi_loader/efi_disk.c
> > +++ b/lib/efi_loader/efi_disk.c
> > @@ -565,6 +565,11 @@ static efi_status_t efi_disk_add_dev(
> > diskobj->media.removable_media,
> > diskobj->media.last_block);
> >
> > + if (part_info && part_info->bootable & PART_EFI_SYSTEM_PARTITION)
> > + printf("EFI system partition: %s %x:%x\n",
> > + blk_get_uclass_name(desc->uclass_id),
> > + desc->devnum, part);
> > +
> > /* Store first EFI system partition */
> > if (part && efi_system_partition.uclass_id == UCLASS_INVALID) {
> > if (part_info &&
>
> how does the output look like?
>
U-Boot is showing like below for SD over USB and UFS device if both have ESP
-------------------------------------------------------------------------------
In: serial at f1930000
Out: serial at f1930000
Err: serial at f1930000
Bus usb at f1c00000: Register 1000440 NbrPorts 1
Starting the controller
USB XHCI 1.10
scanning bus usb at f1c00000 for devices...
-------------------------------------------------------
EFI system partition: usb 0:1 ----> this is for SD over USB
-------------------------------------------------------
4 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
ufs-versal2-pltfm ufs at f10b0000: [RX, TX]: gear=[4, 4], lane[2, 2], pwr[FAST MODE, FAST MODE], rate = 2
scanning bus for devices...
------------------------------------------
EFI system partition: scsi 0:1 ----> this is for UFS
------------------------------------------
Device 0: (0:0) Vendor: MICRON Prod.: MT064GBCAV1U31AA Rev: 0302
Type: Hard Disk
Capacity: 20480.0 MB = 20.0 GB (5242880 x 4096)
Device 1: (0:1) Vendor: MICRON Prod.: MT064GBCAV1U31AA Rev: 0302
Type: Hard Disk
Capacity: 1024.0 MB = 1.0 GB (262144 x 4096)
Device 2: (0:2) Vendor: MICRON Prod.: MT064GBCAV1U31AA Rev: 0302
Type: Hard Disk
Capacity: 4096.0 MB = 4.0 GB (1048576 x 4096)
Bootmode: JTAG_MODE
Net:
ZYNQ GEM: f1a60000, mdio bus f1a60000, phyaddr 1, interface rgmii-id
Warning: ethernet at f1a60000 (eth0) using random MAC address - 8e:d1:49:4c:3a:93
eth0: ethernet at f1a60000
ZYNQ GEM: ed920000, mdio bus ed920000, phyaddr 0, interface 10gbase-r
Warning: ethernet at ed920000 (eth1) using random MAC address - 02:3c:10:99:bc:18
, eth1: ethernet at ed920000
Hit any key to stop autoboot: 0
versal2>
-------------------------------------------------------------------------------
> M
More information about the U-Boot
mailing list