[PATCH v2 0/4] efi_loader: add EFI_PARTITION_INFO_PROTOCOL support
Tom Rini
trini at konsulko.com
Wed Jun 18 16:50:16 CEST 2025
On Wed, Jun 18, 2025 at 10:00:34AM +0200, Javier Martinez Canillas wrote:
> This patch series implements support for the EFI_PARTITION_INFO_PROTOCOL,
> to provide cached partition information for GPT partition types.
>
> The EFI specification mentions that the protocol can understand legacy MBR
> partition types, but that's for backward compatibility and not implemented
> by this series. It can be added as a follow-up if needed, to make it fully
> compliant with the spec.
>
> Patch #1 moves the logic to get a GPT partition table entry to a helper
> part_get_gpt_pte() function.
>
> Patch #2 exposes that helper function to be used by the efi_loader.
>
> Patch #3 implements the actual protocol support using the mentioned helper
> to get the GPT partitions table entries.
>
> Patch #4 extends the existing block io EFI selftest to also check for some
> cached data provided by the partition info protocol.
>
> This is a v2 of the series, the first version can be found here:
>
> https://lists.denx.de/pipermail/u-boot/2025-June/592237.html
>
> The EFI_PARTITION_INFO_PROTOCOL implementation is added unconditionally,
> because the u-boot-size-test.sh reports the code increase is negligible:
>
> ./u-boot-size-test.sh qemu_arm64_lwip --all
> ...
> 01: Merge tag 'u-boot-dfu-20250616' of https://source.denx.de/u-boot/custodians/u-boot-dfu
> 02: disk: efi: Move logic to get a GPT entry into a helper function
> 03: disk: efi: expose the part_get_gpt_pte() helper function
> 04: efi_loader: disk: add EFI_PARTITION_INFO_PROTOCOL support
> 05: efi_selftest: Add basic partition info check to block io test
> 5 0 0 /5 qemu_arm64_lwip
> Completed: 5 total built, 5 newly), duration 0:01:32, rate 0.05
> /tmp/qemu_arm64_lwip/add-efi-part-info-proto-v2/boards.cfg is up to date. Nothing to do.
> Summary of 5 commits for 1 boards (1 thread, 8 jobs per thread)
> 01: Merge tag 'u-boot-dfu-20250616' of https://source.denx.de/u-boot/custodians/u-boot-dfu
> 02: disk: efi: Move logic to get a GPT entry into a helper function
> aarch64: (for 1/1 boards) all -64.0 text -64.0
> qemu_arm64_lwip: all -64 text -64
> u-boot: add: 0/0, grow: 0/-1 bytes: 0/-72 (-72)
> function old new delta
> part_get_info_efi 468 396 -72
> 03: disk: efi: expose the part_get_gpt_pte() helper function
> aarch64: (for 1/1 boards) all +32.0 text +32.0
> qemu_arm64_lwip: all +32 text +32
> u-boot: add: 1/0, grow: 0/-1 bytes: 200/-164 (36)
> function old new delta
> part_get_gpt_pte - 200 +200
> part_get_info_efi 396 232 -164
> 04: efi_loader: disk: add EFI_PARTITION_INFO_PROTOCOL support
> aarch64: (for 1/1 boards) all +144.0 rodata +16.0 text +128.0
> qemu_arm64_lwip: all +144 rodata +16 text +128
> u-boot: add: 0/0, grow: 1/0 bytes: 148/0 (148)
> function old new delta
> static.efi_disk_add_dev 636 784 +148
> 05: efi_selftest: Add basic partition info check to block io test
> aarch64: (for 1/1 boards) all +563.0 rodata +179.0 text +384.0
> qemu_arm64_lwip: all +563 rodata +179 text +384
> u-boot: add: 1/0, grow: 1/0 bytes: 384/0 (384)
> function old new delta
> execute 36428 36796 +368
> partition_info_guid - 16 +16
> (no errors to report)
Thanks for digging at the size part here. I don't think that amount of
growth justifies a new Kconfig option.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250618/7bc01889/attachment.sig>
More information about the U-Boot
mailing list