feat(partition): copy the partition GUID into the partition structure

Copy the UniquePartitionGUID member of a GPT partition entry into the
partition_entry structure. This GUID is subsequently used to identify
the image to boot on a platform which supports multiple partitions of
firmware components using the FWU metadata structure.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Change-Id: I8b55a1ee7deb1353886fbd8ebde53055d677fee0
This commit is contained in:
Sughosh Ganu 2021-07-02 16:33:46 +05:30
parent 938e8a500a
commit 7585ec4d36
1 changed files with 3 additions and 0 deletions

View File

@ -9,6 +9,7 @@
#include <string.h>
#include <common/debug.h>
#include <drivers/partition/efi.h>
#include <drivers/partition/gpt.h>
#include <lib/utils.h>
@ -57,5 +58,7 @@ int parse_gpt_entry(gpt_entry_t *gpt_entry, partition_entry_t *entry)
entry->length = (uint64_t)(gpt_entry->last_lba -
gpt_entry->first_lba + 1) *
PLAT_PARTITION_BLOCK_SIZE;
guidcpy(&entry->part_guid, &gpt_entry->unique_uuid);
return 0;
}