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); }
void enable_ns_access_to_cpuectlr(void) { unsigned int next_actlr; /* ACTLR_EL1 do not implement CUPECTLR */ next_actlr = read_actlr_el2(); next_actlr |= ACTLR_CPUECTLR_BIT; write_actlr_el2(next_actlr); next_actlr = read_actlr_el3(); next_actlr |= ACTLR_CPUECTLR_BIT; write_actlr_el3(next_actlr); }