Re: [patch 5/5] x86: Set PCI config space size to extended for AMD Barcelona

Robert Richter
2007-09-03T18:18:46Z

On 03.09.07 09:48:15, dean gaudet wrote:
> it's so very unfortunate the PCI standard has no feature bit to indicate
> the presence of ECS.

Right. Not nice.

> FWIW in my testing on a range of machines spanning 7 or 8 years i could
> read config space reg 256... and get 0xffffffff when the device didn't
> support ECS, and get valid data when the device did support ECS... granted
> there may be some system out there which behaves really badly when you do
> this.
>
> perhaps someone could write a userspace program and test that concept on a
> far wider range of machines.

A user space programm could map the config space (if MMCONFIG is usable)
and scan the PCI devices directly using memory access.

This patch sets pcidev->cfg_size to 4096 for certain devices so that
the ECS is also available using proc/sys fs or lspci -xxxx. In this
case the Kernel access functions are used. This works with both
methods, CF8 and MMCONFIG. For CF8, all patches of these series must
be used.

Note also, that ECS access is not only for CPU devices available, but
also of other PCI Express devices on the bus.

-Robert

--
AMD Saxony, Dresden, Germany
Operating System Research Center
email: robert.richter@amd.com