summaryrefslogtreecommitdiff
path: root/sys/src/9/pc64/mem.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-02-15 06:17:05 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2014-02-15 06:17:05 +0100
commit32604cd830a03c1237cf992b86e9b00499ca7b38 (patch)
tree5ca583bc9b65914bec42fd88216131134a84aa8c /sys/src/9/pc64/mem.h
parent1d64be19849086dc1152ef952b1ab32612e2e94c (diff)
pc64: move VMAP into its own PDP (for vmware)
modifying the kernel pdp (CPU0PDP) hangs vmware. so we initialize the pdp with KZERO and KZERO+1GB map in l.s and never change it. (except when removing the zero double map which seems to work). VMAP has its own pdp now allowing to map 512GB of physical address space. this simplifies the code a bit and gives nice virtual addresses.
Diffstat (limited to 'sys/src/9/pc64/mem.h')
-rw-r--r--sys/src/9/pc64/mem.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/src/9/pc64/mem.h b/sys/src/9/pc64/mem.h
index 8c3d610e5..d75e0f941 100644
--- a/sys/src/9/pc64/mem.h
+++ b/sys/src/9/pc64/mem.h
@@ -52,13 +52,13 @@
/*
* Address spaces. Kernel, sorted by address.
*/
-#define KZERO (0xffffffff80000000ull) /* 2GB identity map of lower 2GB ram */
+#define KZERO (0xffffffff80000000ull)
#define KTZERO (KZERO+1*MiB+64*KiB)
-#define VMAP (0xffffffff00000000ull) /* 2GB identity map of upper 2GB ram */
-#define VMAPSIZE (2*GiB)
+#define VMAP (0xffffff0000000000ull)
+#define VMAPSIZE (512*GiB)
-#define KMAP (0xffffff7f00000000ull) /* 2MB for per process temporary kernel mappings */
+#define KMAP (0xfffffe8000000000ull)
#define KMAPSIZE (2*MiB)
/*
@@ -68,8 +68,14 @@
#define APBOOTSTRAP (KZERO+0x3000ull) /* AP bootstrap code */
#define IDTADDR (KZERO+0x10000ull) /* idt */
#define REBOOTADDR (0x11000) /* reboot code - physical address */
+
#define CPU0PML4 (KZERO+0x13000ull)
+#define CPU0PDP (KZERO+0x14000ull)
+#define CPU0PD0 (KZERO+0x15000ull) /* KZERO */
+#define CPU0PD1 (KZERO+0x16000ull) /* KZERO+1GB */
+
#define CPU0GDT (KZERO+0x17000ull) /* bootstrap processor GDT */
+
#define CPU0MACH (KZERO+0x18000ull) /* Mach for bootstrap processor */
#define CPU0END (CPU0MACH+MACHSIZE)