From b6d1757b82a3d8e120e7f8079a23a9e1f5290415 Mon Sep 17 00:00:00 2001 From: Varun Wadekar <vwadekar@nvidia.com> Date: Tue, 17 Oct 2017 10:29:24 -0700 Subject: [PATCH] Tegra186: sanity check target cluster during core power on This patch sanity checks the target cluster value, during core power on, by comparing it against the maximum number of clusters supported by the platform. Reported by: Rohit Khanna <rokhanna@nvidia.com> Change-Id: Ia73ccf04bd246403de4ffff6e5c99e3b00fb98ca Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> --- plat/nvidia/tegra/soc/t186/plat_psci_handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plat/nvidia/tegra/soc/t186/plat_psci_handlers.c b/plat/nvidia/tegra/soc/t186/plat_psci_handlers.c index bd13dc2a1..e0b5d2b9c 100644 --- a/plat/nvidia/tegra/soc/t186/plat_psci_handlers.c +++ b/plat/nvidia/tegra/soc/t186/plat_psci_handlers.c @@ -295,7 +295,7 @@ int32_t tegra_soc_pwr_domain_on(u_register_t mpidr) uint64_t target_cluster = (mpidr & MPIDR_CLUSTER_MASK) >> MPIDR_AFFINITY_BITS; - if (target_cluster > MPIDR_AFFLVL1) { + if (target_cluster > ((uint32_t)PLATFORM_CLUSTER_COUNT - 1U)) { ERROR("%s: unsupported CPU (0x%lx)\n", __func__, mpidr); ret = PSCI_E_NOT_PRESENT; -- GitLab