| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: pmap.c,v 1.144 2008/12/31 11:37:20 tsutsui Exp $ */ | | 1 | /* $NetBSD: pmap.c,v 1.145 2008/12/31 11:43:26 tsutsui Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1999 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1999 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Jason R. Thorpe. | | 8 | * by Jason R. Thorpe. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -90,27 +90,27 @@ | | | @@ -90,27 +90,27 @@ |
90 | * of virtual-to-physical mappings must be done as | | 90 | * of virtual-to-physical mappings must be done as |
91 | * requested. | | 91 | * requested. |
92 | * | | 92 | * |
93 | * In order to cope with hardware architectures which | | 93 | * In order to cope with hardware architectures which |
94 | * make virtual-to-physical map invalidates expensive, | | 94 | * make virtual-to-physical map invalidates expensive, |
95 | * this module may delay invalidate or reduced protection | | 95 | * this module may delay invalidate or reduced protection |
96 | * operations until such time as they are actually | | 96 | * operations until such time as they are actually |
97 | * necessary. This module is given full information as | | 97 | * necessary. This module is given full information as |
98 | * to which processors are currently using which maps, | | 98 | * to which processors are currently using which maps, |
99 | * and to when physical maps must be made correct. | | 99 | * and to when physical maps must be made correct. |
100 | */ | | 100 | */ |
101 | | | 101 | |
102 | #include <sys/cdefs.h> | | 102 | #include <sys/cdefs.h> |
103 | __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.144 2008/12/31 11:37:20 tsutsui Exp $"); | | 103 | __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.145 2008/12/31 11:43:26 tsutsui Exp $"); |
104 | | | 104 | |
105 | #include <sys/param.h> | | 105 | #include <sys/param.h> |
106 | #include <sys/systm.h> | | 106 | #include <sys/systm.h> |
107 | #include <sys/proc.h> | | 107 | #include <sys/proc.h> |
108 | #include <sys/malloc.h> | | 108 | #include <sys/malloc.h> |
109 | #include <sys/user.h> | | 109 | #include <sys/user.h> |
110 | | | 110 | |
111 | #include <uvm/uvm.h> | | 111 | #include <uvm/uvm.h> |
112 | | | 112 | |
113 | #include <machine/pte.h> | | 113 | #include <machine/pte.h> |
114 | #include <machine/cpu.h> | | 114 | #include <machine/cpu.h> |
115 | #include <machine/vmparam.h> | | 115 | #include <machine/vmparam.h> |
116 | | | 116 | |
| @@ -287,30 +287,26 @@ vaddr_t virtual_avail; /* VA of first | | | @@ -287,30 +287,26 @@ vaddr_t virtual_avail; /* VA of first |
287 | vaddr_t virtual_end; /* VA of last avail page (end of kernel AS) */ | | 287 | vaddr_t virtual_end; /* VA of last avail page (end of kernel AS) */ |
288 | int page_cnt; /* number of pages managed by the VM system */ | | 288 | int page_cnt; /* number of pages managed by the VM system */ |
289 | bool pmap_initialized = false; /* Has pmap_init completed? */ | | 289 | bool pmap_initialized = false; /* Has pmap_init completed? */ |
290 | char *pmap_attributes; /* reference and modify bits */ | | 290 | char *pmap_attributes; /* reference and modify bits */ |
291 | TAILQ_HEAD(pv_page_list, pv_page) pv_page_freelist; | | 291 | TAILQ_HEAD(pv_page_list, pv_page) pv_page_freelist; |
292 | int pv_nfree; | | 292 | int pv_nfree; |
293 | #if defined(M68040) || defined(M68060) | | 293 | #if defined(M68040) || defined(M68060) |
294 | int protostfree; /* prototype (default) free ST map */ | | 294 | int protostfree; /* prototype (default) free ST map */ |
295 | #endif | | 295 | #endif |
296 | | | 296 | |
297 | pt_entry_t *caddr1_pte; /* PTE for CADDR1 */ | | 297 | pt_entry_t *caddr1_pte; /* PTE for CADDR1 */ |
298 | pt_entry_t *caddr2_pte; /* PTE for CADDR2 */ | | 298 | pt_entry_t *caddr2_pte; /* PTE for CADDR2 */ |
299 | | | 299 | |
300 | extern void * msgbufaddr; | | | |
301 | extern paddr_t msgbufpa; | | | |
302 | | | | |
303 | u_long noncontig_enable; | | | |
304 | extern const vaddr_t amiga_uptbase; | | 300 | extern const vaddr_t amiga_uptbase; |
305 | | | 301 | |
306 | extern paddr_t z2mem_start; | | 302 | extern paddr_t z2mem_start; |
307 | | | 303 | |
308 | extern vaddr_t reserve_dumppages(vaddr_t); | | 304 | extern vaddr_t reserve_dumppages(vaddr_t); |
309 | | | 305 | |
310 | bool pmap_testbit(paddr_t, int); | | 306 | bool pmap_testbit(paddr_t, int); |
311 | int pmap_enter_ptpage(pmap_t, vaddr_t, bool); | | 307 | int pmap_enter_ptpage(pmap_t, vaddr_t, bool); |
312 | static void pmap_ptpage_addref(vaddr_t); | | 308 | static void pmap_ptpage_addref(vaddr_t); |
313 | static int pmap_ptpage_delref(vaddr_t); | | 309 | static int pmap_ptpage_delref(vaddr_t); |
314 | static void pmap_changebit(vaddr_t, int, bool); | | 310 | static void pmap_changebit(vaddr_t, int, bool); |
315 | struct pv_entry * pmap_alloc_pv(void); | | 311 | struct pv_entry * pmap_alloc_pv(void); |
316 | void pmap_free_pv(struct pv_entry *); | | 312 | void pmap_free_pv(struct pv_entry *); |