debuggers.hg

changeset 20966:83a6621b91bf

x86: move trampoline location

A partner of ours is reporting boot failures (Xen not even emitting a
single message) over iSCSI on new (UEFI based) systems. After
pointing at their BIOS initially I finally remembered to take a look
at the memory map a native kernel booted this way see - and voila, the
BIOS reports memory starting at 0x8d000 as reserved. Xen, however,
places about 12k of (trampoline) data at 0x8c000.

For now, move the trampolien down by 4kB to 0x88000. Later we may
choose the location dynamically based on E820 information, if this
proves to be an ongoing problem.

One thing this patch enforces in any case is a single point of
definition for the hard coded location, so that at least adjusting it
won't require more than a single line change in the future.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Feb 10 09:20:56 2010 +0000 (2010-02-10)
parents 10a54ab63607
children f5fba6214a20
files xen/arch/x86/boot/Makefile xen/arch/x86/boot/build32.mk xen/include/asm-x86/config.h
line diff
     1.1 --- a/xen/arch/x86/boot/Makefile	Wed Feb 10 09:19:16 2010 +0000
     1.2 +++ b/xen/arch/x86/boot/Makefile	Wed Feb 10 09:20:56 2010 +0000
     1.3 @@ -2,6 +2,8 @@ obj-y += head.o
     1.4  
     1.5  head.o: reloc.S
     1.6  
     1.7 -# NB. BOOT_TRAMPOLINE == 0x8c000
     1.8 +BOOT_TRAMPOLINE := $(shell sed -n 's,^\#define[[:space:]]\+BOOT_TRAMPOLINE[[:space:]]\+,,p' $(BASEDIR)/include/asm-x86/config.h)
     1.9  %.S: %.c
    1.10 -	RELOC=0x8c000 $(MAKE) -f build32.mk $@
    1.11 +	RELOC=$(BOOT_TRAMPOLINE) $(MAKE) -f build32.mk $@
    1.12 +
    1.13 +reloc.S: $(BASEDIR)/include/asm-x86/config.h
     2.1 --- a/xen/arch/x86/boot/build32.mk	Wed Feb 10 09:19:16 2010 +0000
     2.2 +++ b/xen/arch/x86/boot/build32.mk	Wed Feb 10 09:20:56 2010 +0000
     2.3 @@ -19,7 +19,9 @@ CFLAGS += -Werror -fno-builtin -msoft-fl
     2.4  	$(OBJCOPY) -O binary $< $@
     2.5  
     2.6  %.lnk: %.o
     2.7 -	$(LD) $(LDFLAGS_DIRECT) -N -Ttext 0x8c000 -o $@ $<
     2.8 +	$(LD) $(LDFLAGS_DIRECT) -N -Ttext $(RELOC) -o $@ $<
     2.9  
    2.10  %.o: %.c
    2.11  	$(CC) $(CFLAGS) -c $< -o $@
    2.12 +
    2.13 +reloc.o: $(BASEDIR)/include/asm-x86/config.h
     3.1 --- a/xen/include/asm-x86/config.h	Wed Feb 10 09:19:16 2010 +0000
     3.2 +++ b/xen/include/asm-x86/config.h	Wed Feb 10 09:20:56 2010 +0000
     3.3 @@ -94,7 +94,7 @@
     3.4  /* Primary stack is restricted to 8kB by guard pages. */
     3.5  #define PRIMARY_STACK_SIZE 8192
     3.6  
     3.7 -#define BOOT_TRAMPOLINE 0x8c000
     3.8 +#define BOOT_TRAMPOLINE 0x88000
     3.9  #define bootsym_phys(sym)                                 \
    3.10      (((unsigned long)&(sym)-(unsigned long)&trampoline_start)+BOOT_TRAMPOLINE)
    3.11  #define bootsym(sym)                                      \