1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-03 09:00:21 +00:00

Follow up to r225203 refining break-to-debugger run-time configuration

improvements:

(1) Implement new model in previously missed at91 UART driver
(2) Move BREAK_TO_DEBUGGER and ALT_BREAK_TO_DEBUGGER from opt_comconsole.h
    to opt_kdb.h (spotted by np)
(3) Garbage collect now-unused opt_comconsole.h

MFC after:	3 weeks
Approved by:	re (bz)
This commit is contained in:
Robert Watson 2011-08-27 14:24:27 +00:00
parent 3d07127c64
commit e5a0927394
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=225214
12 changed files with 7 additions and 42 deletions

View File

@ -29,8 +29,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_comconsole.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
@ -485,25 +483,10 @@ at91_usart_bus_param(struct uart_softc *sc, int baudrate, int databits,
static __inline void
at91_rx_put(struct uart_softc *sc, int key)
{
#if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER)
int kdb_brk;
if (sc->sc_sysdev != NULL && sc->sc_sysdev->type == UART_DEV_CONSOLE) {
if ((kdb_brk = kdb_alt_break(key, &sc->sc_altbrk)) != 0) {
switch (kdb_brk) {
case KDB_REQ_DEBUGGER:
kdb_enter(KDB_WHY_BREAK,
"Break sequence on console");
break;
case KDB_REQ_PANIC:
kdb_panic("Panic sequence on console");
break;
case KDB_REQ_REBOOT:
kdb_reboot();
break;
}
}
}
#if defined(KDB)
if (sc->sc_sysdev != NULL && sc->sc_sysdev->type == UART_DEV_CONSOLE)
kdb_alt_break(key, &sc->sc_altbrk);
#endif
uart_rx_put(sc, key);
}

View File

@ -47,6 +47,8 @@ TWA_DEBUG opt_twa.h
TWA_FLASH_FIRMWARE opt_twa.h
# Debugging options.
ALT_BREAK_TO_DEBUGGER opt_kdb.h
BREAK_TO_DEBUGGER opt_kdb.h
DDB
DDB_BUFR_SIZE opt_ddb.h
DDB_CAPTURE_DEFAULTBUFSIZE opt_ddb.h
@ -637,9 +639,6 @@ BKTR_SIS_VIA_MODE opt_bktr.h
BKTR_USE_FREEBSD_SMBUS opt_bktr.h
BKTR_NEW_MSP34XX_DRIVER opt_bktr.h
BREAK_TO_DEBUGGER opt_comconsole.h
ALT_BREAK_TO_DEBUGGER opt_comconsole.h
# Options to support PPS
UART_PPS_ON_CTS opt_uart.h

View File

@ -35,8 +35,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_comconsole.h"
#include <sys/param.h>
#include <vm/vm.h>

View File

@ -27,8 +27,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_comconsole.h"
#include <sys/param.h>
#include <sys/kdb.h>
#include <sys/kernel.h>

View File

@ -64,7 +64,6 @@
#include <vm/vm_param.h>
#include <vm/pmap.h>
#include "opt_comconsole.h"
#include "opt_dcons.h"
#include "opt_kdb.h"
#include "opt_gdb.h"

View File

@ -26,7 +26,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_comconsole.h"
#include "opt_ofw.h"
#include <sys/param.h>

View File

@ -33,7 +33,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_comconsole.h"
#include "opt_compat.h"
#include "opt_gdb.h"
#include "opt_kdb.h"

View File

@ -27,10 +27,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#ifndef KLD_MODULE
#include "opt_comconsole.h"
#endif
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>

View File

@ -5,7 +5,7 @@
KMOD = dcons
SRCS = dcons.c dcons.h dcons_os.c dcons_os.h \
opt_dcons.h opt_kdb.h opt_ddb.h opt_gdb.h opt_comconsole.h
opt_dcons.h opt_kdb.h opt_ddb.h opt_gdb.h
.if !defined(KERNBUILDDIR)
opt_kdb.h:
@ -13,9 +13,6 @@ opt_kdb.h:
opt_ddb.h:
echo "#define DDB 1" > $@
opt_comconsole.h:
echo "#define ALT_BREAK_TO_DEBUGGER 1" > $@
.endif
CFLAGS+= -I${.CURDIR}/../..

View File

@ -7,7 +7,7 @@
KMOD= sio
SRCS= bus_if.h card_if.h device_if.h isa_if.h pci_if.h serdev_if.h \
opt_comconsole.h opt_compat.h opt_gdb.h opt_kdb.h opt_sio.h \
opt_compat.h opt_gdb.h opt_kdb.h opt_sio.h \
sio.c sio_pccard.c sio_pci.c sio_puc.c pccarddevs.h
.if ${MACHINE} == "pc98"
SRCS+= sio_cbus.c

View File

@ -31,7 +31,6 @@
* from: i386/isa sio.c,v 1.234
*/
#include "opt_comconsole.h"
#include "opt_compat.h"
#include "opt_gdb.h"
#include "opt_kdb.h"

View File

@ -25,8 +25,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_comconsole.h"
#include <sys/param.h>
#include <sys/kdb.h>
#include <sys/kernel.h>