Re: [PATCH]PCI:disable resource decode in PCI BAR detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2007-09-16 at 15:13 +0400, Ivan Kokshaysky wrote:
> On Fri, Sep 14, 2007 at 05:53:58PM -0600, Robert Hancock wrote:
> > In the first one, Linus talks about a USB controller whose SMM code 
> > chokes on the BAR being disabled. That explanation seems odd to me. If 
> > it chokes on the BAR disabled, how doesn't it choke on the BAR being 
> > moved to a different location, which is unavoidable during probing?
> 
> Here is an article with detailed explanation of that USB issue:
> 
>  http://support.microsoft.com/kb/250635
> 
> The most interesting fact there is that windows *does not* clear
> PCI_COMMAND_MEMORY bits during PCI bus enumeration, so BIOS writers
> have to rely on that. Yet another reason why your patch is unsafe.
> 
> > Also, I think we do USB handoff from the BIOS much earlier than we used 
> > to, which likely prevents these issues.
> 
> I don't think so. This can only be done in USB driver, which cannot run
> before PCI device discovery.
Most BIOS has an option called legacy emulation, which will emulate USB
mouse as legacy mouse. BIOS is using USB before driver is loaded.

If moving BAR work, disabling BAR should work too.

> > In the second one, he mentions that "So the secondary rule to "don't 
> > turnoff MEM or IO accesses" is "never allocate real PCI BAR resources at 
> > the top of memory". Well, unfortunately, the second one isn't possible 
> > to meet given that we have boards with the MMCONFIG up there, so 
> > disabling the decode is the only thing we can do. That whole discussion 
> > was also based on the fact that it wasn't necessary to solve problems. 
> > This is no longer a theoretical problem. We now have real problems that 
> > we need this in order to solve.
> 
> I have suggested a *practical* solution that disables the decode only
> when it's unavoidable. If it's not sufficient for some machines, it
> can be extended quite easily.
If you just want to workaroud the issue at hand, I'd take the method to
not use mmcfg at probe stage.

> > > No, it's impossible for several reasons. Most obvious one is that a PCI-E
> > > bridge does isolate stuff quite nicely.
> > 
> > It's not impossible at all. In fact I'm quite sure (Jesse can confirm) 
> > that in the case of the board he was using, it was an add-in graphics 
> > card where he saw this problem.
> 
> Again, it's impossible with AGP or PCI-E cards, which are always
> separated
> from the root bus by AGP or PCI-E bridge. The bridge does decode in
> the
> first place, so when you write the BAR with all ones, you move it
> outside
> the bridge decoding window. Address collision isn't possible in this
> case in principle.
I can confirm this is an add-in graphics card. the bfd is 00:02.0, so
it's not behind any AGP/PCI-E bridge.

Thanks,
Shaohua
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux