add reset-all and reset for sparc32

git-svn-id: svn://coreboot.org/openbios/openbios-devel@48 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Stefan Reinauer
2006-06-05 20:34:53 +00:00
parent 96b249474d
commit 9f386f64bd
3 changed files with 23 additions and 8 deletions

View File

@@ -51,6 +51,13 @@
; CONSOLE-IN-initializer
device-end
: sparc32-reset-all
h# 71f00000 1 iow!
;
' sparc32-reset-all to reset-all
: rmap@ ( virt -- rmentry )
drop 0
;

View File

@@ -413,7 +413,7 @@ static int obp_cpuresume(__attribute__((unused)) unsigned int whichcpu)
return 0;
}
void v2_eval(char *str)
static void obp_fortheval_v2(char *str)
{
// for now, move something to the stack so we
// don't get a stack underrun.
@@ -422,11 +422,10 @@ void v2_eval(char *str)
//
fword("0");
fword("0");
DPRINTF("\n---------------\n");
DPRINTF(" %s", str);
DPRINTF("\n---------------\n");
feval(str);
DPRINTF("\n---------------\n");
DPRINTF("obp_fortheval_v2(%s)\n", str);
push_str(str);
fword("eval");
}
void *
@@ -476,7 +475,7 @@ init_openprom(unsigned long memsize, const char *cmdline, char boot_device)
romvec0.pv_halt = obp_halt;
romvec0.pv_synchook = &sync_hook;
romvec0.pv_v0bootargs = &obp_argp;
romvec0.pv_fortheval.v2_eval = v2_eval;
romvec0.pv_fortheval.v2_eval = obp_fortheval_v2;
romvec0.pv_v2devops.v2_inst2pkg = obp_inst2pkg;
romvec0.pv_v2devops.v2_dumb_mmap = obp_dumb_mmap;
romvec0.pv_v2devops.v2_dumb_munmap = obp_dumb_munmap;

View File

@@ -1,5 +1,14 @@
\ 7.4.7 Reset
: reset-all ( -- )
defer reset-all ( -- )
: no-reset-all
s" reset-all is not available on this platform." type cr
;
' no-reset-all to reset-all
\ OpenBOOT knows reset as well.
: reset reset-all ;