summaryrefslogtreecommitdiff
path: root/disk
diff options
context:
space:
mode:
authorCaleb Connolly <[email protected]>2024-10-12 15:57:18 +0200
committerCaleb Connolly <[email protected]>2024-11-20 17:57:58 +0100
commiteab4675f93dfedd29a37ffe3b1fa3fbeae831839 (patch)
tree42b05bed0fe7fc77a50e5d8401f9d86de552d346 /disk
parentef14c347db4ae62f964bcf36805563efe1104754 (diff)
disk: expose partition type flags
GPT partition tables include two bytes worth of vendor defined attributes, per partition. ChromeOS and Qualcomm both use these (with different encoding!) to handle A/B slot switching with a retry counter. Expose these via the disk_partition struct so that they can be parsed by the relevant board code. This will be used on Qualcomm boards to determine which slot we're booting on so that we can flash capsule updates to the correct one. Reviewed-by: Ilias Apalodimas <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
Diffstat (limited to 'disk')
-rw-r--r--disk/part_efi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/disk/part_efi.c b/disk/part_efi.c
index bdcfcba5d51..932d058c184 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -292,6 +292,7 @@ static int __maybe_unused part_get_info_efi(struct blk_desc *desc, int part,
print_efiname(&gpt_pte[part - 1]));
strcpy((char *)info->type, "U-Boot");
info->bootable = get_bootable(&gpt_pte[part - 1]);
+ info->type_flags = gpt_pte[part - 1].attributes.fields.type_guid_specific;
if (CONFIG_IS_ENABLED(PARTITION_UUIDS)) {
uuid_bin_to_str(gpt_pte[part - 1].unique_partition_guid.b,
(char *)disk_partition_uuid(info),