[OpenBIOS] Latest SPARC64 & Milax update
Tarl.Neustaedter at Sun.COM
Fri Jan 1 21:02:36 CET 2010
Mark Cave-Ayland wrote:
> Stepping through with the debugger shows that it is now dying in the
> very last line of exec-file which reads:
> " to load-base init-program" evaluate
> So it looks as if we're very nearly there. My guess would be that
> OpenBIOS is dying somewhere within init-program. Does anyone know
> anything about what init-program should be doing under SPARC64? Has it
> ever been tested before?
In Sun's openboot, that's in go.fth (lives in obp/ach/sun4u/go.fth), and
it does an execute-buffer on whatever's in load-base, followed by
initializing the registers, trap-table and stack for the client
interface. Specifically (I can include this because it has been
: (init-program) ( -- )
cif-64 \ 64-Bit IEEE 1275 Client Interface
init-c-stack \ Erase any previous C stack state
\ Zero all the general registers.
0 to %g0 0 to %o0 0 to %l0 0 to %i0
0 to %g1 0 to %o1 0 to %l1 0 to %i1
0 to %g2 0 to %o2 0 to %l2 0 to %i2
0 to %g3 0 to %o3 0 to %l3 0 to %i3
0 to %g4 0 to %o4 0 to %l4 0 to %i4
0 to %g5 0 to %o5 0 to %l5 0 to %i5
0 to %g6 0 to %o6 0 to %l6 0 to %i6
0 to %g7 0 to %o7 0 to %l7 0 to %i7
cif-func() to %o4 \ IEEE 1275 Client Services Handler
%o6@ to %o6 \ C stack pointer
trap-table to %tba \ Set trap table
h# 0 to %y h# 4 to %fprs
h# 16 to %pstate h# 0d to %pil
7 to %cleanwin 0 to %otherwin
0 to %wstate 0 to %canrestore
6 to %cansave 0 to %cwp
h# 16 8 lshift to %tstate-c
\ Since we are initializing a stack, make sure we clear out previous saved
\ state indications. This affects ultra4v/savecpu.fth:restore-cpu-state,
\ which is invoked shortly after this.
0 to full-save?
sp@ saved-sp ! rp@ saved-rp ! \ Needed for later callbacks
state-valid on restartable? on
true to already-go?
RELEASE-SLAVE-INVALID release-slaves? l!
\ ..... other stuff ....
: init-program ( -- )
load-base file-size @ 'execute-buffer execute (init-program)
More information about the OpenBIOS