Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Mar 2010 20:12:43 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r205924 - stable/8/sys/sparc64/sparc64
Message-ID:  <201003302012.o2UKChox082878@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Tue Mar 30 20:12:42 2010
New Revision: 205924
URL: http://svn.freebsd.org/changeset/base/205924

Log:
  MFC: r203833
  
  - At least the trap table of the Sun Fire V1280 firmware apparently has
    no cleanwindows handler so just remove trying to trigger it from _start
    and the AP trampoline code as that leads to a crash there. This should
    be okay as leaking data from the OFW via the CPU registers on start of
    the kernel should be no real concern.
  - Make the comments of _start and the AP trampoline code regarding the
    initializations they perform match each other and reality.
  - Make the comments of the AP trampoline code regarding iTLB accesses
    refer to the right macro.

Modified:
  stable/8/sys/sparc64/sparc64/locore.S
  stable/8/sys/sparc64/sparc64/mp_locore.S
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/sparc64/sparc64/locore.S
==============================================================================
--- stable/8/sys/sparc64/sparc64/locore.S	Tue Mar 30 20:05:22 2010	(r205923)
+++ stable/8/sys/sparc64/sparc64/locore.S	Tue Mar 30 20:12:42 2010	(r205924)
@@ -46,12 +46,14 @@ ENTRY(btext)
 ENTRY(_start)
 	/*
 	 * Initialize misc. state to known values: interrupts disabled, normal
-	 * globals, windows flushed (cr = 0, cs = nwindows - 1), no clean
-	 * windows, pil 0, and floating point disabled.
+	 * globals, windows flushed (cr = 0, cs = nwindows - 1), PIL 0 and
+	 * floating point disabled.
+	 * Note that some firmware versions don't implement a clean window
+	 * trap handler so we unfortunately can't clear the windows by setting
+	 * %cleanwin to zero here.
 	 */
 	wrpr	%g0, PSTATE_NORMAL, %pstate
 	flushw
-	wrpr	%g0, 0, %cleanwin
 	wrpr	%g0, 0, %pil
 	wr	%g0, 0, %fprs
 

Modified: stable/8/sys/sparc64/sparc64/mp_locore.S
==============================================================================
--- stable/8/sys/sparc64/sparc64/mp_locore.S	Tue Mar 30 20:05:22 2010	(r205923)
+++ stable/8/sys/sparc64/sparc64/mp_locore.S	Tue Mar 30 20:12:42 2010	(r205924)
@@ -44,12 +44,14 @@ __FBSDID("$FreeBSD$");
 	.text
 	_ALIGN_TEXT
 	/*
-	 * Initialize misc. state to known values: interrupts disabled,
-	 * normal globals, no clean windows, PIL 0, and floating point
-	 * disabled.
+	 * Initialize misc. state to known values: interrupts disabled, normal
+	 * globals, windows flushed (cr = 0, cs = nwindows - 1), PIL 0 and
+	 * floating point disabled.
+	 * Note that some firmware versions don't implement a clean window
+	 * trap handler so we unfortunately can't clear the windows by setting
+	 * %cleanwin to zero here.
 	 */
 1:	wrpr	%g0, PSTATE_NORMAL, %pstate
-	wrpr	%g0, 0, %cleanwin
 	wrpr	%g0, 0, %pil
 	wr	%g0, 0, %fprs
 
@@ -68,7 +70,7 @@ __FBSDID("$FreeBSD$");
 
 	setx	TD_V | TD_L, %l1, %l0
 	/*
-	 * We read ASI_DTLB_DATA_ACCESS_REG twice in order to work
+	 * We read ASI_ITLB_DATA_ACCESS_REG twice in order to work
 	 * around errata of USIII and beyond.
 	 */
 	ldxa	[%g0] ASI_ITLB_DATA_ACCESS_REG, %g0
@@ -94,7 +96,7 @@ __FBSDID("$FreeBSD$");
 	mov	(1 << TLB_DAR_SLOT_SHIFT), %l4
 	setx	TD_V, %l1, %l0
 	/*
-	 * We read ASI_DTLB_DATA_ACCESS_REG twice in order to work
+	 * We read ASI_ITLB_DATA_ACCESS_REG twice in order to work
 	 * around errata of USIII and beyond.
 	 */
 2:	ldxa	[%l4] ASI_ITLB_DATA_ACCESS_REG, %g0
@@ -136,7 +138,7 @@ __FBSDID("$FreeBSD$");
 	mov	(1 << TLB_DAR_SLOT_SHIFT), %l0
 	setx	TD_V, %o1, %o0
 	/*
-	 * We read ASI_DTLB_DATA_ACCESS_REG twice in order to work
+	 * We read ASI_ITLB_DATA_ACCESS_REG twice in order to work
 	 * around errata of USIII and beyond.
 	 */
 5:	ldxa	[%l0] ASI_ITLB_DATA_ACCESS_REG, %g0



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003302012.o2UKChox082878>