mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-11 07:04:22 +00:00
fix(zynqmp): handle invalid entry point in cpu hotplug scenario
Invalid addresses are from 2G-4G and also address where TF-A is. Change-Id: Iedb817a2f9667b7d0b9a3ac03891a5b93295bf87 Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
This commit is contained in:
parent
8fb8b93984
commit
df44616a12
2 changed files with 19 additions and 1 deletions
|
@ -74,6 +74,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.
|
||||
******************************************************************************/
|
||||
|
@ -87,7 +93,6 @@
|
|||
* Platform specific page table and MMU setup constants
|
||||
******************************************************************************/
|
||||
#define XILINX_OF_BOARD_DTB_MAX_SIZE U(0x200000)
|
||||
#define PLAT_DDR_LOWMEM_MAX U(0x80000000)
|
||||
#define PLAT_OCM_BASE U(0xFFFC0000)
|
||||
#define PLAT_OCM_LIMIT U(0xFFFFFFFF)
|
||||
|
||||
|
|
|
@ -193,6 +193,18 @@ static void __dead2 zynqmp_system_reset(void)
|
|||
}
|
||||
}
|
||||
|
||||
static int32_t zynqmp_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;
|
||||
}
|
||||
|
||||
static int32_t zynqmp_validate_power_state(uint32_t power_state,
|
||||
psci_power_state_t *req_state)
|
||||
{
|
||||
|
@ -235,6 +247,7 @@ static const struct plat_psci_ops zynqmp_psci_ops = {
|
|||
.pwr_domain_suspend_finish = zynqmp_pwr_domain_suspend_finish,
|
||||
.system_off = zynqmp_system_off,
|
||||
.system_reset = zynqmp_system_reset,
|
||||
.validate_ns_entrypoint = zynqmp_validate_ns_entrypoint,
|
||||
.validate_power_state = zynqmp_validate_power_state,
|
||||
.get_sys_suspend_power_state = zynqmp_get_sys_suspend_power_state,
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue