From d2e1f6a8811e52505556f7b91156499d82488751 Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Thu, 11 Jan 2024 14:55:55 -0600 Subject: [PATCH] fix(ti): do not stop non-secure timer on world switch As stated in the commit introducing the NS_TIMER_SWITCH build flag, saving/restoring this registers causes the non-secure timer to stop while in the secure world and non-secure timer interrupts are prevented from asserting until we return to the non-secure world. This breaks any realtime OS on the non-secure side that uses this timer for realtime scheduling. This flag is by default off, but OP-TEE SPD enables it. The K3 OP-TEE platform makes no use of these registers and we would like to have support for realtime OSs while also supporting the OP-TEE SPD. Disable this flag in our platform definition. Signed-off-by: Andrew Davis Change-Id: I65055512d897b93b7690fd63c734f4731a6e09e6 --- plat/ti/k3/common/plat_common.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plat/ti/k3/common/plat_common.mk b/plat/ti/k3/common/plat_common.mk index 23efa3194..8db732cb6 100644 --- a/plat/ti/k3/common/plat_common.mk +++ b/plat/ti/k3/common/plat_common.mk @@ -28,6 +28,8 @@ ERRATA_A72_1319367 := 1 CRASH_REPORTING := 1 +NS_TIMER_SWITCH := 0 + # Split out RO data into a non-executable section SEPARATE_CODE_AND_RODATA := 1