[OpenBIOS] [commit] r1057 - trunk/openbios-devel/arch/sparc32

repository service svn at openbios.org
Sat May 12 13:43:57 CEST 2012


Author: blueswirl
Date: Sat May 12 13:43:57 2012
New Revision: 1057
URL: http://tracker.coreboot.org/trac/openbios/changeset/1057

Log:
Sparc32: avoid problems with SMP table

Check CPU ID if we're running on boot CPU. If so,
don't use SMP table information since it may contain
uninitialized or garbage values.

Signed-off-by: Blue Swirl <blauwirbel at gmail.com>

Modified:
   trunk/openbios-devel/arch/sparc32/entry.S

Modified: trunk/openbios-devel/arch/sparc32/entry.S
==============================================================================
--- trunk/openbios-devel/arch/sparc32/entry.S	Sat Apr 28 15:35:06 2012	(r1056)
+++ trunk/openbios-devel/arch/sparc32/entry.S	Sat May 12 13:43:57 2012	(r1057)
@@ -126,12 +126,23 @@
         set     0x2000, %g3
         sub     %g1, %g3, %g6
 
+        ! Check if this is the boot CPU and skip SMP table check if yes
+        ! XXX: not all CPUs should have MXCC
+        set     0x1c00f00, %g2
+        ldda    [%g2] ASI_CONTROL, %g2
+        srl     %g3, 24, %g7
+        sub     %g7, 8, %g7
+        tst     %g7
+        bz      skip_table
+         nop
+
         ! Calculate SMP table location
 	set	0x1f0c, %g2
         add     %g6, %g2, %g2                 ! valid?
         lda     [%g2] ASI_M_BYPASS, %g7
         sta     %g0, [%g2] ASI_M_BYPASS
 
+skip_table:
         ! Get machine ID from configuration device
         mov     FW_CFG_MACHINE_ID, %g2
         sub     %g5, 2, %g5



More information about the OpenBIOS mailing list