diff options
| author | Javier Martinez Canillas <[email protected]> | 2026-02-12 21:45:00 +0100 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2026-02-15 08:43:58 +0100 |
| commit | 16b8554cd4f01462cc6bac0350041e95868c4988 (patch) | |
| tree | c60ca11de101d0d55e1224a4f070ed8e72bc855d /lib | |
| parent | 5e8025588862a1ec6da14af97e244a491d079e7f (diff) | |
efi_loader: disk: Extend EFI_PARTITION_INFO_PROTOCOL to support MBR
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 <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/efi_loader/efi_disk.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index 130c4db9606..f8a57539ec6 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: |
