Bug 9928 - /proc/cpuinfo wrong about F00F bug, cache size on old Pentium
Summary: /proc/cpuinfo wrong about F00F bug, cache size on old Pentium
Status: CLOSED CODE_FIX
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: i386 (show other bugs)
Hardware: All Linux
: P1 low
Assignee: platform_i386
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-10 04:50 UTC by David Flater
Modified: 2008-09-11 03:37 UTC (History)
0 users

See Also:
Kernel Version: 2.6.24.1
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
CPU info according to Intel Processor Frequency ID Utility (55.84 KB, image/png)
2008-09-05 18:14 UTC, David Flater
Details

Description David Flater 2008-02-10 04:50:55 UTC
Linux version 2.6.24.1 (dave@yellowbeard) (gcc version 4.2.1) #3 Sat Feb 9 22:24:04 EST 2008

Running on a 166 MHz Pentium "Classic."  Console messages during boot correctly note the presence of the F00F bug:
Intel Pentium with F0 0F bug - workaround enabled.

However, /proc/cpuinfo does not (and 0 cache is wrong too):
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 5
model           : 2
model name      : Pentium 75 - 200
stepping        : 12
cpu MHz         : 165.794
cache size      : 0 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr mce cx8
bogomips        : 332.94
clflush size    : 32

Other possibly helpful info from dmesg:
CPU: After generic identify, caps: 000001bf 00000000 00000000 00000000 00000000 
00000000 00000000 00000000
CPU: After all inits, caps: 000001bf 00000000 00000000 00000000 00000000 0000000
0 00000000 00000000
Comment 1 Thomas Gleixner 2008-09-05 05:34:35 UTC
Is this fixed in current mainline ?
Comment 2 H. Peter Anvin 2008-09-05 09:13:35 UTC
Doubt it.  Pentium Classic didn't export information about the cache size, so it's likely to be unavailable unless we compile in a table.

I don't know if the F00F message is right or not.  We always activate the workaround (readonly GDT, I believe) if we see a Pentium Classic.
Comment 3 David Flater 2008-09-05 18:14:34 UTC
Created attachment 17643 [details]
CPU info according to Intel Processor Frequency ID Utility

Linux version 2.6.26.3-CD (root@yellowbeard) (gcc version 4.3.2 (GCC) ) #2 SMP Mon Sep 1 16:32:31 EDT 2008

The only change was the addition of "up" to the flags line of cpuinfo.

Intel doesn't detect the L2 cache either (see attachment).  For this chipset the L2 cache is a separate module that comes in various sizes independent of the CPU.

init_intel in arch/x86/kernel/cpu/intel.c sets c->f00f_bug = 1.  So what happens to that cpuinfo_x86 afterward?
Comment 4 H. Peter Anvin 2008-09-05 18:18:27 UTC
There is a memory overwrite bug that is fixed in one of the 2.6.27-rcX kernels.
Please try the latest -rc kernel to verify.
Comment 5 David Flater 2008-09-05 19:25:55 UTC
Yeah, that did it.

Linux version 2.6.27-rc5-quake (root@yellowbeard) (gcc version 4.3.2 (GCC) ) #1 SMP Fri Sep 5 21:59:10 EDT 2008

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 5
model           : 2
model name      : Pentium 75 - 200
stepping        : 12
cpu MHz         : 165.794
cache size      : 0 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : yes
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr mce cx8 up
bogomips        : 331.40
clflush size    : 32
power management:

Note You need to log in before you can comment on or make changes to this bug.