summaryrefslogtreecommitdiffstats
path: root/sys/dev/sio
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/sio')
-rw-r--r--sys/dev/sio/sio.c36
1 files changed, 7 insertions, 29 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index f1348c4..1f2590f 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -228,7 +228,7 @@ struct com_s {
struct pps_state pps;
int pps_bit;
-#ifdef ALT_BREAK_TO_DEBUGGER
+#ifdef KDB
int alt_brk_state;
#endif
@@ -1102,8 +1102,7 @@ determined_type: ;
}
if (ret)
device_printf(dev, "could not activate interrupt\n");
-#if defined(KDB) && (defined(BREAK_TO_DEBUGGER) || \
- defined(ALT_BREAK_TO_DEBUGGER))
+#if defined(KDB)
/*
* Enable interrupts for early break-to-debugger support
* on the console.
@@ -1196,8 +1195,7 @@ comclose(tp)
com->poll_output = FALSE;
sio_setreg(com, com_cfcr, com->cfcr_image &= ~CFCR_SBREAK);
-#if defined(KDB) && (defined(BREAK_TO_DEBUGGER) || \
- defined(ALT_BREAK_TO_DEBUGGER))
+#if defined(KDB)
/*
* Leave interrupts enabled and don't clear DTR if this is the
* console. This allows us to detect break-to-debugger events
@@ -1483,9 +1481,8 @@ siointr1(com)
u_char modem_status;
u_char *ioptr;
u_char recv_data;
-#if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER)
- int kdb_brk;
+#ifdef KDB
again:
#endif
@@ -1518,27 +1515,9 @@ again:
else
recv_data = inb(com->data_port);
#ifdef KDB
-#ifdef ALT_BREAK_TO_DEBUGGER
if (com->unit == comconsole &&
- (kdb_brk = kdb_alt_break(recv_data,
- &com->alt_brk_state)) != 0) {
- mtx_unlock_spin(&sio_lock);
- switch (kdb_brk) {
- case KDB_REQ_DEBUGGER:
- kdb_enter(KDB_WHY_BREAK,
- "Break sequence on console");
- break;
- case KDB_REQ_PANIC:
- kdb_panic("panic on console");
- break;
- case KDB_REQ_REBOOT:
- kdb_reboot();
- break;
- }
- mtx_lock_spin(&sio_lock);
+ kdb_alt_break(recv_data, &com->alt_brk_state) != 0)
goto again;
- }
-#endif /* ALT_BREAK_TO_DEBUGGER */
#endif /* KDB */
if (line_status & (LSR_BI | LSR_FE | LSR_PE)) {
/*
@@ -1554,10 +1533,9 @@ again:
* Note: BI together with FE/PE means just BI.
*/
if (line_status & LSR_BI) {
-#if defined(KDB) && defined(BREAK_TO_DEBUGGER)
+#if defined(KDB)
if (com->unit == comconsole) {
- kdb_enter(KDB_WHY_BREAK,
- "Line break on console");
+ kdb_break();
goto cont;
}
#endif
OpenPOWER on IntegriCloud