Commit 256d133a authored by Siva Durga Prasad Paladugu's avatar Siva Durga Prasad Paladugu Committed by Jolly Shah
Browse files

plat: xilinx: zynqmp: Use GIC framework for warm restart



- Flag GICV2_G0_FOR_EL3 needs to be set for group interrupts
  to be targeted to EL3.
- Raise SGI interrupts for individual CPU cores as GIC API
  uses CPU num as parameter, not CPU mask.
- Flag WARMBOOT_ENABLE_DCACHE_EARLY needs to be set to enable
  CPU interface mask work properly for all CPU cores which is
  required when generating SGI.
- Call plat_ic_end_of_interrupt() from ttc_fiq_handler() to clear
  GIC interrupt to avoid same interrupt again.
Signed-off-by: default avatarSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: default avatarRajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: default avatarJolly Shah <jolly.shah@xilinx.com>
Change-Id: I71d4935b8d4688a3729c62753ca8a1a77cd92ae7
parent fe550ede
/*
* Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
......@@ -100,9 +100,8 @@ static void zynqmp_pwr_domain_on_finish(const psci_power_state_t *target_state)
for (size_t i = 0; i <= PLAT_MAX_PWR_LVL; i++)
VERBOSE("%s: target_state->pwr_domain_state[%lu]=%x\n",
__func__, i, target_state->pwr_domain_state[i]);
plat_arm_gic_pcpu_init();
gicv2_cpuif_enable();
gicv2_pcpu_distif_init();
}
static void zynqmp_pwr_domain_suspend_finish(const psci_power_state_t *target_state)
......
......@@ -11,6 +11,8 @@ SEPARATE_CODE_AND_RODATA := 1
ZYNQMP_WDT_RESTART := 0
ZYNQMP_IPI_CRC_CHECK := 0
override RESET_TO_BL31 := 1
override GICV2_G0_FOR_EL3 := 1
override WARMBOOT_ENABLE_DCACHE_EARLY := 1
# Do not enable SVE
ENABLE_SVE_FOR_NS := 0
......
......@@ -77,8 +77,12 @@ static void trigger_wdt_restart(void)
INFO("Active Cores: %d\n", active_cores);
for (i = PLATFORM_CORE_COUNT - 1; i >= 0; i--) {
if (target_cpu_list & (1 << i)) {
/* trigger SGI to active cores */
gicv2_raise_sgi(ARM_IRQ_SEC_SGI_7, target_cpu_list);
plat_ic_raise_el3_sgi(ARM_IRQ_SEC_SGI_7, i);
}
}
}
/**
......@@ -106,6 +110,8 @@ static uint64_t ttc_fiq_handler(uint32_t id, uint32_t flags, void *handle,
{
INFO("BL31: Got TTC FIQ\n");
plat_ic_end_of_interrupt(id);
/* Clear TTC interrupt by reading interrupt register */
mmio_read_32(TTC3_INTR_REGISTER_1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment