Enable timer after trap table is initialized

Signed-off-by: igor.v.kovalenko@gmail.com
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@563 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
igor.v.kovalenko
2009-08-21 19:15:55 +00:00
committed by Blue Swirl
parent b26b3c4391
commit 6433c74bf7

View File

@@ -47,8 +47,8 @@ entry:
wrpr %g0, 0, %canrestore
wrpr %g0, 0, %otherwin
wrpr %g0, 0, %wstate
! 100 Hz timer
set 10 * 1000 * 1000, %g1
! disable timer now
setx 0x8000000000000000, %g2, %g1
wr %g1, 0, %tick_cmpr
! Disable I/D MMUs and caches
@@ -319,6 +319,12 @@ lowmem:
/* Finally, turn on traps so that we can call c-code. */
wrpr %g0, (PSTATE_PRIV|PSTATE_PEF|PSTATE_IE), %pstate
! 100 Hz timer
rd %tick, %g2
set 10 * 1000 * 1000, %g1
add %g1, %g2, %g1
wr %g1, 0, %tick_cmpr
/* Switch to our main context.
* Main context is statically defined in C.
*/