aboutsummaryrefslogtreecommitdiff
path: root/i386/intel/pmap.h
diff options
context:
space:
mode:
authorLuca Dariz <luca@orpolo.org>2023-02-12 18:28:14 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-02-12 18:54:38 +0100
commit5c2f82deeba84394c621b2d98ce7d73489c88ac3 (patch)
treea27049ee1acdc1037c02bfa56051c631b1fa8682 /i386/intel/pmap.h
parentfccebe66ff8cbcae6e30f6c1cfbff34d9e2a151e (diff)
downloadgnumach-5c2f82deeba84394c621b2d98ce7d73489c88ac3.tar.gz
gnumach-5c2f82deeba84394c621b2d98ce7d73489c88ac3.tar.bz2
gnumach-5c2f82deeba84394c621b2d98ce7d73489c88ac3.zip
use L4 page table directly on x86_64 instead of short-circuiting to pdpbase
This is a preparation to run the kernel on high addresses, where the user vm region and the kernel vm region will use different L3 page tables. * i386/intel/pmap.c: on x86_64, retrieve the value of pdpbase from the L4 table, and add the pmap_pdp() helper (useful also for PAE). * i386/intel/pmap.h: remove pdpbase on x86_64. Message-Id: <20230212172818.1511405-6-luca@orpolo.org>
Diffstat (limited to 'i386/intel/pmap.h')
-rw-r--r--i386/intel/pmap.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/i386/intel/pmap.h b/i386/intel/pmap.h
index 92247faa..1c6a0d30 100644
--- a/i386/intel/pmap.h
+++ b/i386/intel/pmap.h
@@ -182,16 +182,17 @@ typedef volatile long cpu_set; /* set of CPUs - must be <= 32 */
struct pmap {
#if ! PAE
pt_entry_t *dirbase; /* page directory table */
-#else
- pt_entry_t *pdpbase; /* page directory pointer table */
-#endif /* ! PAE */
+#else /* PAE */
#ifdef __x86_64__
pt_entry_t *l4base; /* l4 table */
#ifdef MACH_HYP
pt_entry_t *user_l4base; /* Userland l4 table */
pt_entry_t *user_pdpbase; /* Userland l4 table */
#endif /* MACH_HYP */
+#else /* x86_64 */
+ pt_entry_t *pdpbase; /* page directory pointer table */
#endif /* x86_64 */
+#endif /* PAE */
int ref_count; /* reference count */
decl_simple_lock_data(,lock)
/* lock on map */