diff options
author | marius <marius@FreeBSD.org> | 2010-02-13 15:36:33 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2010-02-13 15:36:33 +0000 |
commit | 84d671e3911041ffcdd18cb939006fec60e0abec (patch) | |
tree | 907bd7e054da71a9bd33d6850aa01c28ba3ecae7 | |
parent | 1f07dfb1def8bd09a90fc8f38506b96a24c44b38 (diff) | |
download | FreeBSD-src-84d671e3911041ffcdd18cb939006fec60e0abec.zip FreeBSD-src-84d671e3911041ffcdd18cb939006fec60e0abec.tar.gz |
- 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.
-rw-r--r-- | sys/sparc64/sparc64/locore.S | 8 | ||||
-rw-r--r-- | sys/sparc64/sparc64/mp_locore.S | 16 |
2 files changed, 14 insertions, 10 deletions
diff --git a/sys/sparc64/sparc64/locore.S b/sys/sparc64/sparc64/locore.S index 8c1043e..ac6659b 100644 --- a/sys/sparc64/sparc64/locore.S +++ b/sys/sparc64/sparc64/locore.S @@ -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 diff --git a/sys/sparc64/sparc64/mp_locore.S b/sys/sparc64/sparc64/mp_locore.S index e8b2a95..b089a2b 100644 --- a/sys/sparc64/sparc64/mp_locore.S +++ b/sys/sparc64/sparc64/mp_locore.S @@ -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 |