mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
- Removed APTD and associated macros, it is no longer used.
BANG BANG BANG etc. Sponsored by: DARPA, Network Associates Laboratories
This commit is contained in:
parent
5b03e4b6a1
commit
163529c2b3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113040
@ -69,28 +69,12 @@
|
||||
/*
|
||||
* PTmap is recursive pagemap at top of virtual address space.
|
||||
* Within PTmap, the page directory can be found (third indirection).
|
||||
*
|
||||
* NOTE: PTDpde, PTmap, and PTD are being defined as address symbols.
|
||||
* In C you access them directly, and not with a '*'. Storage is not being
|
||||
* allocated. They will magically address the correct locations in KVM
|
||||
* which C will treat as normal variables of the type they are defined in
|
||||
* machine/pmap.h, i.e. PTDpde = XX ; to set a PDE entry, NOT *PTDpde = XX;
|
||||
*/
|
||||
.globl PTmap,PTD,PTDpde
|
||||
.set PTmap,(PTDPTDI << PDRSHIFT)
|
||||
.set PTD,PTmap + (PTDPTDI * PAGE_SIZE)
|
||||
.set PTDpde,PTD + (PTDPTDI * PDESIZE)
|
||||
|
||||
/*
|
||||
* APTmap, APTD is the alternate recursive pagemap.
|
||||
* It's used when modifying another process's page tables.
|
||||
* See the note above. It is true here as well.
|
||||
*/
|
||||
.globl APTmap,APTD,APTDpde
|
||||
.set APTmap,APTDPTDI << PDRSHIFT
|
||||
.set APTD,APTmap + (APTDPTDI * PAGE_SIZE)
|
||||
.set APTDpde,PTD + (APTDPTDI * PDESIZE)
|
||||
|
||||
#ifdef SMP
|
||||
/*
|
||||
* Define layout of per-cpu address space.
|
||||
|
@ -69,28 +69,12 @@
|
||||
/*
|
||||
* PTmap is recursive pagemap at top of virtual address space.
|
||||
* Within PTmap, the page directory can be found (third indirection).
|
||||
*
|
||||
* NOTE: PTDpde, PTmap, and PTD are being defined as address symbols.
|
||||
* In C you access them directly, and not with a '*'. Storage is not being
|
||||
* allocated. They will magically address the correct locations in KVM
|
||||
* which C will treat as normal variables of the type they are defined in
|
||||
* machine/pmap.h, i.e. PTDpde = XX ; to set a PDE entry, NOT *PTDpde = XX;
|
||||
*/
|
||||
.globl PTmap,PTD,PTDpde
|
||||
.set PTmap,(PTDPTDI << PDRSHIFT)
|
||||
.set PTD,PTmap + (PTDPTDI * PAGE_SIZE)
|
||||
.set PTDpde,PTD + (PTDPTDI * PDESIZE)
|
||||
|
||||
/*
|
||||
* APTmap, APTD is the alternate recursive pagemap.
|
||||
* It's used when modifying another process's page tables.
|
||||
* See the note above. It is true here as well.
|
||||
*/
|
||||
.globl APTmap,APTD,APTDpde
|
||||
.set APTmap,APTDPTDI << PDRSHIFT
|
||||
.set APTD,APTmap + (APTDPTDI * PAGE_SIZE)
|
||||
.set APTDpde,PTD + (APTDPTDI * PDESIZE)
|
||||
|
||||
#ifdef SMP
|
||||
/*
|
||||
* Define layout of per-cpu address space.
|
||||
|
@ -179,8 +179,6 @@ mmrw(dev_t dev, struct uio *uio, int flags)
|
||||
|
||||
if (addr < (vm_offset_t)VADDR(PTDPTDI, 0))
|
||||
return (EFAULT);
|
||||
if (eaddr >= (vm_offset_t)VADDR(APTDPTDI, 0))
|
||||
return (EFAULT);
|
||||
for (; addr < eaddr; addr += PAGE_SIZE)
|
||||
if (pmap_extract(kernel_pmap, addr) == 0)
|
||||
return (EFAULT);
|
||||
|
@ -1636,11 +1636,8 @@ pmap_release(pmap_t pmap)
|
||||
LIST_REMOVE(pmap, pm_list);
|
||||
mtx_unlock_spin(&allpmaps_lock);
|
||||
|
||||
bzero(pmap->pm_pdir + KPTDI, nkpt * sizeof(*pmap->pm_pdir));
|
||||
for (i = 0; i < NPGPTD; i++) {
|
||||
pmap->pm_pdir[PTDPTDI + i] = 0;
|
||||
pmap->pm_pdir[APTDPTDI + i] = 0;
|
||||
}
|
||||
bzero(pmap->pm_pdir + PTDPTDI, (nkpt + NPGPTD) *
|
||||
sizeof(*pmap->pm_pdir));
|
||||
#ifdef SMP
|
||||
pmap->pm_pdir[MPPTDI] = 0;
|
||||
#endif
|
||||
|
@ -109,9 +109,9 @@
|
||||
#endif
|
||||
#ifndef NKPDE
|
||||
#ifdef SMP
|
||||
#define NKPDE (KVA_PAGES - (NPGPTD + 1)) /* number of page tables/pde's */
|
||||
#define NKPDE (KVA_PAGES - 1) /* number of page tables/pde's */
|
||||
#else
|
||||
#define NKPDE (KVA_PAGES - NPGPTD) /* number of page tables/pde's */
|
||||
#define NKPDE (KVA_PAGES) /* number of page tables/pde's */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -123,12 +123,11 @@
|
||||
*
|
||||
* SMP_PRIVPAGES: The per-cpu address space is 0xff80000 -> 0xffbfffff
|
||||
*/
|
||||
#define APTDPTDI (NPDEPTD-NPGPTD) /* alt ptd entry that points to APTD */
|
||||
#ifdef SMP
|
||||
#define MPPTDI (APTDPTDI-1) /* per cpu ptd entry */
|
||||
#define MPPTDI (NPDEPTD-1) /* per cpu ptd entry */
|
||||
#define KPTDI (MPPTDI-NKPDE) /* start of kernel virtual pde's */
|
||||
#else
|
||||
#define KPTDI (APTDPTDI-NKPDE)/* start of kernel virtual pde's */
|
||||
#define KPTDI (NPDEPTD-NKPDE)/* start of kernel virtual pde's */
|
||||
#endif /* SMP */
|
||||
#define PTDPTDI (KPTDI-NPGPTD) /* ptd entry that points to ptd! */
|
||||
|
||||
@ -166,9 +165,9 @@ typedef uint32_t pt_entry_t;
|
||||
* and directories.
|
||||
*/
|
||||
#ifdef _KERNEL
|
||||
extern pt_entry_t PTmap[], APTmap[];
|
||||
extern pd_entry_t PTD[], APTD[];
|
||||
extern pd_entry_t PTDpde[], APTDpde[];
|
||||
extern pt_entry_t PTmap[];
|
||||
extern pd_entry_t PTD[];
|
||||
extern pd_entry_t PTDpde[];
|
||||
|
||||
#ifdef PAE
|
||||
extern pdpt_entry_t *IdlePDPT;
|
||||
@ -184,7 +183,6 @@ extern pd_entry_t *IdlePTD; /* physical address of "Idle" state directory */
|
||||
* the corresponding pde that in turn maps it.
|
||||
*/
|
||||
#define vtopte(va) (PTmap + i386_btop(va))
|
||||
#define avtopte(va) (APTmap + i386_btop(va))
|
||||
|
||||
/*
|
||||
* Routine: pmap_kextract
|
||||
|
@ -69,28 +69,12 @@
|
||||
/*
|
||||
* PTmap is recursive pagemap at top of virtual address space.
|
||||
* Within PTmap, the page directory can be found (third indirection).
|
||||
*
|
||||
* NOTE: PTDpde, PTmap, and PTD are being defined as address symbols.
|
||||
* In C you access them directly, and not with a '*'. Storage is not being
|
||||
* allocated. They will magically address the correct locations in KVM
|
||||
* which C will treat as normal variables of the type they are defined in
|
||||
* machine/pmap.h, i.e. PTDpde = XX ; to set a PDE entry, NOT *PTDpde = XX;
|
||||
*/
|
||||
.globl PTmap,PTD,PTDpde
|
||||
.set PTmap,(PTDPTDI << PDRSHIFT)
|
||||
.set PTD,PTmap + (PTDPTDI * PAGE_SIZE)
|
||||
.set PTDpde,PTD + (PTDPTDI * PDESIZE)
|
||||
|
||||
/*
|
||||
* APTmap, APTD is the alternate recursive pagemap.
|
||||
* It's used when modifying another process's page tables.
|
||||
* See the note above. It is true here as well.
|
||||
*/
|
||||
.globl APTmap,APTD,APTDpde
|
||||
.set APTmap,APTDPTDI << PDRSHIFT
|
||||
.set APTD,APTmap + (APTDPTDI * PAGE_SIZE)
|
||||
.set APTDpde,PTD + (APTDPTDI * PDESIZE)
|
||||
|
||||
#ifdef SMP
|
||||
/*
|
||||
* Define layout of per-cpu address space.
|
||||
|
@ -179,8 +179,6 @@ mmrw(dev_t dev, struct uio *uio, int flags)
|
||||
|
||||
if (addr < (vm_offset_t)VADDR(PTDPTDI, 0))
|
||||
return (EFAULT);
|
||||
if (eaddr >= (vm_offset_t)VADDR(APTDPTDI, 0))
|
||||
return (EFAULT);
|
||||
for (; addr < eaddr; addr += PAGE_SIZE)
|
||||
if (pmap_extract(kernel_pmap, addr) == 0)
|
||||
return (EFAULT);
|
||||
|
@ -1636,11 +1636,8 @@ pmap_release(pmap_t pmap)
|
||||
LIST_REMOVE(pmap, pm_list);
|
||||
mtx_unlock_spin(&allpmaps_lock);
|
||||
|
||||
bzero(pmap->pm_pdir + KPTDI, nkpt * sizeof(*pmap->pm_pdir));
|
||||
for (i = 0; i < NPGPTD; i++) {
|
||||
pmap->pm_pdir[PTDPTDI + i] = 0;
|
||||
pmap->pm_pdir[APTDPTDI + i] = 0;
|
||||
}
|
||||
bzero(pmap->pm_pdir + PTDPTDI, (nkpt + NPGPTD) *
|
||||
sizeof(*pmap->pm_pdir));
|
||||
#ifdef SMP
|
||||
pmap->pm_pdir[MPPTDI] = 0;
|
||||
#endif
|
||||
|
@ -109,9 +109,9 @@
|
||||
#endif
|
||||
#ifndef NKPDE
|
||||
#ifdef SMP
|
||||
#define NKPDE (KVA_PAGES - (NPGPTD + 1)) /* number of page tables/pde's */
|
||||
#define NKPDE (KVA_PAGES - 1) /* number of page tables/pde's */
|
||||
#else
|
||||
#define NKPDE (KVA_PAGES - NPGPTD) /* number of page tables/pde's */
|
||||
#define NKPDE (KVA_PAGES) /* number of page tables/pde's */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -123,12 +123,11 @@
|
||||
*
|
||||
* SMP_PRIVPAGES: The per-cpu address space is 0xff80000 -> 0xffbfffff
|
||||
*/
|
||||
#define APTDPTDI (NPDEPTD-NPGPTD) /* alt ptd entry that points to APTD */
|
||||
#ifdef SMP
|
||||
#define MPPTDI (APTDPTDI-1) /* per cpu ptd entry */
|
||||
#define MPPTDI (NPDEPTD-1) /* per cpu ptd entry */
|
||||
#define KPTDI (MPPTDI-NKPDE) /* start of kernel virtual pde's */
|
||||
#else
|
||||
#define KPTDI (APTDPTDI-NKPDE)/* start of kernel virtual pde's */
|
||||
#define KPTDI (NPDEPTD-NKPDE)/* start of kernel virtual pde's */
|
||||
#endif /* SMP */
|
||||
#define PTDPTDI (KPTDI-NPGPTD) /* ptd entry that points to ptd! */
|
||||
|
||||
@ -166,9 +165,9 @@ typedef uint32_t pt_entry_t;
|
||||
* and directories.
|
||||
*/
|
||||
#ifdef _KERNEL
|
||||
extern pt_entry_t PTmap[], APTmap[];
|
||||
extern pd_entry_t PTD[], APTD[];
|
||||
extern pd_entry_t PTDpde[], APTDpde[];
|
||||
extern pt_entry_t PTmap[];
|
||||
extern pd_entry_t PTD[];
|
||||
extern pd_entry_t PTDpde[];
|
||||
|
||||
#ifdef PAE
|
||||
extern pdpt_entry_t *IdlePDPT;
|
||||
@ -184,7 +183,6 @@ extern pd_entry_t *IdlePTD; /* physical address of "Idle" state directory */
|
||||
* the corresponding pde that in turn maps it.
|
||||
*/
|
||||
#define vtopte(va) (PTmap + i386_btop(va))
|
||||
#define avtopte(va) (APTmap + i386_btop(va))
|
||||
|
||||
/*
|
||||
* Routine: pmap_kextract
|
||||
|
Loading…
Reference in New Issue
Block a user