Skip to contentSkip to conversation

riscv: fix the wrong swap value register

PATCH New Brad Kim 4 participants 4 messages Nov 13, 2020 – Nov 23, 2020 1 message not in the archive RISC-V

lore
Share & tools
lore

Brad Kim

author
#0 lore raw

PATCH 1/1 riscv: fix the wrong swap value register

Not s2 register, t1 register is correct Fortunately, it works because t1 register has a garbage value

---
 arch/riscv/cpu/start.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/cpu/start.S +1 -1
index bbc737ed9a..8589509e01 100644
@@ -123,7 +123,7 @@ call_board_init_f_0:
 	 * wait for initialization to complete.
 	 */
 	la	t0, hart_lottery
-	li	s2, 1
+	li	t1, 1
 	amoswap.w s2, t1, 0(t0)
 	bnez	s2, wait_for_gd_init
 #else
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 riscv: fix the wrong swap value register

Quoted 8 lines · Brad Kim

Not s2 register, t1 register is correct Fortunately, it works because t1 register has a garbage value

---
 arch/riscv/cpu/start.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks for catching this issue!

#2 lore raw

PATCH 1/1 riscv: fix the wrong swap value register

In reply to Brad Kim
Quoted 14 lines · Brad Kim

Not s2 register, t1 register is correct Fortunately, it works because t1 register has a garbage value

---
 arch/riscv/cpu/start.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/cpu/start.S +0 -0
index bbc737ed9a..8589509e01 100644

arch/riscv/cpu/start.S call_board_init_f_0: · line 129

Quoted 8 lines
arch/riscv/cpu/start.S +1 -1
@@ -123,7 +123,7 @@ call_board_init_f_0:
 	 * wait for initialization to complete.
 	 */
 	la	t0, hart_lottery
-	li	s2, 1
+	li	t1, 1
 	amoswap.w s2, t1, 0(t0)
 	bnez	s2, wait_for_gd_init
 #else

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

PATCH 1/1 riscv: fix the wrong swap value register

Quoted 6 lines

From: Brad Kim [mailto:brad.kim at semifive.com]
Sent: Friday, November 13, 2020 7:48 PM
To: Rick Jian-Zhi Chen(???); lukas.auer at aisec.fraunhofer.de
Cc: bmeng.cn at gmail.com; seanga2 at gmail.com; u-boot at lists.denx.de; Brad Kim
Subject: [PATCH] riscv: fix the wrong swap value register

Quoted 8 lines

Not s2 register, t1 register is correct Fortunately, it works because t1 register has a garbage value

---
 arch/riscv/cpu/start.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
arch/riscv/cpu/start.S +1 -2
index bbc737ed9a..8589509e01 100644
@@ -123,7 +123,7 @@ call_board_init_f_0:
         * wait for initialization to complete.
         */
        la      t0, hart_lottery
-       li      s2, 1
+       li      t1, 1
        amoswap.w s2, t1, 0(t0)
        bnez    s2, wait_for_gd_init
 #else
--

2.17.1