On 03/18/10 12:40 PM, Matthew Wilcox wrote:
On Thu, Mar 18, 2010 at 03:31:55PM -0400, Don Dutile wrote:
Matthew Wilcox wrote:
So we need to figure out why your machine doesn't support extended
config space. What chipset does it use? Is there a BIOS update available
for it? What does it report in dmesg for config space accesses?
In addition to having MMCONFIG enabled on the system (hw & kernel),
you also need to be root because of this snippet in drivers/pci/pci-sysfs.c,
pci_read_config():
unsigned int size = 64;
loff_t init_off = off;
u8 *data = (u8*) buf;
/* Several chips lock up trying to read undefined config space */
if (capable(CAP_SYS_ADMIN)) {
size = dev->cfg_size;
} else if (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) {
size = 128;
}
which will truncate the read to 1st 64-bytes, so unpriv user can't
crash a system that has badly behaving PCI(e) config space.
IMO, the CAP_SYS_ADMIN ought to be replaced w/a quirk check
for badly-behaving devices &/or chip sets.
Joyce already said at the start of the thread that they were able to
get 256 bytes of config space. Please don't hijack this thread where
a user is receiving help.
I just got the answer from my colleague. The system that I am using is a
AMD64 based, which has a HW bug. The BIOS blocked any access to the
config space beyond 256 bytes. I will switch to a Intel based system to
see if I can dump more than 256 bytes.
Thanks a lot,
Joyce
--
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html