mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00
feat(stm32mp1): add GUID's for identifying firmware images to be booted
Add GUID's for identifying the firmware image type. With the FWU multi bank boot feature enabled, these GUID values are used to identify the firmware image to be booted. This is done by matching GUID values of images in the io policy table with the Image GUID value that is read from the FWU metadata structure. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Change-Id: Id9751f02f95fc48ef68e4e3f9f0ddbf6d6319d3c
This commit is contained in:
parent
8d6b4764f3
commit
41bd8b9e2a
2 changed files with 11 additions and 6 deletions
|
@ -10,6 +10,7 @@
|
|||
#include <assert.h>
|
||||
|
||||
#include <lib/fconf/fconf.h>
|
||||
#include <tools_share/uuid.h>
|
||||
|
||||
/* IO policies */
|
||||
#define stm32mp__io_policies_getter(id) __extension__ ({ \
|
||||
|
@ -20,6 +21,7 @@
|
|||
struct plat_io_policy {
|
||||
uintptr_t *dev_handle;
|
||||
uintptr_t image_spec;
|
||||
struct efi_guid img_type_guid;
|
||||
int (*check)(const uintptr_t spec);
|
||||
};
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include <tools_share/firmware_image_package.h>
|
||||
|
||||
#include <platform_def.h>
|
||||
#include <stm32mp_efi.h>
|
||||
#include <stm32mp_fconf_getter.h>
|
||||
#include <stm32mp_io_storage.h>
|
||||
|
||||
|
@ -29,15 +30,17 @@ static io_block_spec_t gpt_block_spec = {
|
|||
/* By default, STM32 platforms load images from the FIP */
|
||||
struct plat_io_policy policies[MAX_NUMBER_IDS] = {
|
||||
[FIP_IMAGE_ID] = {
|
||||
&storage_dev_handle,
|
||||
(uintptr_t)&image_block_spec,
|
||||
open_storage
|
||||
.dev_handle = &storage_dev_handle,
|
||||
.image_spec = (uintptr_t)&image_block_spec,
|
||||
.img_type_guid = STM32MP_FIP_GUID,
|
||||
.check = open_storage
|
||||
},
|
||||
#if STM32MP_SDMMC || STM32MP_EMMC
|
||||
[GPT_IMAGE_ID] = {
|
||||
&storage_dev_handle,
|
||||
(uintptr_t)&gpt_block_spec,
|
||||
open_storage
|
||||
.dev_handle = &storage_dev_handle,
|
||||
.image_spec = (uintptr_t)&gpt_block_spec,
|
||||
.img_type_guid = NULL_GUID,
|
||||
.check = open_storage
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue