Modify cpu feat barrier for enabling CR4_OSXSAVE
authorMichael Taufen <mtaufen@gmail.com>
Tue, 22 Mar 2016 16:17:46 +0000 (09:17 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 22 Mar 2016 20:15:01 +0000 (16:15 -0400)
Signed-off-by: Michael Taufen <mtaufen@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/init.c
kern/arch/x86/smp_boot.c

index b9a2449..cb1f23d 100644 (file)
@@ -93,7 +93,7 @@ void ancillary_state_init(void)
        if (!cpu_has_feat(CPU_FEAT_X86_FXSR))
                panic("No FXSAVE/FXRSTOR (FXSR) support! Refusing to boot.");
 
-       if (cpu_has_feat(CPU_FEAT_X86_XSAVEOPT)) {
+       if (cpu_has_feat(CPU_FEAT_X86_XSAVE)) {
                // Next determine the user state components supported
                // by the processor and set x86_default_xcr0.
                cpuid(0x0d, 0x00, &eax, 0, 0, &edx);
index f58e7c0..ef2a5c5 100644 (file)
@@ -295,7 +295,7 @@ void __arch_pcpu_init(uint32_t coreid)
         */
        lcr4(rcr4() | CR4_OSFXSR | CR4_OSXMME);
 
-       if (cpu_has_feat(CPU_FEAT_X86_XSAVEOPT)) {
+       if (cpu_has_feat(CPU_FEAT_X86_XSAVE)) {
                // You MUST set CR4.OSXSAVE before loading xcr0
                lcr4(rcr4() | CR4_OSXSAVE);
                // Set xcr0 to the Akaros-wide default