diff options
author | peter <peter@FreeBSD.org> | 2003-05-15 00:20:17 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2003-05-15 00:20:17 +0000 |
commit | 7208ad8cbbe97024b739c1267077266cf9792ad3 (patch) | |
tree | 7bdd64c540a98300254c34822a61dbf2a313930e /sys/amd64 | |
parent | 65e966433e0f29ff89cea7f419116ec01f24a8b2 (diff) | |
download | FreeBSD-src-7208ad8cbbe97024b739c1267077266cf9792ad3.zip FreeBSD-src-7208ad8cbbe97024b739c1267077266cf9792ad3.tar.gz |
Use compile time constants for things like PTmap[] etc because they're
about to move outside of the +/- 2GB range
Suggested by: jake
Approved by: re (amd64/* blanket)
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/locore.S | 9 | ||||
-rw-r--r-- | sys/amd64/include/pmap.h | 10 |
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 */ |