mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
fconf: Handle error from fconf_load_config
Updated 'fconf_load_config' function to return the error. Error from 'fconf_load_config" gets handled by BL1 in subsequent patches. Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Change-Id: I4360f4df850e355b5762bb2d9666eb285101bc68
This commit is contained in:
parent
fe6fd3e4e0
commit
f17ae7b0a9
2 changed files with 11 additions and 11 deletions
|
@ -44,7 +44,7 @@ struct fconf_populator {
|
|||
};
|
||||
|
||||
/* This function supports to load tb_fw_config and fw_config dtb */
|
||||
void fconf_load_config(unsigned int image_id);
|
||||
int fconf_load_config(unsigned int image_id);
|
||||
|
||||
/* Top level populate function
|
||||
*
|
||||
|
|
|
@ -14,14 +14,14 @@
|
|||
#include <plat/common/platform.h>
|
||||
#include <platform_def.h>
|
||||
|
||||
void fconf_load_config(unsigned int image_id)
|
||||
int fconf_load_config(unsigned int image_id)
|
||||
{
|
||||
int err;
|
||||
struct dyn_cfg_dtb_info_t *config_info;
|
||||
const struct dyn_cfg_dtb_info_t *config_info;
|
||||
|
||||
assert((image_id == FW_CONFIG_ID) || (image_id == TB_FW_CONFIG_ID));
|
||||
|
||||
image_info_t image_info = {
|
||||
image_info_t config_image_info = {
|
||||
.h.type = (uint8_t)PARAM_IMAGE_BINARY,
|
||||
.h.version = (uint8_t)VERSION_2,
|
||||
.h.size = (uint16_t)sizeof(image_info_t),
|
||||
|
@ -29,20 +29,20 @@ void fconf_load_config(unsigned int image_id)
|
|||
};
|
||||
|
||||
config_info = FCONF_GET_PROPERTY(dyn_cfg, dtb, image_id);
|
||||
image_info.image_base = config_info->config_addr;
|
||||
image_info.image_max_size = config_info->config_max_size;
|
||||
config_image_info.image_base = config_info->config_addr;
|
||||
config_image_info.image_max_size = (uint32_t)config_info->config_max_size;
|
||||
|
||||
VERBOSE("FCONF: Loading config with image ID: %d\n", image_id);
|
||||
err = load_auth_image(image_id, &image_info);
|
||||
err = load_auth_image(image_id, &config_image_info);
|
||||
if (err != 0) {
|
||||
VERBOSE("Failed to load config %d, continuing without it\n",
|
||||
image_id);
|
||||
return;
|
||||
VERBOSE("Failed to load config %d\n", image_id);
|
||||
return err;
|
||||
}
|
||||
|
||||
INFO("FCONF: Config file with image ID:%d loaded at address = 0x%lx\n",
|
||||
image_id, image_info.image_base);
|
||||
image_id, config_image_info.image_base);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void fconf_populate(const char *config_type, uintptr_t config)
|
||||
|
|
Loading…
Add table
Reference in a new issue