summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/locore.S9
-rw-r--r--sys/amd64/include/pmap.h10
2 files changed, 3 insertions, 16 deletions
diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S
index 65b01ac..04d2ac5 100644
--- a/sys/amd64/amd64/locore.S
+++ b/sys/amd64/amd64/locore.S
@@ -34,15 +34,6 @@
#include "assym.s"
/*
- * PTmap is recursive pagemap at top of virtual address space.
- * Within PTmap, the page directory can be found (third indirection).
- */
- .globl PTmap,PTD,PTDpde
- .set PTmap,(PTDPTDI << PDRSHIFT)
- .set PTD,PTmap + (PTDPTDI * PAGE_SIZE)
- .set PTDpde,PTD + (PTDPTDI * PDESIZE)
-
-/*
* Compiled KERNBASE location
*/
.globl kernbase
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h
index d3e2104..5ffa054 100644
--- a/sys/amd64/include/pmap.h
+++ b/sys/amd64/include/pmap.h
@@ -145,13 +145,9 @@ typedef u_int64_t pml4_entry_t;
* in the page tables and the evil overlapping.
*/
#ifdef _KERNEL
-extern pt_entry_t PTmap[];
-extern pd_entry_t PDmap[];
-extern pdp_entry_t PDPmap[];
-extern pml4_entry_t PML4[];
-extern pdp_entry_t PDP[];
-extern pd_entry_t PTD[];
-extern pd_entry_t PTDpde[];
+#define PTmap ((pt_entry_t *)(VADDR(0, 0, PTDPTDI, 0)))
+#define PTD ((pd_entry_t *)(VADDR(0, 0, PTDPTDI, PTDPTDI)))
+#define PTDpde ((pd_entry_t *)(VADDR(0, 0, PTDPTDI, PTDPTDI) + (PTDPTDI * sizeof(pd_entry_t))))
extern u_int64_t IdlePML4; /* physical address of "Idle" state directory */
extern u_int64_t IdlePDP; /* physical address of "Idle" state directory */
OpenPOWER on IntegriCloud