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"
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
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
Close when merged to mainline.
The patch is merged in 2.5.59.