kgdb support for the vr hpcmips machines.
From Ethan Solomita (ethan@geocast.com).
This commit is contained in:
parent
654400f740
commit
0e306bace6
|
@ -2,11 +2,11 @@
|
|||
# Distribution kernel (NEC VR based model) kernel config file
|
||||
|
||||
#
|
||||
# $NetBSD: GENERIC,v 1.57 2000/07/02 10:01:30 takemura Exp $
|
||||
# $NetBSD: GENERIC,v 1.58 2000/07/20 21:03:36 jeffs Exp $
|
||||
#
|
||||
include "arch/hpcmips/conf/std.hpcmips"
|
||||
|
||||
#ident "GENERIC-$Revision: 1.57 $"
|
||||
#ident "GENERIC-$Revision: 1.58 $"
|
||||
|
||||
maxusers 8
|
||||
|
||||
|
@ -22,6 +22,7 @@ options MIPS3_L2CACHE_ABSENT
|
|||
# Standard system options
|
||||
options DDB # in-kernel debugger
|
||||
#options DDB_ONPANIC=0 # don't enter debugger on panic
|
||||
#options KGDB # remote debugger
|
||||
#options DIAGNOSTIC # extra kernel debugging checks
|
||||
#options DEBUG # extra kernel debugging support
|
||||
options KTRACE # system call tracing support
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.29 2000/07/14 18:35:39 jeffs Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.30 2000/07/20 21:03:37 jeffs Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -43,7 +43,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.29 2000/07/14 18:35:39 jeffs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.30 2000/07/20 21:03:37 jeffs Exp $");
|
||||
|
||||
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
|
||||
#include "opt_vr41x1.h"
|
||||
|
@ -72,6 +72,10 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.29 2000/07/14 18:35:39 jeffs Exp $");
|
|||
#include <sys/syscallargs.h>
|
||||
#include <sys/kcore.h>
|
||||
|
||||
#ifdef KGDB
|
||||
#include <sys/kgdb.h>
|
||||
#endif
|
||||
|
||||
#include <uvm/uvm_extern.h>
|
||||
|
||||
#include <sys/sysctl.h>
|
||||
|
@ -390,13 +394,20 @@ mach_init(argc, argv, bi)
|
|||
/* Setup interrupt handler */
|
||||
(*platform.os_init)();
|
||||
|
||||
/* Initialize console. */
|
||||
/* Initialize console and KGDB serial port. */
|
||||
(*platform.cons_init)();
|
||||
|
||||
#if defined(DDB) || defined(KGDB)
|
||||
if (boothowto & RB_KDB) {
|
||||
#ifdef DDB
|
||||
if (boothowto & RB_KDB)
|
||||
Debugger();
|
||||
#endif
|
||||
#ifdef KGDB
|
||||
kgdb_debug_init = 1;
|
||||
kgdb_connect(1);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Find physical memory regions. */
|
||||
(*platform.mem_init)((paddr_t)kernend - MIPS_KSEG0_START);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: com_vrip.c,v 1.3 2000/02/11 03:20:21 takemura Exp $ */
|
||||
/* $NetBSD: com_vrip.c,v 1.4 2000/07/20 21:03:38 jeffs Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 SASAKI Takesi. All rights reserved.
|
||||
|
@ -126,11 +126,12 @@ find_comenableport_from_cfdata(int *port)
|
|||
}
|
||||
|
||||
int
|
||||
com_vrip_cnattach(iot, iobase, rate, frequency, cflag)
|
||||
com_vrip_cndb_attach(iot, iobase, rate, frequency, cflag, kgdb)
|
||||
bus_space_tag_t iot;
|
||||
int iobase;
|
||||
int rate, frequency;
|
||||
tcflag_t cflag;
|
||||
int kgdb;
|
||||
{
|
||||
int port;
|
||||
/* Platform dependent setting */
|
||||
|
@ -140,7 +141,12 @@ com_vrip_cnattach(iot, iobase, rate, frequency, cflag)
|
|||
|
||||
if (!com_vrip_common_probe(iot, iobase))
|
||||
return (EIO); /* I can't find appropriate error number. */
|
||||
return (comcnattach(iot, iobase, rate, frequency, cflag));
|
||||
#ifdef KGDB
|
||||
if (kgdb)
|
||||
return (com_kgdb_attach(iot, iobase, rate, frequency, cflag));
|
||||
else
|
||||
#endif
|
||||
return (comcnattach(iot, iobase, rate, frequency, cflag));
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: com_vripvar.h,v 1.1.1.1 1999/09/16 12:23:32 takemura Exp $ */
|
||||
/* $NetBSD: com_vripvar.h,v 1.2 2000/07/20 21:03:38 jeffs Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 SASAKI Takesi. All rights reserved.
|
||||
|
@ -34,4 +34,4 @@
|
|||
*
|
||||
*/
|
||||
|
||||
int com_vrip_cnattach __P((bus_space_tag_t, int, int, int, tcflag_t));
|
||||
int com_vrip_cndb_attach __P((bus_space_tag_t, int, int, int, tcflag_t, int));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vr.c,v 1.17 2000/05/02 17:45:16 uch Exp $ */
|
||||
/* $NetBSD: vr.c,v 1.18 2000/07/20 21:03:39 jeffs Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999
|
||||
|
@ -303,18 +303,30 @@ vr_cons_init()
|
|||
#endif
|
||||
|
||||
#if NCOM > 0
|
||||
#ifdef KGDB
|
||||
/* if KGDB is defined, always use the serial port for KGDB */
|
||||
/* Serial console */
|
||||
if(com_vrip_cndb_attach(
|
||||
system_bus_iot, 0x0c000000, 9600, VRCOM_FREQ,
|
||||
(TTYDEF_CFLAG & ~(CSIZE | PARENB)) | CS8, 1))
|
||||
{
|
||||
printf("%s(%d): can't init kgdb's serial port",
|
||||
__FILE__, __LINE__);
|
||||
}
|
||||
#else
|
||||
if (bootinfo->bi_cnuse & BI_CNUSE_SERIAL) {
|
||||
/* Serial console */
|
||||
mb_bus_space_init(); /* At this time, not initialized yet */
|
||||
if(com_vrip_cnattach(system_bus_iot, 0x0c000000, CONSPEED,
|
||||
VRCOM_FREQ,
|
||||
(TTYDEF_CFLAG & ~(CSIZE | PARENB)) | CS8)) {
|
||||
if(com_vrip_cndb_attach(
|
||||
system_bus_iot, 0x0c000000, CONSPEED, VRCOM_FREQ,
|
||||
(TTYDEF_CFLAG & ~(CSIZE | PARENB)) | CS8, 0))
|
||||
{
|
||||
printf("%s(%d): can't init serial console", __FILE__, __LINE__);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if NHPCFB > 0
|
||||
mb_bus_space_init(); /* At this time, not initialized yet */
|
||||
|
|
Loading…
Reference in New Issue