diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-06-05 10:28:59 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-06-05 10:28:59 +0100 |
commit | 64d7481db2c56202d8e92835671512c5787bb9bc (patch) | |
tree | d698abe7009fc5e864614876b955eea528ef545b /xen/arch/x86/boot/trampoline.S | |
parent | 4d113a718451b4298397b65dc7c4e0e526796d56 (diff) | |
download | xen-64d7481db2c56202d8e92835671512c5787bb9bc.tar.gz xen-64d7481db2c56202d8e92835671512c5787bb9bc.tar.bz2 xen-64d7481db2c56202d8e92835671512c5787bb9bc.zip |
xen: Boot on PAE systems with no EFER MSR.
Bug tracked down by Stefan Berger.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/arch/x86/boot/trampoline.S')
-rw-r--r-- | xen/arch/x86/boot/trampoline.S | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/xen/arch/x86/boot/trampoline.S b/xen/arch/x86/boot/trampoline.S index 6df2ba8c02..0eb9dcee8c 100644 --- a/xen/arch/x86/boot/trampoline.S +++ b/xen/arch/x86/boot/trampoline.S @@ -60,17 +60,20 @@ trampoline_protmode_entry: #if CONFIG_PAGING_LEVELS != 2 /* Set up EFER (Extended Feature Enable Register). */ + mov SYM_TRAMP_PHYS(cpuid_ext_features),%edi + test $0x20100800,%edi /* SYSCALL/SYSRET, No Execute, Long Mode? */ + jz .Lskip_efer movl $MSR_EFER,%ecx rdmsr #if CONFIG_PAGING_LEVELS == 4 btsl $_EFER_LME,%eax /* Long Mode */ btsl $_EFER_SCE,%eax /* SYSCALL/SYSRET */ #endif - mov SYM_TRAMP_PHYS(cpuid_ext_features),%edi - btl $20,%edi /* CPUID 0x80000001, EDX[20] */ + btl $20,%edi /* No Execute? */ jnc 1f - btsl $_EFER_NX,%eax /* No-Execute */ + btsl $_EFER_NX,%eax /* No Execute */ 1: wrmsr +.Lskip_efer: #endif mov $0x80050033,%eax /* hi-to-lo: PG,AM,WP,NE,ET,MP,PE */ |