From: Boyan Karatotev Date: Thu, 23 Mar 2023 12:46:53 +0000 (+0000) Subject: fix(gicv3): restore scr_el3 after changing it X-Git-Tag: baikal/aarch64/sdk5.10~1^2~28^2 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=1d0d5e40206c693e24b0a4de7dbcfc4b79f3138e;p=arm-tf.git 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 Change-Id: I9d13c9517962b501246989fd2126d08410191784 --- diff --git a/drivers/arm/gic/v3/gicv3_main.c b/drivers/arm/gic/v3/gicv3_main.c index 168d0ebc9..2c7480001 100644 --- a/drivers/arm/gic/v3/gicv3_main.c +++ b/drivers/arm/gic/v3/gicv3_main.c @@ -330,6 +330,8 @@ void gicv3_cpuif_enable(unsigned int proc_num) /* Enable Group1 Secure interrupts */ write_icc_igrpen1_el3(read_icc_igrpen1_el3() | IGRPEN1_EL3_ENABLE_G1S_BIT); + /* and restore the original */ + write_scr_el3(scr_el3); isb(); /* Add DSB to ensure visibility of System register writes */ dsb();