summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2002-01-21 05:11:30 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2002-01-21 05:11:30 +0000
commit98e45bf1197a11a967298403c1e805311bd5161c (patch)
treebdfd748f85bed4692568d18f661b4b4d251d100a
parent8a100aafbceee9ccb999a4cb08a6eafe5b6f25a0 (diff)
Respect db_console for "progammer button", for improved physical security.
-rw-r--r--sys/arch/macppc/dev/macintr.c6
-rw-r--r--sys/arch/macppc/dev/openpic.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/arch/macppc/dev/macintr.c b/sys/arch/macppc/dev/macintr.c
index b1da881d7c8..025faeefc2f 100644
--- a/sys/arch/macppc/dev/macintr.c
+++ b/sys/arch/macppc/dev/macintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macintr.c,v 1.7 2002/01/17 16:17:23 drahn Exp $ */
+/* $OpenBSD: macintr.c,v 1.8 2002/01/21 05:11:29 drahn Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -48,6 +48,7 @@
#include <sys/systm.h>
#include <uvm/uvm.h>
+#include <ddb/db_var.h>
#include <machine/autoconf.h>
#include <machine/intr.h>
@@ -209,7 +210,8 @@ int
macintr_prog_button (void *arg)
{
#ifdef DDB
- Debugger();
+ if (db_console)
+ Debugger();
#else
printf("programmer button pressed, debugger not available\n");
#endif
diff --git a/sys/arch/macppc/dev/openpic.c b/sys/arch/macppc/dev/openpic.c
index ae86ac25962..3e2f9ebd424 100644
--- a/sys/arch/macppc/dev/openpic.c
+++ b/sys/arch/macppc/dev/openpic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openpic.c,v 1.8 2002/01/17 16:17:23 drahn Exp $ */
+/* $OpenBSD: openpic.c,v 1.9 2002/01/21 05:11:29 drahn Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -48,6 +48,7 @@
#include <sys/systm.h>
#include <uvm/uvm.h>
+#include <ddb/db_var.h>
#include <machine/autoconf.h>
#include <machine/intr.h>
@@ -704,7 +705,8 @@ int
openpic_prog_button (void *arg)
{
#ifdef DDB
- Debugger();
+ if (db_console)
+ Debugger();
#else
printf("programmer button pressed, debugger not available\n");
#endif