Rewrite of console_restart() with constructed trapframe.

Extract various state elements from the per-cpu-slot in hwrpb.
This commit is contained in:
ross 1999-07-11 22:37:12 +00:00
parent f9e083d969
commit 0f9e004fe3
1 changed files with 12 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: prom.c,v 1.36 1999/04/15 21:21:25 thorpej Exp $ */ /* $NetBSD: prom.c,v 1.37 1999/07/11 22:37:12 ross Exp $ */
/* /*
* Copyright (c) 1992, 1994, 1995, 1996 Carnegie Mellon University * Copyright (c) 1992, 1994, 1995, 1996 Carnegie Mellon University
@ -27,7 +27,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: prom.c,v 1.36 1999/04/15 21:21:25 thorpej Exp $"); __KERNEL_RCSID(0, "$NetBSD: prom.c,v 1.37 1999/07/11 22:37:12 ross Exp $");
#include "opt_multiprocessor.h" #include "opt_multiprocessor.h"
@ -344,8 +344,8 @@ hwrpb_restart_setup()
} }
u_int64_t u_int64_t
console_restart(ra, ai, pv) console_restart(framep)
u_int64_t ra, ai, pv; struct trapframe *framep;
{ {
struct pcs *p; struct pcs *p;
@ -353,6 +353,14 @@ console_restart(ra, ai, pv)
p = LOCATE_PCS(hwrpb, hwrpb->rpb_primary_cpu_id); p = LOCATE_PCS(hwrpb, hwrpb->rpb_primary_cpu_id);
p->pcs_flags &= ~PCS_RC; p->pcs_flags &= ~PCS_RC;
/* Fill in the missing frame slots */
framep->tf_regs[FRAME_PS] = p->pcs_halt_ps;
framep->tf_regs[FRAME_PC] = p->pcs_halt_pc;
framep->tf_regs[FRAME_T11] = p->pcs_halt_r25;
framep->tf_regs[FRAME_RA] = p->pcs_halt_r26;
framep->tf_regs[FRAME_T12] = p->pcs_halt_r27;
panic("user requested console halt"); panic("user requested console halt");
return (1); return (1);