Skip to content
Snippets Groups Projects
Verified Commit c92ba0b8 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Do not enable OSXSAVE, Redox does not need it

parent 4bc8377f
No related branches found
No related tags found
No related merge requests found
...@@ -14,9 +14,9 @@ long_mode: ...@@ -14,9 +14,9 @@ long_mode:
and eax, 0x7FFFFFFF and eax, 0x7FFFFFFF
mov cr0, eax mov cr0, eax
; enable OSXSAVE, FXSAVE/FXRSTOR, Page Global, Page Address Extension, and Page Size Extension ; enable FXSAVE/FXRSTOR, Page Global, Page Address Extension, and Page Size Extension
mov eax, cr4 mov eax, cr4
or eax, 1 << 18 | 1 << 9 | 1 << 7 | 1 << 5 | 1 << 4 or eax, 1 << 9 | 1 << 7 | 1 << 5 | 1 << 4
mov cr4, eax mov cr4, eax
; load long mode GDT ; load long mode GDT
......
...@@ -39,10 +39,9 @@ unsafe extern "C" fn kernel_entry( ...@@ -39,10 +39,9 @@ unsafe extern "C" fn kernel_entry(
// Disable interrupts // Disable interrupts
asm!("cli"); asm!("cli");
// Enable OSXSAVE, FXSAVE/FXRSTOR, Page Global, Page Address Extension, and Page Size Extension // Enable FXSAVE/FXRSTOR, Page Global, Page Address Extension, and Page Size Extension
let mut cr4 = controlregs::cr4(); let mut cr4 = controlregs::cr4();
cr4 |= Cr4::CR4_ENABLE_OS_XSAVE cr4 |= Cr4::CR4_ENABLE_SSE
| Cr4::CR4_ENABLE_SSE
| Cr4::CR4_ENABLE_GLOBAL_PAGES | Cr4::CR4_ENABLE_GLOBAL_PAGES
| Cr4::CR4_ENABLE_PAE | Cr4::CR4_ENABLE_PAE
| Cr4::CR4_ENABLE_PSE; | Cr4::CR4_ENABLE_PSE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment