mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00
fix(stm32mp2): correct early/crash console init
The previous code used 64-bit registers as the target and source for load and store operations on 32-bit hardware registers. In certain cases (e.g., when using USART1 as the debug console), this could result in deadlocks where the A35 gets stuck in a permanent loop due to test conditions that are never fulfilled. To resolve this issue, 32-bit registers are now used for these operations. Change-Id: Id2c03a1df26738fe815079da042cc2dd989f4f8e Signed-off-by: Boerge Struempfel <boerge.struempfel@gmail.com>
This commit is contained in:
parent
bba792b165
commit
23647bd52c
1 changed files with 10 additions and 10 deletions
|
@ -90,19 +90,19 @@ endfunc plat_my_core_pos
|
||||||
func plat_crash_console_init
|
func plat_crash_console_init
|
||||||
/* Reset UART peripheral */
|
/* Reset UART peripheral */
|
||||||
mov_imm x1, (RCC_BASE + DEBUG_UART_RST_REG)
|
mov_imm x1, (RCC_BASE + DEBUG_UART_RST_REG)
|
||||||
ldr x2, =DEBUG_UART_RST_BIT
|
ldr w2, =DEBUG_UART_RST_BIT
|
||||||
ldr x0, [x1]
|
ldr w0, [x1]
|
||||||
orr x0, x0, x2
|
orr w0, w0, w2
|
||||||
str x0, [x1]
|
str w0, [x1]
|
||||||
1:
|
1:
|
||||||
ldr x0, [x1]
|
ldr w0, [x1]
|
||||||
tst x0, #DEBUG_UART_RST_BIT
|
tst w0, #DEBUG_UART_RST_BIT
|
||||||
beq 1b
|
beq 1b
|
||||||
bic x0, x0, #DEBUG_UART_RST_BIT
|
bic w0, w0, #DEBUG_UART_RST_BIT
|
||||||
str x0, [x1]
|
str w0, [x1]
|
||||||
2:
|
2:
|
||||||
ldr x0, [x1]
|
ldr w0, [x1]
|
||||||
tst x0, #DEBUG_UART_RST_BIT
|
tst w0, #DEBUG_UART_RST_BIT
|
||||||
bne 2b
|
bne 2b
|
||||||
/* Enable GPIOs for UART TX */
|
/* Enable GPIOs for UART TX */
|
||||||
mov_imm x1, (RCC_BASE + DEBUG_UART_TX_GPIO_BANK_CLK_REG)
|
mov_imm x1, (RCC_BASE + DEBUG_UART_TX_GPIO_BANK_CLK_REG)
|
||||||
|
|
Loading…
Add table
Reference in a new issue