2000-04-23 Jiri Gaisler <jiri@gaisler.com>

* start.S: Modificatins to preserve the current CWP and adjust the
	WIM accordingly. This improves compatibility with the remote
	debugger and the mkprom prom-builder.
This commit is contained in:
Joel Sherrill
2001-04-24 20:49:11 +00:00
parent 6de4727fd2
commit f077f3322d
2 changed files with 15 additions and 5 deletions

View File

@@ -199,14 +199,18 @@ SYM(hard_reset):
/* Common initialisation */
set SYM(trap_table), %g1 ! Initialize TBR
set SYM(trap_table), %g1 ! Initialize TBR
mov %g1, %tbr
set WIM_INIT, %g1 ! Initialize WIM
mov %g1, %wim
mov %psr, %g1 ! Initialize WIM
add %g1, 1, %g2
and %g2, 0x7, %g2
set 1, %g3
sll %g3, %g2, %g3
mov %g3, %wim
set PSR_INIT, %g1
wr %g1, 0x20, %psr ! enable traps
or %g1, 0x20, %g1
wr %g1, %psr ! enable traps
nop
nop