mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-11 15:14:21 +00:00
fix(versal): handle invalid entry point in cpu hotplug scenario
Invalid addresses are from 2G-4G and also address where TF-A is. Change-Id: I3d07808821da3bdd46be819ad829cb284f9d53d3 Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
This commit is contained in:
parent
e5e417ddec
commit
435bc14a94
2 changed files with 19 additions and 0 deletions
|
@ -63,6 +63,12 @@
|
|||
# define PLAT_ARM_NS_IMAGE_BASE U(PRELOADED_BL33_BASE)
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
* HIGH and LOW DDR MAX definitions
|
||||
******************************************************************************/
|
||||
#define PLAT_DDR_LOWMEM_MAX U(0x80000000)
|
||||
#define PLAT_DDR_HIGHMEM_MAX U(0x100000000)
|
||||
|
||||
/*******************************************************************************
|
||||
* TSP specific defines.
|
||||
******************************************************************************/
|
||||
|
|
|
@ -194,6 +194,18 @@ static void __dead2 versal_system_reset(void)
|
|||
}
|
||||
}
|
||||
|
||||
static int32_t versal_validate_ns_entrypoint(uint64_t ns_entrypoint)
|
||||
{
|
||||
int32_t ret = PSCI_E_SUCCESS;
|
||||
|
||||
if (((ns_entrypoint >= PLAT_DDR_LOWMEM_MAX) && (ns_entrypoint <= PLAT_DDR_HIGHMEM_MAX)) ||
|
||||
((ns_entrypoint >= BL31_BASE) && (ns_entrypoint <= BL31_LIMIT))) {
|
||||
ret = PSCI_E_INVALID_ADDRESS;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* versal_pwr_domain_off() - This function performs actions to turn off core.
|
||||
* @target_state: Targated state.
|
||||
|
@ -291,6 +303,7 @@ static const struct plat_psci_ops versal_nopmc_psci_ops = {
|
|||
.pwr_domain_suspend_finish = versal_pwr_domain_suspend_finish,
|
||||
.system_off = versal_system_off,
|
||||
.system_reset = versal_system_reset,
|
||||
.validate_ns_entrypoint = versal_validate_ns_entrypoint,
|
||||
.validate_power_state = versal_validate_power_state,
|
||||
.get_sys_suspend_power_state = versal_get_sys_suspend_power_state,
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue