aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/boot/head.S
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-02-03 18:11:03 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-02-03 18:11:03 +0000
commit964fb3d6365b7d3b582b895e2473446f814787d0 (patch)
treeee71b51e890b502a321e9bdc3bbcaba90da90de0 /xen/arch/x86/boot/head.S
parent684e6b10cb1dd75ba736576204bc25b945e87850 (diff)
downloadxen-964fb3d6365b7d3b582b895e2473446f814787d0.tar.gz
xen-964fb3d6365b7d3b582b895e2473446f814787d0.tar.bz2
xen-964fb3d6365b7d3b582b895e2473446f814787d0.zip
x86: Relocate Multiboot structures where we know they will be
accessible. GRUB2 seems to like to stick them really high sometimes (just below 4GB). The 32-bit C code framework that this sets up can also be used for other stuff in future: * early cmdline parsing * relocating multiboot modules so they too are guaranteed accessible Its interaction with normal Xen start-of-day, and with the 16-bit assembly trampoline, needs a bit of thought. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/boot/head.S')
-rw-r--r--xen/arch/x86/boot/head.S10
1 files changed, 8 insertions, 2 deletions
diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S
index c10aa62b2d..3360107aac 100644
--- a/xen/arch/x86/boot/head.S
+++ b/xen/arch/x86/boot/head.S
@@ -79,8 +79,11 @@ __start:
cmp $0x2BADB002,%eax
jne not_multiboot
- /* Save the Multiboot info structure for later use. */
- mov %ebx,sym_phys(multiboot_ptr)
+ /* Save the Multiboot info struct (after relocation) for later use. */
+ mov $sym_phys(cpu0_stack)+1024,%esp
+ push %ebx
+ call reloc
+ mov %eax,sym_phys(multiboot_ptr)
/* Initialize BSS (no nasty surprises!) */
mov $sym_phys(__bss_start),%edi
@@ -192,6 +195,9 @@ __start:
#include "cmdline.S"
+reloc:
+#include "reloc.S"
+
.align 16
.globl trampoline_start, trampoline_end
trampoline_start: