Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336151
b: refs/heads/master
c: 6662c34
h: refs/heads/master
i:
  336149: b4e8380
  336147: 195a993
  336143: 17e05d9
v: v3
  • Loading branch information
H. Peter Anvin committed Nov 27, 2012
1 parent e4f33bf commit 307c871
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb7cb2864e758a1b040040bc55e404c677c911cb
refs/heads/master: 6662c34fa9c60a48aaa5879cb229cd9a84de9c22
9 changes: 7 additions & 2 deletions trunk/arch/x86/kernel/head_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ default_entry:
* be using the global pages.
*
* NOTE! If we are on a 486 we may have no cr4 at all!
* Specifically, cr4 exists if and only if CPUID exists,
* which in turn exists if and only if EFLAGS.ID exists.
* Specifically, cr4 exists if and only if CPUID exists
* and has flags other than the FPU flag set.
*/
movl $X86_EFLAGS_ID,%ecx
pushl %ecx
Expand All @@ -308,6 +308,11 @@ default_entry:
testl %ecx,%eax
jz 6f # No ID flag = no CPUID = no CR4

movl $1,%eax
cpuid
andl $~1,%edx # Ignore CPUID.FPU
jz 6f # No flags or only CPUID.FPU = no CR4

movl pa(mmu_cr4_features),%eax
movl %eax,%cr4

Expand Down

0 comments on commit 307c871

Please sign in to comment.