diff options
| author | Svyatoslav Ryhel <[email protected]> | 2024-07-31 11:22:54 +0300 |
|---|---|---|
| committer | Svyatoslav Ryhel <[email protected]> | 2024-10-13 17:20:26 +0300 |
| commit | 83b5f6367941f0f1c1904e4fde895fceedb75437 (patch) | |
| tree | 27992d609ec48027dcd979e4da41a8fe4abce0ae /disk/part_efi.c | |
| parent | 93b9cd792089e536f2bfa85d9903fd4798209f76 (diff) | |
disk: add TegraPT support
TegraPT is compatible with EFI part but it can't pass Protective MBR check.
Skip this check if CONFIG_TEGRA_PARTITION is enabled, storage uclass is MMC
and devnum is 0. Note, eMMC on supported devices MUST be aliased to mmc0.
Signed-off-by: Svyatoslav Ryhel <[email protected]>
Diffstat (limited to 'disk/part_efi.c')
| -rw-r--r-- | disk/part_efi.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/disk/part_efi.c b/disk/part_efi.c index 580821a6ee9..12f28aec92c 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -318,6 +318,19 @@ static int part_test_efi(struct blk_desc *desc) /* Read legacy MBR from block 0 and validate it */ if ((blk_dread(desc, 0, 1, (ulong *)legacymbr) != 1) || (is_pmbr_valid(legacymbr) != 1)) { + + /* + * TegraPT is compatible with EFI part, but it + * cannot pass the Protective MBR check. Skip it + * if CONFIG_TEGRA_PARTITION is enabled and the + * device in question is eMMC. + */ + if (IS_ENABLED(CONFIG_TEGRA_PARTITION)) + if (!is_pmbr_valid(legacymbr) && + desc->uclass_id == UCLASS_MMC && + !desc->devnum) + return 0; + return -1; } return 0; |
