summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2003-04-03 23:44:35 +0000
committerjake <jake@FreeBSD.org>2003-04-03 23:44:35 +0000
commit68ea55c96293d9079e020a028f673b022bcaeb1c (patch)
tree5db3b8788567013d2d5e72d15a2cba1f566db524 /sys
parent383d50b298f5c5c45b14f5aa964f3c4a771823e2 (diff)
downloadFreeBSD-src-68ea55c96293d9079e020a028f673b022bcaeb1c.zip
FreeBSD-src-68ea55c96293d9079e020a028f673b022bcaeb1c.tar.gz
- Removed APTD and associated macros, it is no longer used.
BANG BANG BANG etc. Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/locore.S16
-rw-r--r--sys/amd64/amd64/locore.s16
-rw-r--r--sys/amd64/amd64/mem.c2
-rw-r--r--sys/amd64/amd64/pmap.c7
-rw-r--r--sys/amd64/include/pmap.h16
-rw-r--r--sys/i386/i386/locore.s16
-rw-r--r--sys/i386/i386/mem.c2
-rw-r--r--sys/i386/i386/pmap.c7
-rw-r--r--sys/i386/include/pmap.h16
9 files changed, 18 insertions, 80 deletions
diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S
index 12e2e19..8115e23 100644
--- a/sys/amd64/amd64/locore.S
+++ b/sys/amd64/amd64/locore.S
@@ -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.
diff --git a/sys/amd64/amd64/locore.s b/sys/amd64/amd64/locore.s
index 12e2e19..8115e23 100644
--- a/sys/amd64/amd64/locore.s
+++ b/sys/amd64/amd64/locore.s
@@ -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.
diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c
index 37a9cec..8ec934f 100644
--- a/sys/amd64/amd64/mem.c
+++ b/sys/amd64/amd64/mem.c
@@ -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);
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 77c53e0..9335a31 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -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
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h
index f044d45..d1e2975 100644
--- a/sys/amd64/include/pmap.h
+++ b/sys/amd64/include/pmap.h
@@ -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
diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s
index 12e2e19..8115e23 100644
--- a/sys/i386/i386/locore.s
+++ b/sys/i386/i386/locore.s
@@ -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.
diff --git a/sys/i386/i386/mem.c b/sys/i386/i386/mem.c
index 37a9cec..8ec934f 100644
--- a/sys/i386/i386/mem.c
+++ b/sys/i386/i386/mem.c
@@ -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);
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index 77c53e0..9335a31 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -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
diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h
index f044d45..d1e2975 100644
--- a/sys/i386/include/pmap.h
+++ b/sys/i386/include/pmap.h
@@ -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
OpenPOWER on IntegriCloud