From 2331a34f783b29a9a1fe86f5142d0a359cacb259 Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Fri, 13 Oct 2023 11:46:57 +0200 Subject: [PATCH] feat(stm32mp2): put back core 1 in wfi after debugger's halt The core 1 is put in wfi for pen holding. If a debugger halts the core, it causes the core to exit from wfi. Let the core to jump back in wfi when the debugger resumes the core's execution. Signed-off-by: Antonio Borneo Change-Id: I9b5607b05cdcde905dc4047af8d6f1292d53d701 --- plat/st/stm32mp2/aarch64/stm32mp2_helper.S | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plat/st/stm32mp2/aarch64/stm32mp2_helper.S b/plat/st/stm32mp2/aarch64/stm32mp2_helper.S index ed91c17f9..0df3e088d 100644 --- a/plat/st/stm32mp2/aarch64/stm32mp2_helper.S +++ b/plat/st/stm32mp2/aarch64/stm32mp2_helper.S @@ -33,9 +33,14 @@ endfunc platform_mem_init */ func plat_secondary_cold_boot_setup dsb sy +1: wfi - /* This shouldn't be reached */ - b . + /* + * This shouldn't be reached, but when a debugger halts the + * secondary core it causes exit from wfi. + * Put back the core in wfi. + */ + b 1b endfunc plat_secondary_cold_boot_setup /* ----------------------------------------------