Bug 39845 - mtrr not working properly (kernel 2.4.2-2)
mtrr not working properly (kernel 2.4.2-2)
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
7.1
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-05-09 05:37 EDT by Bernhard Ege
Modified: 2007-04-18 12:33 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-05-14 08:20:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bernhard Ege 2001-05-09 05:37:03 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.2-2 i686)

Description of problem:
I am using X 4.0.3 with nvidia 769 driver. I am using PCI mode. X was
running slower than on 2.2.16-22 kernel which made me look at /proc/mtrr:

reg00: base=0x00000000 (   0MB), size=16711936MB: write-back, count=1

This is obviously wrong. I can remove the entry and insert a correct one:

echo "disable=reg00" > /proc/mtrr
echo "base=0x00000000 size=0x10000000 type=write-back" > /proc/mtrr

/proc/mtrr has this to say:

reg00: base=0x00000000 (   0MB), size=16773376MB: write-back, count=1

I cannot enter further mtrr entries (I should be able to).

How reproducible:
Always

Steps to Reproduce:
Any mtrr setting will be faulty, either entered using /proc/mtrr or letting
X (nvidia driver do it).

Additional info:

Here is what lspci says about my system (for better insight in my
setup):

00:00.0 Host bridge: Advanced Micro Devices [AMD] AMD-751 [Irongate] System
Controller (rev 23)
00:01.0 PCI bridge: Advanced Micro Devices [AMD] AMD-751 [Irongate] AGP
Bridge (rev 01)
00:07.0 ISA bridge: Advanced Micro Devices [AMD] AMD-756 [Viper] ISA (rev
01)
00:07.1 IDE interface: Advanced Micro Devices [AMD] AMD-756 [Viper] IDE
(rev 03)00:07.3 Bridge: Advanced Micro Devices [AMD] AMD-756 [Viper] ACPI
(rev 03)
00:08.0 Multimedia audio controller: Yamaha Corporation YMF-724F [DS-1
Audio Controller] (rev 03)
00:0a.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139 (rev
10)
01:05.0 VGA compatible controller: nVidia Corporation NV11 (rev a1)

This is the MSI 6167 mainboard.

dmesg says this about mtrr (during bios initialisation):

mtrr: v1.37 (20001109) Richard Gooch (rgooch@atnf.csiro.au)
mtrr: detected mtrr type: Intel

dmesg has this to says about the later mtrr changes:

mtrr: type mismatch for d8000000,400000 old: write-back new:
write-combining
NVRM: loading NVIDIA kernel module version 1.0-769
mtrr: type mismatch for d8000000,2000000 old: write-back new:
write-combining

These two mtrr changes are the ones the nvidia kernel module issues
(they obviously fail).
Comment 1 Arjan van de Ven 2001-05-09 05:40:14 EDT
Please file all bugs regarding the binary-only NVidia driver to NVidia
Comment 2 Bernhard Ege 2001-05-09 06:35:37 EDT
This is *not* a nvidia related bug as it turns out it still exists when I shut
down X and unload the NVdriver module. I can empty the mtrr register:

echo "disable=reg00" > /proc/mtrr

/proc/mtrr is empty now and the system is *slow*.

I enter this to mtrr:

echo "base=0x00000000 size=0x10000000 type=write-back" > /proc/mtrr

/proc/mtrr now has this to say:

reg00: base=0x00000000 (   0MB), size=16773376MB: write-back, count=1

This is without any nvidia related binaries or anything else loaded.
Comment 3 Arjan van de Ven 2001-05-09 06:39:59 EDT
Please retry without the nvidia modules EVER being loaded since the reboot.
Comment 4 Bernhard Ege 2001-05-09 07:29:08 EDT
I have now performed a reboot and without ever having started the nvidia module
the problem still persists. This is what I did just after the reboot:

[root@overmind /root]# cat /proc/mtrr
reg00: base=0x00000000 (   0MB), size=16711936MB: write-back, count=1
[root@overmind /root]# echo "disable=reg00" > /proc/mtrr
[root@overmind /root]# echo "base=0x00000000 size=0x10000000 type=write-back" >
/proc/mtrr
[root@overmind /root]# cat /proc/mtrr
reg00: base=0x00000000 (   0MB), size=16773376MB: write-back, count=1
[root@overmind /root]# lsmod
Module                  Size  Used by
nfsd                   69696   8  (autoclean)
lockd                  52464   1  (autoclean) [nfsd]
sunrpc                 61328   1  (autoclean) [nfsd lockd]
libafs-2.4.2-2        381264   2
autofs                 11264   2  (autoclean)
8139too                16480   1  (autoclean)
ipchains               38976   0  (unused)
ide-scsi                8352   0
scsi_mod               95104   1  [ide-scsi]
ide-cd                 26848   0
cdrom                  27232   0  [ide-cd]
nls_iso8859-1           2880   2  (autoclean)
nls_cp437               4384   2  (autoclean)
vfat                    9392   2  (autoclean)
fat                    32672   0  (autoclean) [vfat]

Any ideas?
Comment 5 Arjan van de Ven 2001-05-09 07:37:00 EDT
Is it correct that you have 256Mb of ram ?
Comment 6 Bernhard Ege 2001-05-09 08:00:31 EDT
Yes, that is correct.
Comment 7 Alexei Podtelezhnikov 2001-05-09 15:50:49 EDT
Sometimes, e.g. starting X, I see the same "mtrr: type mismatch" messages on 
Athlon MS-6195 motherboard (AMD-751/756) with Rage 128 pro AGP card. Do you need
more information?
Comment 8 Arjan van de Ven 2001-05-09 16:04:10 EDT
I just tried on my home athlon machine, and it works there. Although I have
768Mb of ram... This is a strange problem.
Comment 9 Bernhard Ege 2001-05-14 08:09:24 EDT
I have just installed the rawhide kernel, 2.4.3-2.14.14, rebooted and now MTRR
works as expected. Now alsasound cannot be recompiled
(/usr/src/linux-2.4.3/include/asm/pgalloc-2level.h is missing). kernel-headers
are also too old.
Comment 10 Arjan van de Ven 2001-05-14 08:19:57 EDT
"pgalloc-2level.h" is no longer present in the kernel. 
It is really surprising ALSA needs this header as it is a very very architecture
specific file and normal drivers shouldn't need to include it.
As this is a generic kernel change, I would not be surprised if a newer ALSA
driver is released that fixes this.
Comment 11 Bernhard Ege 2001-05-14 08:30:05 EDT
I forgot a make clean in alsasound and that caused the problem. alsasound works
just fine with kernel-2.4.3-2.14.14.
Comment 12 Nick Lamb 2001-05-27 19:03:58 EDT
This problem seems to have been a symptom of changes to the MTRR support in 2.4

The fix is mtrr.c version 1.39 which contains the comment

  v1.39
    20010312   Dave Jones <davej@suse.de>
               Ugh, I broke AMD support.
               Reworked fix by Troels Walsted Hansen <troels@thule.no>

This is included in 2.4.3 kernels from RawHide so all AMD users seeing errors
like this should probably consider upgrading.
Comment 13 Alexander Stohr 2001-05-31 21:38:20 EDT
This was an initialisation problem in the mtrr coding.
For current Athlon CPUs it was pretty likely that the
and/or mask values didnt get initialized and therfore
gigantic size values got composed from CPU registers.

The bug is fixed in official Linux Kernel 2.4.4 and later.

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