@@ -216,6 +216,16 @@ int get_disk_guid(struct blk_desc * dev_desc, char *guid)
return 0;
}
+int get_gpt_hdr_parts(struct blk_desc *desc, gpt_header *gpt_head,
+ gpt_entry **gpt_pte)
+{
+ /* This function validates and fills in the GPT header and PTE's */
+ if (find_valid_gpt(desc, gpt_head, gpt_pte) != 1)
+ return -EINVAL;
+
+ return 0;
+}
+
void part_print_efi(struct blk_desc *dev_desc)
{
ALLOC_CACHE_ALIGN_BUFFER_PAD(gpt_header, gpt_head, 1, dev_desc->blksz);
@@ -345,6 +345,20 @@ struct part_driver {
#if CONFIG_IS_ENABLED(EFI_PARTITION)
/* disk/part_efi.c */
+
+/**
+ * get_gpt_hdr_parts() - Get information on the GPT Header and
+ * Partition Table Entries
+ *
+ * @param desc - block device descriptor
+ * @param gpt_h - pointer to GPT header representation
+ * @param gpt_e - pointer to GPT partition table entries
+ *
+ * @return - zero on success, otherwise error
+ */
+int get_gpt_hdr_parts(struct blk_desc *desc, gpt_header *gpt_head,
+ gpt_entry **gpt_pte);
+
/**
* write_gpt_table() - Write the GUID Partition Table to disk
*
Add function to get the gpt header and partition entries filled. These would be used subsequently for multi bank firmware update support on devices where the images reside on GPT partitions. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> --- disk/part_efi.c | 10 ++++++++++ include/part.h | 14 ++++++++++++++ 2 files changed, 24 insertions(+)