summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2008-07-05 23:08:09 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2008-07-05 23:08:09 +0000
commita75a416edc11a8dfc3af0779a344e9ee609d999b (patch)
tree408ff1d26792ee7b4711a5391b37f6e7cbea8a8f /sys/arch/sparc64
parentba10d4c46424c95f7f5f82d8ee3893a87bcaa4fd (diff)
Copy OBP breakpoint vector from the PROM trap table into our own trap table.
This makes the kernel properly enter the prom upon halt on the v1280.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/sparc64/autoconf.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c
index dfdc7b5fa83..f48edc66011 100644
--- a/sys/arch/sparc64/sparc64/autoconf.c
+++ b/sys/arch/sparc64/sparc64/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.93 2008/07/04 18:48:45 kettenis Exp $ */
+/* $OpenBSD: autoconf.c,v 1.94 2008/07/05 23:08:08 kettenis Exp $ */
/* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */
/*
@@ -260,6 +260,7 @@ bootstrap(nctx)
int nctx;
{
extern int end; /* End of kernel */
+ struct trapvec *romtba;
#if defined(SUN4US) || defined(SUN4V)
char buf[32];
#endif
@@ -371,6 +372,15 @@ bootstrap(nctx)
}
#endif
+ /*
+ * Copy over the OBP breakpoint trap vector; OpenFirmware 5.x
+ * needs it to be able to return to the ok prompt.
+ */
+ romtba = (struct trapvec *)sparc_rdpr(tba);
+ bcopy(&romtba[T_MON_BREAKPOINT], &trapbase[T_MON_BREAKPOINT],
+ sizeof(struct trapvec));
+ flush((void *)trapbase);
+
ncpus = get_ncpus();
pmap_bootstrap(KERNBASE, (u_long)&end, nctx, ncpus);
}