From: Keir Fraser Date: Mon, 22 Oct 2007 06:44:25 +0000 (+0100) Subject: x86: Allow BOOT_TRAMPOLINE to be changed without needing manual X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14847^2~8 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f72027fbb24d2209ca14cc875278e3cf018f3f0b;p=xen.git x86: Allow BOOT_TRAMPOLINE to be changed without needing manual modification of the trampoline GDT. Adjust trampoline base to 0x94000. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/boot/trampoline.S b/xen/arch/x86/boot/trampoline.S index ca2337af23..ab4c46e728 100644 --- a/xen/arch/x86/boot/trampoline.S +++ b/xen/arch/x86/boot/trampoline.S @@ -22,13 +22,22 @@ trampoline_realmode_entry: idt_48: .word 0, 0, 0 # base = limit = 0 gdt_48: .word 6*8-1 .long bootsym_phys(trampoline_gdt) + .align 8 trampoline_gdt: - .quad 0x0000000000000000 /* 0x0000: unused */ - .quad 0x00cf9a000000ffff /* 0x0008: ring 0 code, 32-bit mode */ - .quad 0x00af9a000000ffff /* 0x0010: ring 0 code, 64-bit mode */ - .quad 0x00cf92000000ffff /* 0x0018: ring 0 data */ - .quad 0x00009a090000ffff /* 0x0020: real-mode code @ 0x90000 */ - .quad 0x000092090000ffff /* 0x0028: real-mode data @ 0x90000 */ + /* 0x0000: unused */ + .quad 0x0000000000000000 + /* 0x0008: ring 0 code, 32-bit mode */ + .quad 0x00cf9a000000ffff + /* 0x0010: ring 0 code, 64-bit mode */ + .quad 0x00af9a000000ffff + /* 0x0018: ring 0 data */ + .quad 0x00cf92000000ffff + /* 0x0020: real-mode code @ BOOT_TRAMPOLINE */ + .long 0x0000ffff | ((BOOT_TRAMPOLINE & 0x00ffff) << 16) + .long 0x00009a00 | ((BOOT_TRAMPOLINE & 0xff0000) >> 16) + /* 0x0028: real-mode data @ BOOT_TRAMPOLINE */ + .long 0x0000ffff | ((BOOT_TRAMPOLINE & 0x00ffff) << 16) + .long 0x00009200 | ((BOOT_TRAMPOLINE & 0xff0000) >> 16) cpuid_ext_features: .long 0 @@ -142,7 +151,7 @@ trampoline_boot_cpu_entry: mov %ax,%es mov %ax,%ss - /* Stack grows down from 0x93000. Initialise IDT and enable irqs. */ + /* Stack grows down from +0x3000. Initialise IDT and enable irqs. */ mov $0x3000,%sp lidt bootsym(rm_idt) sti diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h index 698868fc74..669d0e0ea5 100644 --- a/xen/include/asm-x86/config.h +++ b/xen/include/asm-x86/config.h @@ -93,7 +93,7 @@ #define CONFIG_DMA_BITSIZE 32 -#define BOOT_TRAMPOLINE 0x90000 +#define BOOT_TRAMPOLINE 0x94000 #define bootsym_phys(sym) \ (((unsigned long)&(sym)-(unsigned long)&trampoline_start)+BOOT_TRAMPOLINE) #define bootsym(sym) \