2008-08-29 15:09:56

by Alexander Huemer

[permalink] [raw]
Subject: Re: 2.6.27 mtrr fixes do not work

Yinghai Lu wrote:
> On Mon, Aug 25, 2008 at 4:29 PM, Alexander Huemer
> <[email protected]> wrote:
>> Yinghai Lu wrote:
>>> On Mon, Aug 25, 2008 at 1:44 PM, Yinghai Lu <[email protected]> wrote:
>>>
>>>> On Mon, Aug 25, 2008 at 1:24 PM, Alexander Huemer
>>>> <[email protected]> wrote:
>>>>
>>>>
>>>>> what do you mean with tip/master?
>>>>>
>>>> http://people.redhat.com/mingo/tip.git/readme.txt
>>>>
>>>>
>>>>> here is my .config: http://xx.vu/~ahuemer/config.txt
>>>>>
>>> using your config, i do get mtrr cleanup
>>>
>> very interesting, thx.
>> so, what can i do to make it working here?
>> are there some more debug options i could turn on?
>>
>
> can you post whole boot log with command line
>
> console=uart8250,io,0x3f8,115200n8 debug show_msr=1
>
> assume you have serial console...
>
> YH
yinghai,

there are quite good news! 2.6.27-rc5 brought some significant changes.
now i get this:

# dmesg|grep -E "(mtrr|uvesafb)"
Command line: root=/dev/sda1 video=uvesafb:1280x1024p-97,mtrr:2
debug show_msr=1
mtrr: your BIOS has set up an incorrect mask, fixing it up.
Kernel command line: root=/dev/sda1
video=uvesafb:1280x1024p-97,mtrr:2 debug show_msr=1
uvesafb: XGI Technology, Inc., Volari Z9s, 1.09.10, OEM: XGI, VBE v3.0
uvesafb: VBIOS/hardware supports DDC2 transfers
uvesafb: monitor limits: vf = 97 Hz, hf = 129 kHz, clk = 364 MHz
uvesafb: scrolling: redraw
uvesafb: framebuffer at 0xd8000000, mapped to 0xffffc20002100000,
using 10240k, total 32768k
mtrr: 0xd8000000,0x2000000 overlaps existing 0xd8000000,0x800000
# grep -E "(^\(WW\)|^\(EE\)|^\(NI\)|^\(??\))" /var/log/Xorg.0.log
(WW) VESA(0): Failed to set up write-combining range
(0xd8000000,0x2000000)
# cat /proc/mtrr
reg00: base=0x00000000 ( 0MB), size=2048MB: write-back, count=1
reg01: base=0x80000000 (2048MB), size=1024MB: write-back, count=1
reg02: base=0x100000000 (4096MB), size=1024MB: write-back, count=1
reg03: base=0xd8000000 (3456MB), size= 8MB: write-back, count=1
# grep MemTotal /proc/meminfo
MemTotal: 4041064 kB
#

which is much better than before, the total size of system memory is
correct.
the size of the graphics adapter memory is not correct.
and AFAIK the memory ranges should be:

ranges of system memory until the beginning of the graphics adapter
memory is reached (in my case 0x00000000 - 0xd8000000).
one range of the graphics adapter memory (0xd8000000, size 0x2000000).
with write combining.
remaining range of system memory (if applicable).

is this correct, yinghai?
so, something seems to be still wrong, X is still not satisfied, but i
think the kernel hackers are on the right way.

--
regards
alex


2008-08-29 17:43:54

by Yinghai Lu

[permalink] [raw]
Subject: Re: 2.6.27 mtrr fixes do not work

On Fri, Aug 29, 2008 at 8:09 AM, Alexander Huemer
<[email protected]> wrote:
> Yinghai Lu wrote:
>> On Mon, Aug 25, 2008 at 4:29 PM, Alexander Huemer
>> <[email protected]> wrote:
>>> Yinghai Lu wrote:
>>>> On Mon, Aug 25, 2008 at 1:44 PM, Yinghai Lu <[email protected]> wrote:
>>>>
>>>>> On Mon, Aug 25, 2008 at 1:24 PM, Alexander Huemer
>>>>> <[email protected]> wrote:
>>>>>
>>>>>
>>>>>> what do you mean with tip/master?
>>>>>>
>>>>> http://people.redhat.com/mingo/tip.git/readme.txt
>>>>>
>>>>>
>>>>>> here is my .config: http://xx.vu/~ahuemer/config.txt
>>>>>>
>>>> using your config, i do get mtrr cleanup
>>>>
>>> very interesting, thx.
>>> so, what can i do to make it working here?
>>> are there some more debug options i could turn on?
>>>
>>
>> can you post whole boot log with command line
>>
>> console=uart8250,io,0x3f8,115200n8 debug show_msr=1
>>
>> assume you have serial console...
>>
>> YH
> yinghai,
>
> there are quite good news! 2.6.27-rc5 brought some significant changes.
> now i get this:
>
> # dmesg|grep -E "(mtrr|uvesafb)"
> Command line: root=/dev/sda1 video=uvesafb:1280x1024p-97,mtrr:2
> debug show_msr=1
> mtrr: your BIOS has set up an incorrect mask, fixing it up.
> Kernel command line: root=/dev/sda1
> video=uvesafb:1280x1024p-97,mtrr:2 debug show_msr=1
> uvesafb: XGI Technology, Inc., Volari Z9s, 1.09.10, OEM: XGI, VBE v3.0
> uvesafb: VBIOS/hardware supports DDC2 transfers
> uvesafb: monitor limits: vf = 97 Hz, hf = 129 kHz, clk = 364 MHz
> uvesafb: scrolling: redraw
> uvesafb: framebuffer at 0xd8000000, mapped to 0xffffc20002100000,
> using 10240k, total 32768k
> mtrr: 0xd8000000,0x2000000 overlaps existing 0xd8000000,0x800000
> # grep -E "(^\(WW\)|^\(EE\)|^\(NI\)|^\(??\))" /var/log/Xorg.0.log
> (WW) VESA(0): Failed to set up write-combining range
> (0xd8000000,0x2000000)
> # cat /proc/mtrr
> reg00: base=0x00000000 ( 0MB), size=2048MB: write-back, count=1
> reg01: base=0x80000000 (2048MB), size=1024MB: write-back, count=1
> reg02: base=0x100000000 (4096MB), size=1024MB: write-back, count=1
> reg03: base=0xd8000000 (3456MB), size= 8MB: write-back, count=1

it seems BIOS setup extra entry (8M) and that is conflict with that of
from graphical card.

can you send out
dmesg -s 262144 > dmesg.txt
and
lspci -vvxxx
lspci -tv

so could find out if your graphical card is really allocated the memory area...

YH

2008-08-29 19:11:16

by Alexander Huemer

[permalink] [raw]
Subject: Re: 2.6.27 mtrr fixes do not work

Yinghai Lu wrote:
> On Fri, Aug 29, 2008 at 8:09 AM, Alexander Huemer
> <[email protected]> wrote:
>
>> Yinghai Lu wrote:
>>
>>> On Mon, Aug 25, 2008 at 4:29 PM, Alexander Huemer
>>> <[email protected]> wrote:
>>>
>>>> Yinghai Lu wrote:
>>>>
>>>>> On Mon, Aug 25, 2008 at 1:44 PM, Yinghai Lu <[email protected]> wrote:
>>>>>
>>>>>
>>>>>> On Mon, Aug 25, 2008 at 1:24 PM, Alexander Huemer
>>>>>> <[email protected]> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> what do you mean with tip/master?
>>>>>>>
>>>>>>>
>>>>>> http://people.redhat.com/mingo/tip.git/readme.txt
>>>>>>
>>>>>>
>>>>>>
>>>>>>> here is my .config: http://xx.vu/~ahuemer/config.txt
>>>>>>>
>>>>>>>
>>>>> using your config, i do get mtrr cleanup
>>>>>
>>>>>
>>>> very interesting, thx.
>>>> so, what can i do to make it working here?
>>>> are there some more debug options i could turn on?
>>>>
>>>>
>>> can you post whole boot log with command line
>>>
>>> console=uart8250,io,0x3f8,115200n8 debug show_msr=1
>>>
>>> assume you have serial console...
>>>
>>> YH
>>>
>> yinghai,
>>
>> there are quite good news! 2.6.27-rc5 brought some significant changes.
>> now i get this:
>>
>> # dmesg|grep -E "(mtrr|uvesafb)"
>> Command line: root=/dev/sda1 video=uvesafb:1280x1024p-97,mtrr:2
>> debug show_msr=1
>> mtrr: your BIOS has set up an incorrect mask, fixing it up.
>> Kernel command line: root=/dev/sda1
>> video=uvesafb:1280x1024p-97,mtrr:2 debug show_msr=1
>> uvesafb: XGI Technology, Inc., Volari Z9s, 1.09.10, OEM: XGI, VBE v3.0
>> uvesafb: VBIOS/hardware supports DDC2 transfers
>> uvesafb: monitor limits: vf = 97 Hz, hf = 129 kHz, clk = 364 MHz
>> uvesafb: scrolling: redraw
>> uvesafb: framebuffer at 0xd8000000, mapped to 0xffffc20002100000,
>> using 10240k, total 32768k
>> mtrr: 0xd8000000,0x2000000 overlaps existing 0xd8000000,0x800000
>> # grep -E "(^\(WW\)|^\(EE\)|^\(NI\)|^\(??\))" /var/log/Xorg.0.log
>> (WW) VESA(0): Failed to set up write-combining range
>> (0xd8000000,0x2000000)
>> # cat /proc/mtrr
>> reg00: base=0x00000000 ( 0MB), size=2048MB: write-back, count=1
>> reg01: base=0x80000000 (2048MB), size=1024MB: write-back, count=1
>> reg02: base=0x100000000 (4096MB), size=1024MB: write-back, count=1
>> reg03: base=0xd8000000 (3456MB), size= 8MB: write-back, count=1
>>
>
> it seems BIOS setup extra entry (8M) and that is conflict with that of
> from graphical card.
>
> can you send out
> dmesg -s 262144 > dmesg.txt
> and
> lspci -vvxxx
> lspci -tv
>
> so could find out if your graphical card is really allocated the memory area...
>
> YH
>
http://xx.vu/~ahuemer/dmesg_5.txt
http://xx.vu/~ahuemer/lspci_vvxxx.txt
http://xx.vu/~ahuemer/lspci_tv.txt

--
regards
alex

2008-08-29 21:40:14

by Yinghai Lu

[permalink] [raw]
Subject: Re: 2.6.27 mtrr fixes do not work

On Fri, Aug 29, 2008 at 12:10 PM, Alexander Huemer
<[email protected]> wrote:
> http://xx.vu/~ahuemer/dmesg_5.txt
> http://xx.vu/~ahuemer/lspci_vvxxx.txt
> http://xx.vu/~ahuemer/lspci_tv.txt
>

pci 0000:00:1e.0: IO window: 0x3000-0x3fff
pci 0000:00:1e.0: MEM window: 0xdc300000-0xdc3fffff
pci 0000:00:1e.0: PREFETCH window: 0x000000d8000000-0x000000dbffffff

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d9)
(prog-if 01 [Subtractive decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Bus: primary=00, secondary=20, subordinate=20, sec-latency=32
I/O behind bridge: 00003000-00003fff
Memory behind bridge: dc300000-dc3fffff
Prefetchable memory behind bridge: 00000000d8000000-00000000dbffffff
Secondary status: 66MHz- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort+ <SERR- <PERR-
BridgeCtl: Parity- SERR- NoISA+ VGA+ MAbort- >Reset- FastB2B-
PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
Capabilities: [50] Subsystem: Tyan Computer Device 5397
00: 86 80 4e 24 07 00 10 00 d9 01 04 06 00 00 01 00
10: 00 00 00 00 00 00 00 00 00 20 20 20 30 30 80 22
20: 30 dc 30 dc 01 d8 f1 db 00 00 00 00 00 00 00 00
30: 00 00 00 00 50 00 00 00 00 00 00 00 ff 00 0c 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 0d 00 00 00 f1 10 97 53 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 80 0f 01 00 00 00 00 00

20:05.0 VGA compatible controller: XGI Technology Inc. (eXtreme
Graphics Innovation) Volari Z7 (prog-if 00 [VGA controller])
Subsystem: XGI Technology Inc. (eXtreme Graphics Innovation) Volari Z7
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
BIST result: 00
Region 0: Memory at d8000000 (32-bit, prefetchable) [size=64M]
Region 1: Memory at dc300000 (32-bit, non-prefetchable) [size=256K]
Region 2: I/O ports at 3000 [size=128]
Capabilities: [40] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: ca 18 20 00 03 00 30 02 00 00 00 03 00 00 00 80
10: 08 00 00 d8 00 00 30 dc 01 30 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 ca 18 20 00
30: 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00
40: 01 00 02 06 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

mtrr: 0xd8000000,0x2000000 overlaps existing 0xd8000000,0x800000

so it seems your card HW said it need 64M,

someone (BIOS or vgabios?) set 8M for it at first. and with write-back...

# cat /proc/mtrr
reg00: base=0x00000000 ( 0MB), size=2048MB: write-back, count=1
reg01: base=0x80000000 (2048MB), size=1024MB: write-back, count=1
reg02: base=0x100000000 (4096MB), size=1024MB: write-back, count=1
reg03: base=0xd8000000 (3456MB), size= 8MB: write-back, count=1

before loading X drivers, need to remove that entry at first.

echo "disable=3" > /proc/mtrr

YH

2008-08-30 11:11:31

by Helge Hafting

[permalink] [raw]
Subject: Re: 2.6.27 mtrr fixes do not work

-[0000:00]-+-00.0 Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub
+-01.0-[0000:01]----00.0 nVidia Corporation Quadro NVS 135M
+-1a.0 Intel Corporation 82801H (ICH8 Family) USB UHCI Contoller #4
+-1a.1 Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5
+-1a.7 Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2
+-1b.0 Intel Corporation 82801H (ICH8 Family) HD Audio Controller
+-1c.0-[0000:0b]--
+-1c.1-[0000:0c]----00.0 Intel Corporation PRO/Wireless 3945ABG Network Connection
+-1c.3-[0000:0d-0e]--
+-1c.5-[0000:09]----00.0 Broadcom Corporation NetXtreme BCM5755M Gigabit Ethernet PCI Express
+-1d.0 Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1
+-1d.1 Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2
+-1d.2 Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3
+-1d.7 Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1
+-1e.0-[0000:03-07]--+-01.0 O2 Micro, Inc. Cardbus bridge
| \-01.4 O2 Micro, Inc. Firewire (IEEE 1394)
+-1f.0 Intel Corporation 82801HEM (ICH8M) LPC Interface Controller
+-1f.1 Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller
+-1f.2 Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller
\-1f.3 Intel Corporation 82801H (ICH8 Family) SMBus Controller


Attachments:
dmesg.txt (57.59 kB)
lspci-vvxxx (19.28 kB)
lspci-tv (1.50 kB)
Download all attachments