fix(gicv3): restore scr_el3 after changing it

EL3's context is poorly defined as it is and polluting it further is not
a good idea. Put it back as it was before the function call.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I9d13c9517962b501246989fd2126d08410191784
This commit is contained in:
Boyan Karatotev 2023-03-23 12:46:53 +00:00
parent 0d1229473e
commit 1d0d5e4020

View file

@ -330,6 +330,8 @@ void gicv3_cpuif_enable(unsigned int proc_num)
/* Enable Group1 Secure interrupts */ /* Enable Group1 Secure interrupts */
write_icc_igrpen1_el3(read_icc_igrpen1_el3() | write_icc_igrpen1_el3(read_icc_igrpen1_el3() |
IGRPEN1_EL3_ENABLE_G1S_BIT); IGRPEN1_EL3_ENABLE_G1S_BIT);
/* and restore the original */
write_scr_el3(scr_el3);
isb(); isb();
/* Add DSB to ensure visibility of System register writes */ /* Add DSB to ensure visibility of System register writes */
dsb(); dsb();