Skip to content

efi_loader: disk: Add EFI_PARTITION_INFO_PROTOCOL support for MBR

Javier Martinez Canillas u-boot 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 11 repliesIn review
  2. v15 patches 10 repliesSuperseded

Changes in v2 from the cover letter

- Add Tom Rini Rini's Reviewed-by tags to patches 1-3.
- Document part_get_info_extended() helper function.
- Split partition library and EFI changes in separate patches.
- Add static MBR data in EFI block device test and compare the queried data.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7disk: part_dos: Move header to the main include directorydisk/part_dos.c include/part_dos.h+1 -11 reply
2/7disk: part_dos: Align dos_partition_t with struct partitiondisk/part_dos.c include/part_dos.h+11 -114 replies
3/7disk: part_efi: Remove redundant struct partition definitiondisk/part_efi.c include/part_efi.h+5 -181 reply
4/7disk: part_dos: Document part_get_info_extended() helper functiondisk/part_dos.c+12 -11 reply
5/7disk: part_dos: Refactor to allow retrieving raw MBR partition datadisk/part_dos.c include/part.h+55 -251 reply
6/7efi_loader: disk: Extend EFI_PARTITION_INFO_PROTOCOL to support MBRlib/efi_loader/efi_disk.c+6 -31 reply
7/7efi_selftest: Enhance MBR test for PARTITION_INFO_PROTOCOLlib/efi_selftest/efi_selftest_block_device.c+26 -02 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchTom RiniIlias ApalodimasHeinrich Schuchardt
1/7R-b R-b
2/7R-b R-b
3/7R-b R-b
4/7R-b
5/7R-b
6/7R-b
7/7A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/7] efi_loader: disk: Add EFI_PARTITION_INFO_PROTOCOL support for MBR

This patch series extends the EFI_PARTITION_INFO_PROTOCOL implementation to also support MBR partition tables schemes.

When EFI_PARTITION_INFO_PROTOCOL was implented, only GPT support was added but this can cause compatibility issues with platforms whose boot ROM only supports MBR. This series add support for MBR partition tables to the protocol, making U-Boot compatible with systems that require a legacy MBR table.

This is a second version of the patches that addresses issues pointed out by Heinrich Schuchardt (thanks!). The first version can be found here:

https://lists.denx.de/pipermail/u-boot/2025-June/592644.html

Patches #1 to #3 are preparatory changes to remove duplicated definitions of data structures to store the MBR records.

Patch #4 just documents the part_get_info_extended() helper function and patch #5 refactors this function to also optionally return the MBR record data.

Patch #6 adds the MBR support to the EFI_PARTITION_INFO_PROTOCOL implementation and patch #7 enhances the protocol selftest, to check that the partition record data is correctly filled.

Changes in v2:
- Add Tom Rini Rini's Reviewed-by tags to patches 1-3.
- Document part_get_info_extended() helper function.
- Split partition library and EFI changes in separate patches.
- Add static MBR data in EFI block device test and compare the queried data.

Javier Martinez Canillas (7):
disk: part_dos: Move header to the main include directory
disk: part_dos: Align dos_partition_t with struct partition
disk: part_efi: Remove redundant struct partition definition
disk: part_dos: Document part_get_info_extended() helper function
disk: part_dos: Refactor to allow retrieving raw MBR partition data
efi_loader: disk: Extend EFI_PARTITION_INFO_PROTOCOL to support MBR
efi_selftest: Enhance MBR test for PARTITION_INFO_PROTOCOL

 disk/part_dos.c                              | 91 +++++++++++++-------
 disk/part_efi.c                              |  4 +-
 include/part.h                               | 14 +++
 {disk => include}/part_dos.h                 |  6 +-
 include/part_efi.h                           | 19 +---
 lib/efi_loader/efi_disk.c                    |  9 +-
 lib/efi_selftest/efi_selftest_block_device.c | 26 ++++++
 7 files changed, 113 insertions(+), 56 deletions(-)
 rename {disk => include}/part_dos.h (87%)
Signature · 4 lines
2.53.0

base-commit: f9ffeec4bdcf1da655a0ffea482062adde78fee8
branch: add-mbr-efi-part-info-proto-v2