From 9d2747e46225d332fdca0cac062d0dc3c8b2e8b8 Mon Sep 17 00:00:00 2001 From: pk Date: Sun, 20 Mar 1994 08:58:41 +0000 Subject: [PATCH] DDB support --- sys/arch/sparc/sparc/autoconf.c | 7 ++++++- sys/arch/sparc/sparc/pmap.c | 18 +++++++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c index 37a9ace18a40..8d72ac71ccdc 100644 --- a/sys/arch/sparc/sparc/autoconf.c +++ b/sys/arch/sparc/sparc/autoconf.c @@ -42,7 +42,7 @@ * @(#)autoconf.c 8.1 (Berkeley) 6/11/93 * * from: Header: autoconf.c,v 1.32 93/05/28 03:55:59 torek Exp (LBL) - * $Id: autoconf.c,v 1.7 1994/03/03 12:23:26 deraadt Exp $ + * $Id: autoconf.c,v 1.8 1994/03/20 09:01:09 pk Exp $ */ #include @@ -151,6 +151,11 @@ bootstrap() #ifdef KGDB zs_kgdb_init(); /* XXX */ #endif +#ifdef DDB + db_machine_init(); + ddb_init(); +#endif + /* * On SS1s, promvec->pv_v0bootargs->ba_argv[1] contains the flags * that were given after the boot command. On SS2s, pv_v0bootargs diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c index 6f255d4c2b03..1b28ad64a05c 100644 --- a/sys/arch/sparc/sparc/pmap.c +++ b/sys/arch/sparc/sparc/pmap.c @@ -42,7 +42,7 @@ * @(#)pmap.c 8.1 (Berkeley) 6/11/93 * * from: Header: pmap.c,v 1.39 93/04/20 11:17:12 torek Exp - * $Id: pmap.c,v 1.6 1994/03/03 16:14:57 pk Exp $ + * $Id: pmap.c,v 1.7 1994/03/20 08:58:41 pk Exp $ */ /* @@ -913,10 +913,6 @@ if(pm==NULL)panic("pv_changepte 1"); if (pm->pm_ctx) { extern vm_offset_t pager_sva, pager_eva; - /* - * Bizarreness: we never clear PG_W on - * pager pages, nor PG_NC on DVMA pages. - */ if (bic == PG_W && va >= pager_sva && va < pager_eva) continue; @@ -1175,6 +1171,10 @@ pmap_bootstrap(nmmu, nctx) register void (*rom_setmap)(int ctx, caddr_t va, int pmeg); int lastpage; extern char end[]; +#ifdef DDB + extern char *esym; + char *theend = end; +#endif extern caddr_t reserve_dumppages(caddr_t); kernel_pmap = (pmap_t)&kernel_pmap_store; @@ -1199,11 +1199,19 @@ pmap_bootstrap(nmmu, nctx) * Allocate and clear mmu entry and context structures. */ p = end; +#ifdef DDB + if (esym != 0) + theend = p = esym; +#endif mmuentry = me = (struct mmuentry *)p; p += nmmu * sizeof *me; ctxinfo = ci = (union ctxinfo *)p; p += nctx * sizeof *ci; +#ifdef DDB + bzero(theend, p - theend); +#else bzero(end, p - end); +#endif /* * Set up the `constants' for the call to vm_init()