hi
i have a platform that includes a mis behaving PCI device. it defines a
memory BAR of 4K, where it should be larger, like 10MBytes
so i go to ./drivers/pci/quirks.c and add the following fixup code:
static void __devinit quirk_tundra_universe ( struct pci_dev * dev )
{
struct resource *r;
/* We define a 10MB window for the UniverseII...*/
r = &dev->resource [1];
r->start = 0;
r->end = 0xa00000-1;
}
DECLARE_PCI_FIXUP_HEADER(0x10e3, 0x0000, quirk_tundra_universe );
but the kernel is behaving strangely afterwards:
i can see that my device now has a larger 10MB window:
06:04.0 Bridge: Tundra Semiconductor Corp. CA91C042 [Universe] (rev 02)
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32 (750ns min)
Interrupt: pin A routed to IRQ 10
Region 0: I/O ports at b000 [size=4K]
Region 1: Memory at 50200000 (32-bit, non-prefetchable) [size=10M]
but the device's parent bridge is not taking this into account, as the
larger window (seating at 50200000), is _outside_ of the parent bridge
secondary bus mapping (fea00000-feafffff):
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 0a) (prog-if
00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR+ FastB2B-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 0
Bus: primary=00, secondary=06, subordinate=06, sec-latency=32
I/O behind bridge: 0000b000-0000cfff
Memory behind bridge: fea00000-feafffff
Prefetchable memory behind bridge: 50000000-500fffff
Secondary status: 66MHz- FastB2B+ ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort+ <SERR- <PERR-
BridgeCtl: Parity- SERR+ NoISA- VGA+ MAbort- >Reset- FastB2B-
Could it a side effect of the bridge having VGA redirection enabled as
the other device is a VGA controller? see below:
06:01.0 VGA compatible controller: ATI Technologies Inc ES1000 (rev 02)
(prog-if 00 [VGA])
Subsystem: ATI Technologies Inc ES1000
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping+ SERR- FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32 (2000ns min), Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 10
Region 0: Memory at f0000000 (32-bit, prefetchable) [size=128M]
Region 1: I/O ports at c800 [size=256]
Region 2: Memory at feaf0000 (32-bit, non-prefetchable) [size=64K]
Expansion ROM at 50000000 [disabled] [size=128K]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
note that i am using a linux 2.6.18.2 kernel on a core 2 duo system.
any ideas?
thx a lot
-jf simon
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ