1. Remove cpu_exec_ecoff_hook
2. Invoke KGDB if booted with RB_KDB flag 3. Don't round up page address when zeroing BSS - this can overwrite debug symbols
This commit is contained in:
parent
688a84b1b2
commit
13de0e4f2b
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.17 2001/02/21 09:46:54 wdk Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.18 2001/03/11 09:19:31 wdk 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.17 2001/02/21 09:46:54 wdk Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.18 2001/03/11 09:19:31 wdk Exp $");
|
||||
|
||||
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
|
||||
|
||||
@ -114,8 +114,8 @@ vm_map_t exec_map = NULL;
|
||||
vm_map_t mb_map = NULL;
|
||||
vm_map_t phys_map = NULL;
|
||||
|
||||
int physmem; /* max supported memory, changes to actual */
|
||||
char *bootinfo = NULL; /* pointer to bootinfo structure */
|
||||
int physmem; /* max supported memory, changes to actual */
|
||||
char *bootinfo = NULL; /* pointer to bootinfo structure */
|
||||
|
||||
phys_ram_seg_t mem_clusters[VM_PHYSSEG_MAX];
|
||||
int mem_cluster_cnt;
|
||||
@ -123,6 +123,11 @@ int mem_cluster_cnt;
|
||||
void to_monitor __P((int)) __attribute__((__noreturn__));
|
||||
void prom_halt __P((int)) __attribute__((__noreturn__));
|
||||
|
||||
#ifdef KGDB
|
||||
void zs_kgdb_init __P((void));
|
||||
void kgdb_connect __P((int));
|
||||
#endif
|
||||
|
||||
struct evcnt soft_evcnt[IPL_NSOFT];
|
||||
|
||||
/*
|
||||
@ -235,7 +240,7 @@ mach_init(argc, argv, envp, bim, bip)
|
||||
|
||||
/* clear the BSS segment */
|
||||
kernend = (caddr_t)mips_round_page(end);
|
||||
bzero(edata, kernend - edata);
|
||||
bzero(edata, end - edata);
|
||||
|
||||
#ifdef DDB
|
||||
bi_syms = lookup_bootinfo(BTINFO_SYMTAB);
|
||||
@ -308,6 +313,11 @@ mach_init(argc, argv, envp, bim, bip)
|
||||
if (boothowto & RB_KDB)
|
||||
Debugger();
|
||||
#endif
|
||||
#ifdef KGDB
|
||||
zs_kgdb_init(); /* XXX */
|
||||
if (boothowto & RB_KDB)
|
||||
kgdb_connect(0);
|
||||
#endif
|
||||
|
||||
#ifdef MFS
|
||||
/*
|
||||
@ -788,23 +798,6 @@ memsize_scan(first)
|
||||
return mem;
|
||||
}
|
||||
|
||||
|
||||
#ifdef EXEC_ECOFF
|
||||
#include <sys/exec_ecoff.h>
|
||||
|
||||
int
|
||||
cpu_exec_ecoff_hook(p, epp)
|
||||
struct proc *p;
|
||||
struct exec_package *epp;
|
||||
{
|
||||
extern struct emul emul_netbsd;
|
||||
|
||||
epp->ep_emul = &emul_netbsd;
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Console initialization: called early on from main,
|
||||
* before vm init or startup. Do enough configuration
|
||||
@ -856,7 +849,4 @@ consinit()
|
||||
cn_tab = &consdev_zs;
|
||||
|
||||
(*cn_tab->cn_init)(cn_tab);
|
||||
#ifdef KGDB
|
||||
zs_kgdb_init(); /* XXX */
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user