Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/mips u-boot on the ERLITE will call the kernel...



details:   https://anonhg.NetBSD.org/src/rev/6bd31f2057bb
branches:  trunk
changeset: 338335:6bd31f2057bb
user:      matt <matt%NetBSD.org@localhost>
date:      Tue May 19 00:00:23 2015 +0000

description:
u-boot on the ERLITE will call the kernel entry point on each cpu specified
in the coremask argument.  Add code to deal with that.

diffstat:

 sys/arch/mips/mips/locore.S |  24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diffs (38 lines):

diff -r 6d21e0eae082 -r 6bd31f2057bb sys/arch/mips/mips/locore.S
--- a/sys/arch/mips/mips/locore.S       Mon May 18 21:32:05 2015 +0000
+++ b/sys/arch/mips/mips/locore.S       Tue May 19 00:00:23 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.190 2013/03/01 18:25:47 joerg Exp $       */
+/*     $NetBSD: locore.S,v 1.191 2015/05/19 00:00:23 matt Exp $        */
 
 /*
  * Copyright (c) 1992, 1993
@@ -91,6 +91,28 @@
        mtc0    zero, MIPS_COP_0_STATUS         # Disable interrupts
        COP0_SYNC
 #endif
+#ifdef MIPS64_OCTEON
+       //
+       // U-boot on the erlite starts all cpus at the kernel entry point.
+       // Use EBASE to find our CPU number and if it's not 0, call
+       // octeon_cpu_spinup if MP or loop using the wait instruction since
+       // non-primary CPUs can't do anything useful.
+       //
+       mfc0    a0, $15, 1                      # EBASE
+       COP0_SYNC
+       and     a0, 0x1ff                       # get CPU number
+       beqz    a0, 2f                          # normal startup if 0
+       nop
+#ifdef MULTIPROCESSOR
+       j       _C_LABEL(octeon_cpu_spinup)
+       nop
+#else
+1:     wait
+       b       1b
+       nop
+#endif /* MIPS64_OCTEON */
+2:
+#endif
 /*
  * Initialize stack and call machine startup.
  */



Home | Main Index | Thread Index | Old Index