1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

- 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.
This commit is contained in:
Marius Strobl 2010-02-13 15:36:33 +00:00
parent 8c56bcac75
commit dfade4c0a4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=203833
2 changed files with 14 additions and 10 deletions

View File

@ -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

View File

@ -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