ia64/xen-unstable

changeset 5762:3a4ef6acd545

Fix NX/XD enable on secondary CPUs.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Jul 13 08:25:08 2005 +0000 (2005-07-13)
parents faf7e6254712
children 6778d68a2c4c
files xen/arch/x86/boot/x86_64.S
line diff
     1.1 --- a/xen/arch/x86/boot/x86_64.S	Tue Jul 12 17:31:16 2005 +0000
     1.2 +++ b/xen/arch/x86/boot/x86_64.S	Wed Jul 13 08:25:08 2005 +0000
     1.3 @@ -76,7 +76,7 @@ 3:      in      %dx,%al
     1.4          cpuid
     1.5          bt      $29,%edx            # Long mode feature?
     1.6          jnc     bad_cpu
     1.7 -        mov     %edx,%edi
     1.8 +        mov     %edx,0x100310       # cpuid_ext_features
     1.9  skip_boot_checks:
    1.10  
    1.11          /* Set up FPU. */
    1.12 @@ -95,6 +95,7 @@ skip_boot_checks:
    1.13          rdmsr
    1.14          btsl    $_EFER_LME,%eax /* Long Mode      */
    1.15          btsl    $_EFER_SCE,%eax /* SYSCALL/SYSRET */
    1.16 +        mov     0x100310,%edi
    1.17          btl     $20,%edi        /* CPUID 0x80000001, EDX[20] */
    1.18          jnc     1f
    1.19          btsl    $_EFER_NX,%eax  /* No-Execute     */
    1.20 @@ -105,10 +106,10 @@ 1:      wrmsr
    1.21          jmp     1f
    1.22  
    1.23  1:      /* Now in compatibility mode. Long-jump into 64-bit mode. */
    1.24 -        ljmp    $(__HYPERVISOR_CS64),$0x100100
    1.25 +        ljmp    $(__HYPERVISOR_CS64),$0x100200
    1.26          
    1.27          .code64
    1.28 -        .org    0x0100
    1.29 +        .org    0x0200
    1.30  
    1.31          /* Install relocated selectors (FS/GS unused). */
    1.32          lgdt    gdt_descr(%rip)
    1.33 @@ -200,7 +201,10 @@ nopaging_gdt_descr:   /* 0x306 */
    1.34          .word   LAST_RESERVED_GDT_BYTE
    1.35          .quad   gdt_table - FIRST_RESERVED_GDT_BYTE - __PAGE_OFFSET
    1.36  
    1.37 -        .word   0,0,0
    1.38 +cpuid_ext_features:   /* 0x310 */
    1.39 +        .long   0
    1.40 +        
    1.41 +        .word   0
    1.42  gdt_descr:
    1.43          .word   LAST_RESERVED_GDT_BYTE
    1.44  gdt: