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@redhat.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
#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: