ia64/xen-unstable

changeset 16181:3b481059a54d

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 <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Mon Oct 22 07:44:25 2007 +0100 (2007-10-22)
parents 7231d971f78c
children d77da4c174f7
files xen/arch/x86/boot/trampoline.S xen/include/asm-x86/config.h
line diff
     1.1 --- a/xen/arch/x86/boot/trampoline.S	Sat Oct 20 09:30:00 2007 +0100
     1.2 +++ b/xen/arch/x86/boot/trampoline.S	Mon Oct 22 07:44:25 2007 +0100
     1.3 @@ -22,13 +22,22 @@ trampoline_realmode_entry:
     1.4  idt_48: .word   0, 0, 0 # base = limit = 0
     1.5  gdt_48: .word   6*8-1
     1.6          .long   bootsym_phys(trampoline_gdt)
     1.7 +        .align  8
     1.8  trampoline_gdt:
     1.9 -        .quad   0x0000000000000000     /* 0x0000: unused */
    1.10 -        .quad   0x00cf9a000000ffff     /* 0x0008: ring 0 code, 32-bit mode */
    1.11 -        .quad   0x00af9a000000ffff     /* 0x0010: ring 0 code, 64-bit mode */
    1.12 -        .quad   0x00cf92000000ffff     /* 0x0018: ring 0 data */
    1.13 -        .quad   0x00009a090000ffff     /* 0x0020: real-mode code @ 0x90000 */
    1.14 -        .quad   0x000092090000ffff     /* 0x0028: real-mode data @ 0x90000 */
    1.15 +        /* 0x0000: unused */
    1.16 +        .quad   0x0000000000000000
    1.17 +        /* 0x0008: ring 0 code, 32-bit mode */
    1.18 +        .quad   0x00cf9a000000ffff
    1.19 +        /* 0x0010: ring 0 code, 64-bit mode */
    1.20 +        .quad   0x00af9a000000ffff
    1.21 +        /* 0x0018: ring 0 data */
    1.22 +        .quad   0x00cf92000000ffff
    1.23 +        /* 0x0020: real-mode code @ BOOT_TRAMPOLINE */
    1.24 +        .long   0x0000ffff | ((BOOT_TRAMPOLINE & 0x00ffff) << 16)
    1.25 +        .long   0x00009a00 | ((BOOT_TRAMPOLINE & 0xff0000) >> 16)
    1.26 +        /* 0x0028: real-mode data @ BOOT_TRAMPOLINE */
    1.27 +        .long   0x0000ffff | ((BOOT_TRAMPOLINE & 0x00ffff) << 16)
    1.28 +        .long   0x00009200 | ((BOOT_TRAMPOLINE & 0xff0000) >> 16)
    1.29  
    1.30  cpuid_ext_features:
    1.31          .long   0
    1.32 @@ -142,7 +151,7 @@ 1:      mov     $(BOOT_TRAMPOLINE>>4),%a
    1.33          mov     %ax,%es
    1.34          mov     %ax,%ss
    1.35  
    1.36 -        /* Stack grows down from 0x93000. Initialise IDT and enable irqs. */
    1.37 +        /* Stack grows down from +0x3000. Initialise IDT and enable irqs. */
    1.38          mov     $0x3000,%sp
    1.39          lidt    bootsym(rm_idt)
    1.40          sti
     2.1 --- a/xen/include/asm-x86/config.h	Sat Oct 20 09:30:00 2007 +0100
     2.2 +++ b/xen/include/asm-x86/config.h	Mon Oct 22 07:44:25 2007 +0100
     2.3 @@ -93,7 +93,7 @@
     2.4  
     2.5  #define CONFIG_DMA_BITSIZE 32
     2.6  
     2.7 -#define BOOT_TRAMPOLINE 0x90000
     2.8 +#define BOOT_TRAMPOLINE 0x94000
     2.9  #define bootsym_phys(sym)                                 \
    2.10      (((unsigned long)&(sym)-(unsigned long)&trampoline_start)+BOOT_TRAMPOLINE)
    2.11  #define bootsym(sym)                                      \