Bug 163 - Impossible to setup MTRR registers
Summary: Impossible to setup MTRR registers
Status: CLOSED CODE_FIX
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Martin J. Bligh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-11 13:22 UTC by Paulo Andre'
Modified: 2003-01-25 14:51 UTC (History)
0 users

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


Attachments

Description Paulo Andre' 2002-12-11 13:22:21 UTC
Exact Kernel version: 2.5.51

Distribution: Slackware 8.1 

Hardware Environment: Pentium III 500MHz, 128MB RAM
Software Environment: glibc-2.2.5, gcc-2.95.3
Problem Description: It seems to be impossible to setup the MTRR registers. 
Whenever I try to set them up via /proc/mtrr, it fails whatever the type I 
assign to it saying the type is illegal. 

This doesn't happen on 2.4 though.


Steps to reproduce:

# echo "base=0xd8000000 size=0x2000000 type=write-combining" >| /proc/mtrr

ubik kernel: mtrr: illegal type: "write-combining"

# echo "base=0xd8000000 size=0x2000000 type=write-back" >| /proc/mtrr

ubik kernel: mtrr: illegal type: "write-back"
Comment 1 Dave Jones 2002-12-12 05:39:39 UTC
Andi Kleen fixed up a bunch of bugs in the MTRR driver as part of the current
x86-64 patch. I've extracted the relevant bits. Can you give it a try ?

It's at http://www.codemonkey.org.uk/cruft/mtrr.diff
Comment 2 Paulo Andre' 2002-12-12 06:47:09 UTC
Yes, the patch fixes it. It's now possible to set up the MTRR registers:

root@ubik:/home/paulo# cat /proc/mtrr
reg00: base=0x00000000 (   0MB), size= 128MB: write-back, count=1
root@ubik:/home/paulo# echo "base=0xd8000000 size=0x2000000 
type=write-combining" >| /proc/mtrr
root@ubik:/home/paulo# cat /proc/mtrr                                          
reg00: base=0x00000000 (   0MB), size= 128MB: write-back, count=1
reg01: base=0xd8000000 (3456MB), size=  32MB: write-combining, count=1

Comment 3 Dave Jones 2002-12-13 16:44:32 UTC
Close when merged to mainline.
Comment 4 Randy Dunlap 2003-01-25 14:51:30 UTC
The patch is merged in 2.5.59.

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