zynqmp: Add RW access to L2ACTLR_EL1 and CPUACTLR_EL1
Arm provided error injection support. To enable this error injection, we need to set L2DEIEN in L2ACTLR_EL1 register and L1DEIEN in CPUACTLR_EL1 register. This is needed for our cortexa53 edac linux driver testing. These registers need write access from non secure EL1 i.e linux at the time of setting the above bits. Signed-off-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
This commit is contained in:
parent
538957d85b
commit
06526c9797
|
@ -118,11 +118,31 @@ void bl31_early_platform_setup(bl31_params_t *from_bl2,
|
|||
NOTICE("BL31: Non secure code at 0x%lx\n", bl33_image_ep_info.pc);
|
||||
}
|
||||
|
||||
/* Enable the test setup */
|
||||
#ifndef ZYNQMP_TESTING
|
||||
static void zynqmp_testing_setup(void) { }
|
||||
#else
|
||||
static void zynqmp_testing_setup(void)
|
||||
{
|
||||
uint32_t actlr_el3, actlr_el2;
|
||||
|
||||
/* Enable CPU ACTLR AND L2ACTLR RW access from non-secure world */
|
||||
actlr_el3 = read_actlr_el3();
|
||||
actlr_el2 = read_actlr_el2();
|
||||
|
||||
actlr_el3 |= ACTLR_EL3_L2ACTLR_BIT | ACTLR_EL3_CPUACTLR_BIT;
|
||||
actlr_el2 |= ACTLR_EL3_L2ACTLR_BIT | ACTLR_EL3_CPUACTLR_BIT;
|
||||
write_actlr_el3(actlr_el3);
|
||||
write_actlr_el2(actlr_el2);
|
||||
}
|
||||
#endif
|
||||
|
||||
void bl31_platform_setup(void)
|
||||
{
|
||||
/* Initialize the gic cpu and distributor interfaces */
|
||||
plat_arm_gic_driver_init();
|
||||
plat_arm_gic_init();
|
||||
zynqmp_testing_setup();
|
||||
}
|
||||
|
||||
void bl31_plat_runtime_setup(void)
|
||||
|
|
|
@ -201,4 +201,8 @@
|
|||
|
||||
#define ZYNQMP_CSU_VERSION_OFFSET 0x44
|
||||
|
||||
/* Access control register defines */
|
||||
#define ACTLR_EL3_L2ACTLR_BIT (1 << 6)
|
||||
#define ACTLR_EL3_CPUACTLR_BIT (1 << 0)
|
||||
|
||||
#endif /* __ZYNQMP_DEF_H__ */
|
||||
|
|
Loading…
Reference in New Issue