pmap.c (8355f576a9f4134b657e43879516395f16daa371) pmap.c (15fe306743f9c24987b3d4e00c2a446d8a798a33)
1/*
2 * Copyright (c) 1991 Regents of the University of California.
3 * All rights reserved.
4 * Copyright (c) 1994 John S. Dyson
5 * All rights reserved.
6 * Copyright (c) 1994 David Greenman
7 * All rights reserved.
8 *

--- 180 unchanged lines hidden (view full) ---

189static caddr_t crashdumpmap;
190
191#ifdef SMP
192extern pt_entry_t *SMPpt;
193#endif
194static pt_entry_t *PMAP1 = 0;
195static pt_entry_t *PADDR1 = 0;
196
1/*
2 * Copyright (c) 1991 Regents of the University of California.
3 * All rights reserved.
4 * Copyright (c) 1994 John S. Dyson
5 * All rights reserved.
6 * Copyright (c) 1994 David Greenman
7 * All rights reserved.
8 *

--- 180 unchanged lines hidden (view full) ---

189static caddr_t crashdumpmap;
190
191#ifdef SMP
192extern pt_entry_t *SMPpt;
193#endif
194static pt_entry_t *PMAP1 = 0;
195static pt_entry_t *PADDR1 = 0;
196
197static PMAP_INLINE void free_pv_entry __P((pv_entry_t pv));
198static pt_entry_t *get_ptbase __P((pmap_t pmap));
199static pv_entry_t get_pv_entry __P((void));
200static void i386_protection_init __P((void));
201static __inline void pmap_changebit __P((vm_page_t m, int bit, boolean_t setem));
197static PMAP_INLINE void free_pv_entry(pv_entry_t pv);
198static pt_entry_t *get_ptbase(pmap_t pmap);
199static pv_entry_t get_pv_entry(void);
200static void i386_protection_init(void);
201static __inline void pmap_changebit(vm_page_t m, int bit, boolean_t setem);
202
202
203static void pmap_remove_all __P((vm_page_t m));
204static vm_page_t pmap_enter_quick __P((pmap_t pmap, vm_offset_t va,
205 vm_page_t m, vm_page_t mpte));
206static int pmap_remove_pte __P((pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva));
207static void pmap_remove_page __P((struct pmap *pmap, vm_offset_t va));
208static int pmap_remove_entry __P((struct pmap *pmap, vm_page_t m,
209 vm_offset_t va));
210static boolean_t pmap_testbit __P((vm_page_t m, int bit));
211static void pmap_insert_entry __P((pmap_t pmap, vm_offset_t va,
212 vm_page_t mpte, vm_page_t m));
203static void pmap_remove_all(vm_page_t m);
204static vm_page_t pmap_enter_quick(pmap_t pmap, vm_offset_t va,
205 vm_page_t m, vm_page_t mpte);
206static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva);
207static void pmap_remove_page(struct pmap *pmap, vm_offset_t va);
208static int pmap_remove_entry(struct pmap *pmap, vm_page_t m,
209 vm_offset_t va);
210static boolean_t pmap_testbit(vm_page_t m, int bit);
211static void pmap_insert_entry(pmap_t pmap, vm_offset_t va,
212 vm_page_t mpte, vm_page_t m);
213
213
214static vm_page_t pmap_allocpte __P((pmap_t pmap, vm_offset_t va));
214static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va);
215
215
216static int pmap_release_free_page __P((pmap_t pmap, vm_page_t p));
217static vm_page_t _pmap_allocpte __P((pmap_t pmap, unsigned ptepindex));
218static pt_entry_t *pmap_pte_quick __P((pmap_t pmap, vm_offset_t va));
219static vm_page_t pmap_page_lookup __P((vm_object_t object, vm_pindex_t pindex));
220static int pmap_unuse_pt __P((pmap_t, vm_offset_t, vm_page_t));
216static int pmap_release_free_page(pmap_t pmap, vm_page_t p);
217static vm_page_t _pmap_allocpte(pmap_t pmap, unsigned ptepindex);
218static pt_entry_t *pmap_pte_quick(pmap_t pmap, vm_offset_t va);
219static vm_page_t pmap_page_lookup(vm_object_t object, vm_pindex_t pindex);
220static int pmap_unuse_pt(pmap_t, vm_offset_t, vm_page_t);
221static vm_offset_t pmap_kmem_choose(vm_offset_t addr);
222static void *pmap_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait);
223
224static pd_entry_t pdir4mb;
225
226/*
227 * Routine: pmap_pte
228 * Function:

--- 3321 unchanged lines hidden (view full) ---

3550 }
3551 sx_sunlock(&allproc_lock);
3552 return npte;
3553}
3554#endif
3555
3556#if defined(DEBUG)
3557
221static vm_offset_t pmap_kmem_choose(vm_offset_t addr);
222static void *pmap_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait);
223
224static pd_entry_t pdir4mb;
225
226/*
227 * Routine: pmap_pte
228 * Function:

--- 3321 unchanged lines hidden (view full) ---

3550 }
3551 sx_sunlock(&allproc_lock);
3552 return npte;
3553}
3554#endif
3555
3556#if defined(DEBUG)
3557
3558static void pads __P((pmap_t pm));
3559void pmap_pvdump __P((vm_offset_t pa));
3558static void pads(pmap_t pm);
3559void pmap_pvdump(vm_offset_t pa);
3560
3561/* print address space of pmap*/
3562static void
3563pads(pm)
3564 pmap_t pm;
3565{
3566 int i, j;
3567 vm_offset_t va;

--- 35 unchanged lines hidden ---
3560
3561/* print address space of pmap*/
3562static void
3563pads(pm)
3564 pmap_t pm;
3565{
3566 int i, j;
3567 vm_offset_t va;

--- 35 unchanged lines hidden ---