[prev in list] [next in list] [prev in thread] [next in thread] 

List:       suse-amd64
Subject:    Re: [suse-amd64] IOMMU...PCI memory hole...MTRR...I give up.
From:       Andi Kleen <ak () suse ! de>
Date:       2006-08-13 4:53:20
Message-ID: 200608130653.20163.ak () suse ! de
[Download RAW message or body]

On Friday 11 August 2006 18:15, David W. Hankins wrote:
> On Fri, Aug 11, 2006 at 11:50:31AM +0200, Andi Kleen wrote:
> > The mtrr type mismatch messages are relatively harmless by itself -- 
> > they happen even on perfectly working machines.
> > 
> > In particular uncachable->write combing is a standard transition that
> > happens often -- the BIOS left a uncachable memory region and the 
> > X server or the frame buffer decides to turn it WC for better
> > performance.
> 
> Well, they aren't 'taking', at least not in so far as /proc/mtrr
> displays, nor in how X performs.

Maybe the particular combination set up by the BIOS manages
to violate the priority rules of the CPUs (you can look it up
in the architecture manual, they're pretty complicated)

> I tried commenting out the bit of code in the kernel that detects
> apertures addressed over 4G and ignores them.  This removed the
> line from dmesg that said: "Aperture from northbridge cpu 0 is
> greater than 4G.  Ignoring."  But this remained:
> 
> 	PCI-DMA: Disabling IOMMU.
> 
> I did not look into the PCI code to see why it's choosing to do
> this, but I assumed it was unprepared to use a 64-bit IOMMU.

The whole point of the GART IOMMU is to be below 4GB to handle IO
to devices that can't access more than 32bits worth of address space. 
Putting it above 4GB is totally useless.

> 
> > > Linux can move this on it's own accord, but until you fix the
> > > MTRRs (which Linux can't currently do),
> > 
> > What Linux can't do is to fix it up automatically.
> > 
> > But it should be possible to do it manually after boot (although the interface
> > is a bit weird). See /usr/src/linux/Documentation/mtrr.txt 
> > 
> > The MTRR driver should be able to change any MTRRs using this.
> > 
> > >reg00: base=0xc0000000 (3072MB), size=1024MB: uncachable, count=1
> > >reg01: base=0x00000000 (   0MB), size=4096MB: write-back, count=1
> > 
> > Looking at your log it might be enough to change reg01 to end at 3072MB
> 
> Documentation/mtrr.txt doesn't tell me how to do that.  If I delete
> register 1, the system will crash (hard hang).  If I try to add
> any region that overlaps with register 1 (but doesn't overlap with
> register zero - these get errored out and appear to make no change),
> the count on register one gets incremented and nothing changes.

Hmm, maybe if you change the default MTRR first?

> 
> I've toyed with the idea of hacking into the kernel mtrr code - when
> the mtrr is detected/read at boot time, when hopefully one might
> disable interrupts and initialize the mtrr from scratch without
> anything else going on.
> 
> Do you think that tactic would bear fruit?

Maybe.

-Andi

-- 
Check the List-Unsubscribe header to unsubscribe
For additional commands, email: suse-amd64-help@suse.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic