From owner-svn-src-head@FreeBSD.ORG Sat Feb 13 15:36:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DB4A106566B; Sat, 13 Feb 2010 15:36:34 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FAC18FC15; Sat, 13 Feb 2010 15:36:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1DFaYpa031718; Sat, 13 Feb 2010 15:36:34 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1DFaYmX031713; Sat, 13 Feb 2010 15:36:34 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201002131536.o1DFaYmX031713@svn.freebsd.org> From: Marius Strobl Date: Sat, 13 Feb 2010 15:36:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203833 - head/sys/sparc64/sparc64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2010 15:36:34 -0000 Author: marius Date: Sat Feb 13 15:36:33 2010 New Revision: 203833 URL: http://svn.freebsd.org/changeset/base/203833 Log: - 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: head/sys/sparc64/sparc64/locore.S head/sys/sparc64/sparc64/mp_locore.S Modified: head/sys/sparc64/sparc64/locore.S ============================================================================== --- head/sys/sparc64/sparc64/locore.S Sat Feb 13 15:35:51 2010 (r203832) +++ head/sys/sparc64/sparc64/locore.S Sat Feb 13 15:36:33 2010 (r203833) @@ -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: head/sys/sparc64/sparc64/mp_locore.S ============================================================================== --- head/sys/sparc64/sparc64/mp_locore.S Sat Feb 13 15:35:51 2010 (r203832) +++ head/sys/sparc64/sparc64/mp_locore.S Sat Feb 13 15:36:33 2010 (r203833) @@ -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