diff --git a/sys/arch/amiga/amiga/amiga_init.c b/sys/arch/amiga/amiga/amiga_init.c index cdaed989a746..cdd5f2c1c163 100644 --- a/sys/arch/amiga/amiga/amiga_init.c +++ b/sys/arch/amiga/amiga/amiga_init.c @@ -1,4 +1,4 @@ -/* $NetBSD: amiga_init.c,v 1.105 2009/01/04 04:18:35 tsutsui Exp $ */ +/* $NetBSD: amiga_init.c,v 1.106 2009/01/17 07:17:35 tsutsui Exp $ */ /* * Copyright (c) 1994 Michael L. Hitch @@ -36,7 +36,7 @@ #include "opt_devreload.h" #include -__KERNEL_RCSID(0, "$NetBSD: amiga_init.c,v 1.105 2009/01/04 04:18:35 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amiga_init.c,v 1.106 2009/01/17 07:17:35 tsutsui Exp $"); #include #include @@ -68,11 +68,8 @@ __KERNEL_RCSID(0, "$NetBSD: amiga_init.c,v 1.105 2009/01/04 04:18:35 tsutsui Exp #define RELOC(v, t) *((t*)((u_int)&(v) + loadbase)) extern u_int lowram; -extern u_int Sysptsize, Umap, proc0paddr; -extern pt_entry_t *Sysptmap; -extern st_entry_t *Sysseg; +extern u_int Umap, proc0paddr; extern u_int Sysseg_pa; -extern u_int virtual_avail; #if defined(M68040) || defined(M68060) extern int protostfree; #endif diff --git a/sys/arch/amiga/amiga/pmap.c b/sys/arch/amiga/amiga/pmap.c index 38e173431567..8683cde4a10b 100644 --- a/sys/arch/amiga/amiga/pmap.c +++ b/sys/arch/amiga/amiga/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.146 2009/01/01 08:13:23 tsutsui Exp $ */ +/* $NetBSD: pmap.c,v 1.147 2009/01/17 07:17:35 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -100,7 +100,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.146 2009/01/01 08:13:23 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.147 2009/01/17 07:17:35 tsutsui Exp $"); #include #include @@ -236,7 +236,7 @@ static void pmap_pvdump(paddr_t); * convert to a vax protection code. */ #define pte_prot(m, p) (protection_codes[p]) -int protection_codes[8]; +u_int protection_codes[8]; /* * Kernel page table page management. diff --git a/sys/arch/amiga/amiga/pmap_bootstrap.c b/sys/arch/amiga/amiga/pmap_bootstrap.c index b053a175b176..e3360e86ff17 100644 --- a/sys/arch/amiga/amiga/pmap_bootstrap.c +++ b/sys/arch/amiga/amiga/pmap_bootstrap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.4 2008/12/31 10:02:30 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.5 2009/01/17 07:17:35 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.4 2008/12/31 10:02:30 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.5 2009/01/17 07:17:35 tsutsui Exp $"); #include #include @@ -85,12 +85,8 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.4 2008/12/31 10:02:30 tsutsui E u_int Sysseg_pa; -extern st_entry_t *Sysseg; extern paddr_t avail_start; extern paddr_t avail_end; -extern vsize_t mem_size; -extern vaddr_t virtual_avail; -extern vaddr_t virtual_end; #if defined(M68040) || defined(M68060) extern int protostfree; #endif @@ -109,8 +105,6 @@ extern vaddr_t reserve_dumppages(vaddr_t); void *CADDR1, *CADDR2; char *vmmap; -extern int protection_codes[]; - /* * Bootstrap the system enough to run with virtual memory. * @@ -207,9 +201,9 @@ pmap_bootstrap(firstaddr, loadaddr) * absolute "jmp" table. */ { - int *kp; + u_int *kp; - kp = (int *)&protection_codes; + kp = (u_int *)&protection_codes; kp[VM_PROT_NONE|VM_PROT_NONE|VM_PROT_NONE] = 0; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_NONE] = PG_RO; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_EXECUTE] = PG_RO; diff --git a/sys/arch/atari/atari/atari_init.c b/sys/arch/atari/atari/atari_init.c index 7a9e9618d6c7..f27e06b7b0ad 100644 --- a/sys/arch/atari/atari/atari_init.c +++ b/sys/arch/atari/atari/atari_init.c @@ -1,4 +1,4 @@ -/* $NetBSD: atari_init.c,v 1.72 2009/01/04 04:18:36 tsutsui Exp $ */ +/* $NetBSD: atari_init.c,v 1.73 2009/01/17 07:17:35 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.72 2009/01/04 04:18:36 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.73 2009/01/17 07:17:35 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_mbtype.h" @@ -118,11 +118,8 @@ int iomem_malloc_safe; static cpu_kcore_hdr_t cpu_kcore_hdr; extern u_int lowram; -extern u_int Sysptsize, proc0paddr; -extern pt_entry_t *Sysptmap; -extern st_entry_t *Sysseg; +extern u_int proc0paddr; int machineid, mmutype, cputype, astpending; -char *vmmap; #if defined(M68040) || defined(M68060) extern int protostfree; #endif diff --git a/sys/arch/atari/atari/pmap.c b/sys/arch/atari/atari/pmap.c index 3334a87924de..80574a668e20 100644 --- a/sys/arch/atari/atari/pmap.c +++ b/sys/arch/atari/atari/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.112 2009/01/01 08:11:45 tsutsui Exp $ */ +/* $NetBSD: pmap.c,v 1.113 2009/01/17 07:17:35 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -100,7 +100,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.112 2009/01/01 08:11:45 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.113 2009/01/17 07:17:35 tsutsui Exp $"); #include #include @@ -235,7 +235,7 @@ static void pmap_pvdump(paddr_t); * convert to a vax protection code. */ #define pte_prot(m, p) (protection_codes[p]) -int protection_codes[8]; +u_int protection_codes[8]; /* * Kernel page table page management. diff --git a/sys/arch/atari/atari/pmap_bootstrap.c b/sys/arch/atari/atari/pmap_bootstrap.c index 67b422b2c6bc..360e52616f56 100644 --- a/sys/arch/atari/atari/pmap_bootstrap.c +++ b/sys/arch/atari/atari/pmap_bootstrap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.1 2009/01/01 04:10:25 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.2 2009/01/17 07:17:35 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -82,19 +82,12 @@ struct memseg boot_segs[NMEM_SEGS]; struct memseg usable_segs[NMEM_SEGS]; -extern st_entry_t *Sysseg; -extern pt_entry_t *Sysmap; - extern paddr_t avail_start; extern paddr_t avail_end; -extern vsize_t mem_size; -extern vaddr_t virtual_avail; -extern vaddr_t virtual_end; #if defined(M68040) || defined(M68060) extern int protostfree; #endif -extern void * msgbufaddr; extern paddr_t msgbufpa; /* @@ -103,8 +96,6 @@ extern paddr_t msgbufpa; void *CADDR1, *CADDR2; char *vmmap; -extern int protection_codes[]; - /* * Bootstrap the system enough to run with virtual memory. * @@ -164,9 +155,9 @@ pmap_bootstrap(vaddr_t vstart, paddr_t sysseg_pa) * absolute "jmp" table. */ { - int *kp; + u_int *kp; - kp = (int *)&protection_codes; + kp = (u_int *)&protection_codes; kp[VM_PROT_NONE|VM_PROT_NONE|VM_PROT_NONE] = 0; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_NONE] = PG_RO; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_EXECUTE] = PG_RO; diff --git a/sys/arch/cesfic/cesfic/machdep.c b/sys/arch/cesfic/cesfic/machdep.c index 2536ca4be06f..53dd85ac0884 100644 --- a/sys/arch/cesfic/cesfic/machdep.c +++ b/sys/arch/cesfic/cesfic/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.45 2008/11/30 18:21:32 martin Exp $ */ +/* $NetBSD: machdep.c,v 1.46 2009/01/17 07:17:35 tsutsui Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.45 2008/11/30 18:21:32 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.46 2009/01/17 07:17:35 tsutsui Exp $"); #include "opt_bufcache.h" #include "opt_ddb.h" @@ -150,8 +150,6 @@ struct cpu_info cpu_info_store; struct vm_map *mb_map = NULL; struct vm_map *phys_map = NULL; -extern vaddr_t virtual_avail; - /* * Declare these as initialized data so we can patch them. */ diff --git a/sys/arch/cesfic/cesfic/pmap_bootstrap.c b/sys/arch/cesfic/cesfic/pmap_bootstrap.c index e352800002ec..16cdca8d833a 100644 --- a/sys/arch/cesfic/cesfic/pmap_bootstrap.c +++ b/sys/arch/cesfic/cesfic/pmap_bootstrap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.13 2008/12/28 05:15:59 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.14 2009/01/17 07:17:35 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.13 2008/12/28 05:15:59 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.14 2009/01/17 07:17:35 tsutsui Exp $"); #include #include @@ -53,14 +53,10 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.13 2008/12/28 05:15:59 tsutsui #define RELOCPTR(v, t) ((t)((uintptr_t)RELOC((v), t) + firstpa - KERNBASE)) extern char *etext; -extern int Sysptsize; extern char *proc0paddr; -extern st_entry_t *Sysseg; -extern pt_entry_t *Sysptmap, *Sysmap; +extern paddr_t avail_start, avail_end; extern int physmem; -extern vm_offset_t avail_start, avail_end, virtual_avail, virtual_end; -extern int protection_codes[]; void pmap_bootstrap __P((vm_offset_t, vm_offset_t)); @@ -402,9 +398,9 @@ pmap_bootstrap(nextpa, firstpa) * absolute "jmp" table. */ { - int *kp; + u_int *kp; - kp = &RELOC(protection_codes, int); + kp = &RELOC(protection_codes, u_int); kp[VM_PROT_NONE|VM_PROT_NONE|VM_PROT_NONE] = 0; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_NONE] = PG_RO; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_EXECUTE] = PG_RO; diff --git a/sys/arch/hp300/hp300/pmap_bootstrap.c b/sys/arch/hp300/hp300/pmap_bootstrap.c index f97b08d2ae1e..677d7f385ca8 100644 --- a/sys/arch/hp300/hp300/pmap_bootstrap.c +++ b/sys/arch/hp300/hp300/pmap_bootstrap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.36 2008/12/28 05:15:59 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.37 2009/01/17 07:17:35 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.36 2008/12/28 05:15:59 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.37 2009/01/17 07:17:35 tsutsui Exp $"); #include #include @@ -55,19 +55,13 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.36 2008/12/28 05:15:59 tsutsui #define RELOCPTR(v, t) ((t)((uintptr_t)RELOC((v), t) + firstpa)) extern char *etext; -extern int Sysptsize; extern char *proc0paddr; -extern st_entry_t *Sysseg; -extern pt_entry_t *Sysptmap, *Sysmap; extern vaddr_t CLKbase, MMUbase; extern paddr_t bootinfo_pa; extern vaddr_t bootinfo_va; extern int maxmem, physmem; extern paddr_t avail_start, avail_end; -extern vaddr_t virtual_avail, virtual_end; -extern vsize_t mem_size; -extern int protection_codes[]; #ifdef M68K_MMU_HP extern int pmap_aliasmask; #endif @@ -455,9 +449,9 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa) * absolute "jmp" table. */ { - int *kp; + u_int *kp; - kp = &RELOC(protection_codes, int); + kp = &RELOC(protection_codes, u_int); kp[VM_PROT_NONE|VM_PROT_NONE|VM_PROT_NONE] = 0; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_NONE] = PG_RO; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_EXECUTE] = PG_RO; diff --git a/sys/arch/luna68k/luna68k/pmap_bootstrap.c b/sys/arch/luna68k/luna68k/pmap_bootstrap.c index 9b390996ee7d..6e23ecf343b1 100644 --- a/sys/arch/luna68k/luna68k/pmap_bootstrap.c +++ b/sys/arch/luna68k/luna68k/pmap_bootstrap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.15 2008/12/28 05:15:59 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.16 2009/01/17 07:17:35 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.15 2008/12/28 05:15:59 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.16 2009/01/17 07:17:35 tsutsui Exp $"); #include #include @@ -52,16 +52,10 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.15 2008/12/28 05:15:59 tsutsui #define RELOCPTR(v, t) ((t)((uintptr_t)RELOC((v), t) + firstpa)) extern char *etext; -extern int Sysptsize; extern char *proc0paddr; -extern st_entry_t *Sysseg; -extern pt_entry_t *Sysptmap, *Sysmap; extern int maxmem, physmem; extern paddr_t avail_start, avail_end; -extern vaddr_t virtual_avail, virtual_end; -extern vsize_t mem_size; -extern int protection_codes[]; void pmap_bootstrap __P((paddr_t, paddr_t)); @@ -376,9 +370,9 @@ pmap_bootstrap(nextpa, firstpa) * absolute "jmp" table. */ { - int *kp; + u_int *kp; - kp = &RELOC(protection_codes, int); + kp = &RELOC(protection_codes, u_int); kp[VM_PROT_NONE|VM_PROT_NONE|VM_PROT_NONE] = 0; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_NONE] = PG_RO; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_EXECUTE] = PG_RO; diff --git a/sys/arch/m68k/include/pmap_motorola.h b/sys/arch/m68k/include/pmap_motorola.h index 4d5960151890..9952c6c3f214 100644 --- a/sys/arch/m68k/include/pmap_motorola.h +++ b/sys/arch/m68k/include/pmap_motorola.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_motorola.h,v 1.19 2008/12/28 05:15:59 tsutsui Exp $ */ +/* $NetBSD: pmap_motorola.h,v 1.20 2009/01/17 07:17:36 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -184,7 +184,13 @@ pmap_remove_all(struct pmap *pmap) /* Nothing. */ } -extern pt_entry_t *Sysmap; +extern st_entry_t *Sysseg; +extern pt_entry_t *Sysmap, *Sysptmap; +extern vsize_t Sysptsize; +extern vsize_t mem_size; +extern vaddr_t virtual_avail, virtual_end; +extern u_int protection_codes[]; + extern char *vmmap; /* map for mem, dumps, etc. */ extern void *CADDR1, *CADDR2; extern void *msgbufaddr; diff --git a/sys/arch/m68k/m68k/pmap_motorola.c b/sys/arch/m68k/m68k/pmap_motorola.c index 6a3fad4a4a77..6806a578eeae 100644 --- a/sys/arch/m68k/m68k/pmap_motorola.c +++ b/sys/arch/m68k/m68k/pmap_motorola.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_motorola.c,v 1.41 2008/12/28 05:15:59 tsutsui Exp $ */ +/* $NetBSD: pmap_motorola.c,v 1.42 2009/01/17 07:17:36 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -117,7 +117,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_motorola.c,v 1.41 2008/12/28 05:15:59 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_motorola.c,v 1.42 2009/01/17 07:17:36 tsutsui Exp $"); #include #include @@ -209,7 +209,7 @@ int pmapdebug = PDB_PARANOIA; * convert to an m68k protection code. */ #define pte_prot(m, p) (protection_codes[p]) -int protection_codes[8]; +u_int protection_codes[8]; /* * Kernel page table page management. diff --git a/sys/arch/mac68k/mac68k/pmap_bootstrap.c b/sys/arch/mac68k/mac68k/pmap_bootstrap.c index ffbae6e4f19e..fde4dec5b582 100644 --- a/sys/arch/mac68k/mac68k/pmap_bootstrap.c +++ b/sys/arch/mac68k/mac68k/pmap_bootstrap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.76 2009/01/10 11:28:47 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.77 2009/01/17 07:17:36 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.76 2009/01/10 11:28:47 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.77 2009/01/17 07:17:36 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -60,17 +60,11 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.76 2009/01/10 11:28:47 tsutsui #define PA2VA(v, t) (t)((u_int)(v) - firstpa) extern char *etext; -extern int Sysptsize; extern char *extiobase, *proc0paddr; -extern st_entry_t *Sysseg; -extern pt_entry_t *Sysptmap, *Sysmap; extern int physmem; extern paddr_t avail_start; extern paddr_t avail_end; -extern vaddr_t virtual_avail, virtual_end; -extern vsize_t mem_size; -extern int protection_codes[]; #if NZSC > 0 extern int zsinited; @@ -460,9 +454,9 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa) * absolute "jmp" table. */ { - int *kp; + u_int *kp; - kp = (int *)&protection_codes; + kp = (u_int *)&protection_codes; kp[VM_PROT_NONE|VM_PROT_NONE|VM_PROT_NONE] = 0; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_NONE] = PG_RO; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_EXECUTE] = PG_RO; diff --git a/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c b/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c index 055f831c0473..dead09e0ee2c 100644 --- a/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c +++ b/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.30 2008/12/28 05:15:59 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.31 2009/01/17 07:17:36 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.30 2008/12/28 05:15:59 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.31 2009/01/17 07:17:36 tsutsui Exp $"); #include #include @@ -53,19 +53,13 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.30 2008/12/28 05:15:59 tsutsui #define RELOCPTR(v, t) ((t)((uintptr_t)RELOC((v), t) + firstpa)) extern char *kernel_text, *etext; -extern int Sysptsize; extern char *proc0paddr; -extern st_entry_t *Sysseg; -extern pt_entry_t *Sysptmap, *Sysmap; extern int maxmem, physmem; extern paddr_t avail_start, avail_end; -extern vaddr_t virtual_avail, virtual_end; -extern vsize_t mem_size; extern phys_ram_seg_t mem_clusters[]; extern int mem_cluster_cnt; extern paddr_t msgbufpa; -extern int protection_codes[]; /* * Special purpose kernel virtual addresses, used for mapping @@ -496,9 +490,9 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa) * absolute "jmp" table. */ { - int *kp; + u_int *kp; - kp = &RELOC(protection_codes, int); + kp = &RELOC(protection_codes, u_int); kp[VM_PROT_NONE|VM_PROT_NONE|VM_PROT_NONE] = 0; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_NONE] = PG_RO; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_EXECUTE] = PG_RO; diff --git a/sys/arch/news68k/news68k/pmap_bootstrap.c b/sys/arch/news68k/news68k/pmap_bootstrap.c index f4a2f438d097..09ffa957d50c 100644 --- a/sys/arch/news68k/news68k/pmap_bootstrap.c +++ b/sys/arch/news68k/news68k/pmap_bootstrap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.21 2008/12/28 05:15:59 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.22 2009/01/17 07:17:36 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.21 2008/12/28 05:15:59 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.22 2009/01/17 07:17:36 tsutsui Exp $"); #include @@ -52,18 +52,14 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.21 2008/12/28 05:15:59 tsutsui #define RELOCPTR(v, t) ((t)((uintptr_t)RELOC((v), t) + firstpa)) extern char *etext; -extern int Sysptsize; extern char *extiobase, *proc0paddr; extern char *cache_ctl, *cache_clr; -extern st_entry_t *Sysseg; -extern pt_entry_t *Sysptmap, *Sysmap; extern int maxmem, physmem; extern paddr_t avail_start, avail_end; -extern vaddr_t virtual_avail, virtual_end; -extern vsize_t mem_size; -extern int protection_codes[]; +#if 0 extern int pmap_aliasmask; +#endif void pmap_bootstrap(paddr_t, paddr_t); @@ -420,9 +416,9 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa) * absolute "jmp" table. */ { - int *kp; + u_int *kp; - kp = &RELOC(protection_codes, int); + kp = &RELOC(protection_codes, u_int); kp[VM_PROT_NONE|VM_PROT_NONE|VM_PROT_NONE] = 0; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_NONE] = PG_RO; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_EXECUTE] = PG_RO; diff --git a/sys/arch/next68k/next68k/pmap_bootstrap.c b/sys/arch/next68k/next68k/pmap_bootstrap.c index 4f4634fcd818..3ce1f934d01b 100644 --- a/sys/arch/next68k/next68k/pmap_bootstrap.c +++ b/sys/arch/next68k/next68k/pmap_bootstrap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.26 2008/12/28 05:15:59 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.27 2009/01/17 07:17:36 tsutsui Exp $ */ /* * This file was taken from mvme68k/mvme68k/pmap_bootstrap.c @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.26 2008/12/28 05:15:59 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.27 2009/01/17 07:17:36 tsutsui Exp $"); #include #include @@ -65,22 +65,13 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.26 2008/12/28 05:15:59 tsutsui #define RELOCPTR(v, t) ((t)((uintptr_t)RELOC((v), t) + firstpa)) extern char *etext; -extern int Sysptsize; extern char *proc0paddr; -extern st_entry_t *Sysseg; -extern pt_entry_t *Sysptmap, *Sysmap; extern int maxmem, physmem; extern paddr_t avail_start, avail_end; -extern vaddr_t virtual_avail, virtual_end; -extern vsize_t mem_size; extern phys_ram_seg_t mem_clusters[]; extern int mem_cluster_cnt; extern paddr_t msgbufpa; -extern int protection_codes[]; -#ifdef M68K_MMU_HP -extern int pmap_aliasmask; -#endif void pmap_bootstrap(paddr_t, paddr_t); @@ -543,9 +534,9 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa) * absolute "jmp" table. */ { - int *kp; + u_int *kp; - kp = &RELOC(protection_codes, int); + kp = &RELOC(protection_codes, u_int); kp[VM_PROT_NONE|VM_PROT_NONE|VM_PROT_NONE] = 0; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_NONE] = PG_RO; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_EXECUTE] = PG_RO; diff --git a/sys/arch/x68k/x68k/machdep.c b/sys/arch/x68k/x68k/machdep.c index 0018c1e7615e..bb8272cab943 100644 --- a/sys/arch/x68k/x68k/machdep.c +++ b/sys/arch/x68k/x68k/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.156 2009/01/14 01:48:42 isaki Exp $ */ +/* $NetBSD: machdep.c,v 1.157 2009/01/17 07:17:36 tsutsui Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.156 2009/01/14 01:48:42 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.157 2009/01/17 07:17:36 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -155,10 +155,8 @@ struct vm_map *mb_map = NULL; struct vm_map *phys_map = NULL; extern paddr_t avail_start, avail_end; -extern vaddr_t virtual_avail; extern u_int lowram; extern int end, *esym; -extern psize_t mem_size; int maxmem; /* max memory per process */ int physmem = MAXMEM; /* max supported memory, changes to actual */ diff --git a/sys/arch/x68k/x68k/pmap_bootstrap.c b/sys/arch/x68k/x68k/pmap_bootstrap.c index 0fdb26b0b1c3..6b2847eb5ad4 100644 --- a/sys/arch/x68k/x68k/pmap_bootstrap.c +++ b/sys/arch/x68k/x68k/pmap_bootstrap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.40 2008/12/28 05:15:59 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.41 2009/01/17 07:17:36 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.40 2008/12/28 05:15:59 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.41 2009/01/17 07:17:36 tsutsui Exp $"); #include "opt_m680x0.h" @@ -52,16 +52,10 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.40 2008/12/28 05:15:59 tsutsui #define RELOCPTR(v, t) ((t)((uintptr_t)RELOC((v), t) + firstpa)) extern char *etext; -extern int Sysptsize; extern char *proc0paddr; -extern st_entry_t *Sysseg; -extern pt_entry_t *Sysptmap, *Sysmap; extern int maxmem, physmem; extern paddr_t avail_start, avail_end; -extern vaddr_t virtual_avail, virtual_end; -extern psize_t mem_size; -extern int protection_codes[]; void pmap_bootstrap(paddr_t, paddr_t); @@ -392,9 +386,9 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa) * absolute "jmp" table. */ { - int *kp; + u_int *kp; - kp = &RELOC(protection_codes, int); + kp = &RELOC(protection_codes, u_int); kp[VM_PROT_NONE|VM_PROT_NONE|VM_PROT_NONE] = 0; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_NONE] = PG_RO; kp[VM_PROT_READ|VM_PROT_NONE|VM_PROT_EXECUTE] = PG_RO;