CFE checks CPU Thread in a different way (using register $22):
mfc0    t1, C0_BCM_CONFIG, 3 # $22
li      t2, CP0_CMT_TPID # (1 << 31)
and     t1, t2
bnez    t1, 2f  # if we are running on thread 1, skip init
nop

Signed-off-by: Álvaro Fernández Rojas <nolt...@gmail.com>
---
 arch/mips/cpu/start.S | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/mips/cpu/start.S b/arch/mips/cpu/start.S
index 6740fdf..d91913b 100644
--- a/arch/mips/cpu/start.S
+++ b/arch/mips/cpu/start.S
@@ -151,8 +151,13 @@ reset:
         mfc0   t0, CP0_GLOBALNUMBER
 #endif
 
+#ifdef CONFIG_ARCH_BMIPS
+1:     mfc0    t0, CP0_DIAGNOSTIC, 3
+       and     t0, t0, (1 << 31)
+#else
 1:     mfc0    t0, CP0_EBASE
        and     t0, t0, EBASE_CPUNUM
+#endif
 
        /* Hang if this isn't the first CPU in the system */
 2:     beqz    t0, 4f
-- 
2.1.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to