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)
This commit is contained in:
Peter Wemm 2003-05-15 00:20:17 +00:00
parent 86eb7cbada
commit be52ef1399
2 changed files with 3 additions and 16 deletions

View File

@ -33,15 +33,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
*/

View File

@ -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 */