aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/boot/head.S
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2010-11-09 11:49:49 +0000
committerKeir Fraser <keir@xen.org>2010-11-09 11:49:49 +0000
commit5a771800114c437fb857b44b3ed74f60e87979c2 (patch)
treea9a1089b753cdfb65757b08c6406d1721d989ad3 /xen/arch/x86/boot/head.S
parente04aea7477c379e904e7520bdfa2f42284427a97 (diff)
downloadxen-5a771800114c437fb857b44b3ed74f60e87979c2.tar.gz
xen-5a771800114c437fb857b44b3ed74f60e87979c2.tar.bz2
xen-5a771800114c437fb857b44b3ed74f60e87979c2.zip
x86: do away with the boot time low-memory 1:1 mapping
By doing so, we're no longer restricted to be able to place all boot loader modules into the low 1Gb/4Gb (32-/64-bit) of memory, nor is there a dependency anymore on where the boot loader places the modules. We're also no longer restricted to copy the modules into a place below 4Gb, nor to put them all together into a single piece of memory. Further it allows even the 32-bit Dom0 kernel to be loaded anywhere in physical memory (except if it doesn't support PAE-above-4G). Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/boot/head.S')
-rw-r--r--xen/arch/x86/boot/head.S12
1 files changed, 10 insertions, 2 deletions
diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S
index aa657234d5..0c59f2a750 100644
--- a/xen/arch/x86/boot/head.S
+++ b/xen/arch/x86/boot/head.S
@@ -110,12 +110,15 @@ __start:
/* Initialise L2 identity-map and xen page table entries (16MB). */
mov $sym_phys(l2_identmap),%edi
mov $sym_phys(l2_xenmap),%esi
+ mov $sym_phys(l2_bootmap),%edx
mov $0x1e3,%eax /* PRESENT+RW+A+D+2MB+GLOBAL */
mov $8,%ecx
1: mov %eax,(%edi)
add $8,%edi
mov %eax,(%esi)
add $8,%esi
+ mov %eax,(%edx)
+ add $8,%edx
add $(1<<L2_PAGETABLE_SHIFT),%eax
loop 1b
/* Initialise L3 identity-map page directory entries. */
@@ -129,9 +132,13 @@ __start:
/* Initialise L3 xen-map page directory entry. */
mov $(sym_phys(l2_xenmap)+7),%eax
mov %eax,sym_phys(l3_xenmap) + l3_table_offset(XEN_VIRT_START)*8
- /* Hook identity-map and xen-map L3 tables into PML4. */
+ /* Initialise L3 boot-map page directory entry. */
+ mov $(sym_phys(l2_bootmap)+7),%eax
+ mov %eax,sym_phys(l3_bootmap) + 0*8
+ /* Hook identity-map, xen-map, and boot-map L3 tables into PML4. */
+ mov $(sym_phys(l3_bootmap)+7),%eax
+ mov %eax,sym_phys(idle_pg_table) + 0*8
mov $(sym_phys(l3_identmap)+7),%eax
- mov %eax,sym_phys(idle_pg_table) + ( 0*8) /* PML4[ 0]: 1:1 map */
mov %eax,sym_phys(idle_pg_table) + l4_table_offset(DIRECTMAP_VIRT_START)*8
mov $(sym_phys(l3_xenmap)+7),%eax
mov %eax,sym_phys(idle_pg_table) + l4_table_offset(XEN_VIRT_START)*8
@@ -176,6 +183,7 @@ __start:
#if defined(__x86_64__)
mov %edi,sym_phys(l2_identmap)
mov %edi,sym_phys(l2_xenmap)
+ mov %edi,sym_phys(l2_bootmap)
#else
mov %edi,sym_phys(idle_pg_table_l2)
mov %edi,sym_phys(idle_pg_table_l2) + (__PAGE_OFFSET>>18)