[PATCH v2 6/7] efi_loader: disk: Extend EFI_PARTITION_INFO_PROTOCOL to support MBR
Ilias Apalodimas
ilias.apalodimas at linaro.org
Fri Feb 13 09:44:47 CET 2026
On Thu, 12 Feb 2026 at 22:45, Javier Martinez Canillas
<javierm at redhat.com> wrote:
>
> The EFI_PARTITION_INFO_PROTOCOL provides detailed information about
> partitions. The UEFI specification mentions that both GPT and MBR
> partition schemes are supported, but the U-Boot implementation only
> supports the former.
>
> This can cause compatibility issues for platforms whose boot ROM only
> supports MBR. This change adds support for MBR partition tables to
> the protocol, making U-Boot compatible with systems that require a
> legacy MBR table.
>
> Signed-off-by: Javier Martinez Canillas <javierm at redhat.com>
> ---
Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
>
> (no changes since v1)
>
> lib/efi_loader/efi_disk.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
> index 130c4db9606f..f8a57539ec61 100644
> --- a/lib/efi_loader/efi_disk.c
> +++ b/lib/efi_loader/efi_disk.c
> @@ -475,9 +475,12 @@ static efi_status_t efi_disk_add_dev(
> #if CONFIG_IS_ENABLED(DOS_PARTITION)
> case PART_TYPE_DOS:
> info->type = PARTITION_TYPE_MBR;
> -
> - /* TODO: implement support for MBR partition types */
> - log_debug("EFI_PARTITION_INFO_PROTOCOL doesn't support MBR\n");
> + ret = part_get_mbr(desc, part, &info->info.mbr);
> + if (ret) {
> + log_debug("get MBR for part %d failed %ld\n",
> + part, ret);
> + goto error;
> + }
> break;
> #endif
> default:
> --
> 2.53.0
>
More information about the U-Boot
mailing list