PERFORCE change 31192 for review
Peter Wemm
peter at FreeBSD.org
Wed May 14 14:13:23 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=31192
Change 31192 by peter at peter_hammer on 2003/05/14 14:12:50
As per jake's suggestion, change PTmap etc to be compile time
constants with casts. libkvm won't be happy about this, but
its no big deal. I can still export the symbol values ala
kernbase so that libkvm can find them in the symbol table.
Anyway, this gets around the problem of requiring the symbols
be within +/- 2GB of address zero.
Affected files ...
.. //depot/projects/hammer/sys/amd64/amd64/locore.S#2 edit
.. //depot/projects/hammer/sys/amd64/include/pmap.h#6 edit
Differences ...
==== //depot/projects/hammer/sys/amd64/amd64/locore.S#2 (text+ko) ====
@@ -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
==== //depot/projects/hammer/sys/amd64/include/pmap.h#6 (text+ko) ====
@@ -145,13 +145,9 @@
* 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 */
More information about the p4-projects
mailing list