[<prev] [next>] [day] [month] [year] [list]
Message-id: <476FE8D3.9070702@shaw.ca>
Date: Mon, 24 Dec 2007 11:13:55 -0600
From: Robert Hancock <hancockr@...w.ca>
To: Loic Prylli <loic@...i.com>
Cc: Matthew Wilcox <matthew@....cx>, Tony Camuso <tcamuso@...hat.com>,
Greg KH <gregkh@...e.de>, linux-kernel@...r.kernel.org,
linux-pci@...ey.karlin.mff.cuni.cz
Subject: Re: [Fwd: Re: [PATCH 0/5]PCI: x86 MMCONFIG]
Loic Prylli wrote:
> I just realized one thing: the bar sizing code in pci_read_bases() (that
> writes 0xffffffff in the bars) does not seem to disable the
> PCI_COMMAND_MEM/PCI_COMMAND_IO bits in the cmd register before
> manipulating the BARs. And it seems nobody else ensures they are
> disabled at this point either (or am I missing something?).
No you're not missing anything. This problem causes many machines to
break horribly when MMCONFIG is enabled. There's a patch in -mm to fix
this. (It special-cases the case of host bridges and doesn't disable the
decode bits for those, since some are known to do crazy things if you
do that.)
http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.24-rc6/2.6.24-rc6-mm1/broken-out/pci-disable-decoding-during-sizing-of-bars.patch
>
> Touching the bars while they are enabled would be buggy behaviour from
> our part, and something trivial to fix. And it might well fix that
> particular problem (it's fair play from the machine to crash if we
> create a decoding conflict, simply disabling the cmd bits in
> pci_read_bases() should remove that conflict).
>
> FWIW, to partially answer your last question, Windows does disable
> mem-space and/or IO-space when sizing the bars of a device (I have some
> traces of configuration-space-access taken on a window machine for one
> of the PCI busses).
Good to know. There was some speculation that it did not.
--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@...pamshaw.ca
Home Page: http://www.roberthancock.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists