summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2011-01-31 02:19:34 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-01-31 02:19:34 +0100
commit8e01f3e5f98c4b2507441c2c4c66f1c8930211dc (patch)
treef66f007605d41e76e91526ced2dcfb534e8d62d2 /i386
parent2f9d3f1ce47d7601a9d200d1bedfa07bfec278df (diff)
Enable Xen >4GiB physical memory support
* i386/i386/gdt.c (gdt_init): Enable VMASST_TYPE_pae_extended_cr3. * i386/i386/xen.h: Drop actually-unneeded comment. * i386/xen/xen_boothdr.S (FEATURES) [MACH_PSEUDO_PHYS]: Add pae_pgdir_above_4gb. (XEN_ELFNOTE_FEATURES) [MACH_PSEUDO_PHYS]: Add pae_pgdir_above_4gb.
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/gdt.c2
-rw-r--r--i386/i386/xen.h1
-rw-r--r--i386/xen/xen_boothdr.S10
3 files changed, 9 insertions, 4 deletions
diff --git a/i386/i386/gdt.c b/i386/i386/gdt.c
index f26a50c..a034791 100644
--- a/i386/i386/gdt.c
+++ b/i386/i386/gdt.c
@@ -71,6 +71,8 @@ gdt_init()
panic("couldn't set gdt\n");
if (hyp_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments))
panic("couldn't set 4gb segments vm assist");
+ if (hyp_vm_assist(VMASST_CMD_enable, VMASST_TYPE_pae_extended_cr3))
+ panic("couldn't set extended cr3");
#if 0
if (hyp_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments_notify))
panic("couldn't set 4gb segments vm assist notify");
diff --git a/i386/i386/xen.h b/i386/i386/xen.h
index 1377a14..8094d34 100644
--- a/i386/i386/xen.h
+++ b/i386/i386/xen.h
@@ -263,7 +263,6 @@ MACH_INLINE void hyp_set_ldt(void *ldt, unsigned long nbentries) {
if (!count)
panic("couldn't set LDT\n");
}
-/* TODO: use xen_pfn_to_cr3/xen_cr3_to_pfn to cope with pdp above 4GB */
#define hyp_set_cr3(value) hyp_mmuext_op_mfn(MMUEXT_NEW_BASEPTR, pa_to_mfn(value))
MACH_INLINE void hyp_invlpg(vm_offset_t lin) {
struct mmuext_op ops;
diff --git a/i386/xen/xen_boothdr.S b/i386/xen/xen_boothdr.S
index 604e13b..6d595ab 100644
--- a/i386/xen/xen_boothdr.S
+++ b/i386/xen/xen_boothdr.S
@@ -31,7 +31,9 @@
.ascii ",PAE=no"
#endif
.ascii ",LOADER=generic"
-#ifndef MACH_PSEUDO_PHYS
+#ifdef MACH_PSEUDO_PHYS
+ .ascii ",FEATURES=pae_pgdir_above_4gb"
+#else /* MACH_PSEUDO_PHYS */
.ascii ",FEATURES=!auto_translated_physmap"
#endif
.byte 0
@@ -63,8 +65,10 @@
#endif
ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz, "generic")
ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz, ""
-#ifndef MACH_PSEUDO_PHYS
- "!auto_translated_physmap"
+#ifdef MACH_PSEUDO_PHYS
+ "pae_pgdir_above_4gb"
+#else /* MACH_PSEUDO_PHYS */
+ "!auto_translated_physmap|"
#endif
)