ia64/xen-unstable

changeset 11617:83b53eeb8a5c

[XEN] Use symbolic constants to determine segment limits.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kfraser@localhost.localdomain
date Mon Sep 25 09:29:28 2006 +0100 (2006-09-25)
parents 4b6284d2c11c
children ab2817b9547b
files xen/arch/x86/boot/x86_32.S
line diff
     1.1 --- a/xen/arch/x86/boot/x86_32.S	Mon Sep 25 09:27:46 2006 +0100
     1.2 +++ b/xen/arch/x86/boot/x86_32.S	Mon Sep 25 09:29:28 2006 +0100
     1.3 @@ -218,28 +218,24 @@ nopaging_gdt_descr:
     1.4          .word   LAST_RESERVED_GDT_BYTE
     1.5          .long   gdt_table - FIRST_RESERVED_GDT_BYTE - __PAGE_OFFSET
     1.6          
     1.7 -        .org 0x1000
     1.8 -/* NB. Rings != 0 get access up to 0xFC400000. This allows access to the */
     1.9 -/*     machine->physical mapping table. Ring 0 can access all memory.    */
    1.10 +        .align PAGE_SIZE, 0
    1.11 +/* NB. Rings != 0 get access up to MACH2PHYS_VIRT_END. This allows access to */
    1.12 +/*     the machine->physical mapping table. Ring 0 can access all memory.    */
    1.13 +#define LIMIT(d) (((d) << 16)                                           \
    1.14 +                  | (((MACH2PHYS_VIRT_END - 1) >> 12) & 0xffff)         \
    1.15 +                  | (((MACH2PHYS_VIRT_END - 1) << 20) & (0xf << 48)))
    1.16  ENTRY(gdt_table)
    1.17          .quad 0x0000000000000000     /* unused */
    1.18          .quad 0x00cf9a000000ffff     /* 0xe008 ring 0 4.00GB code at 0x0 */
    1.19          .quad 0x00cf92000000ffff     /* 0xe010 ring 0 4.00GB data at 0x0 */
    1.20 -#ifdef CONFIG_X86_PAE
    1.21 -        .quad 0x00cfba00000067ff
    1.22 -        .quad 0x00cfb200000067ff
    1.23 -        .quad 0x00cffa00000067ff
    1.24 -        .quad 0x00cff200000067ff
    1.25 -#else
    1.26 -        .quad 0x00cfba000000c3ff     /* 0xe019 ring 1 3.95GB code at 0x0 */
    1.27 -        .quad 0x00cfb2000000c3ff     /* 0xe021 ring 1 3.95GB data at 0x0 */
    1.28 -        .quad 0x00cffa000000c3ff     /* 0xe02b ring 3 3.95GB code at 0x0 */
    1.29 -        .quad 0x00cff2000000c3ff     /* 0xe033 ring 3 3.95GB data at 0x0 */
    1.30 -#endif
    1.31 +        .quad LIMIT(0x00c0ba000000)  /* 0xe019 ring 1 3.xxGB code at 0x0 */
    1.32 +        .quad LIMIT(0x00c0b2000000)  /* 0xe021 ring 1 3.xxGB data at 0x0 */
    1.33 +        .quad LIMIT(0x00c0fa000000)  /* 0xe02b ring 3 3.xxGB code at 0x0 */
    1.34 +        .quad LIMIT(0x00c0f2000000)  /* 0xe033 ring 3 3.xxGB data at 0x0 */
    1.35          .quad 0x0000000000000000     /* unused                           */
    1.36          .fill 2*NR_CPUS,8,0          /* space for TSS and LDT per CPU    */
    1.37  
    1.38 -        .org 0x2000
    1.39 +        .align PAGE_SIZE, 0
    1.40  
    1.41  #ifdef CONFIG_X86_PAE
    1.42  ENTRY(idle_pg_table)