Subject: Re: access to external proms for PCI#
To: None <>
From: David Young <>
List: tech-kern
Date: 12/18/2005 17:02:09
On Sun, Dec 18, 2005 at 12:07:10PM -0800, Garrett D'Amore wrote:
> David Laight wrote:
> >On Sun, Dec 18, 2005 at 09:21:52AM -0800, Garrett D'Amore wrote:
> >  
> >
> >>The current cardbus code, as I read it, only accesses the expansion rom
> >>data if the configuration code (BIOS or elsewhere) writes a reasonable
> >>address into the BAR register.  I think therefore that using the PCI
> >>code I was suggesting will be OK.  (I.e. having it go ahead and map
> >>expansion roms without enabling them.)
> >>    
> >>
> >
> >Ok, if they've been allocated a physical address - but not a virtual one
> >then you don't have a massive problem.
> >  
> >
> Myabe I wasn't clear.  The idea here is to allocate a physical address
> for expansion roms.
> *But*, we will only do this on platforms that make use of the pci
> configuration code in pciconf.c.  (I.e. have PCI_NETBSD_CONFIGURE defined.)
> Frankly, most platforms don't use the PCI_NETBSD_CONFIGURE code,
> especially "full fledged" platforms like i386 and macppc.  Instead, they
> just use the windows that firmware set up.

I'm no authority on PCI, but according to my reading of relevant
PCI specs and recommendations, many (most?) i386 BIOSes botch PCI
configuration, especially by setting the PCI latency timer to absurd
values.  Cardbus drivers usually set ~arbitrary latency timers without
regard for other devices on the same bus.  Maybe you can kill birds w/
one stone by factoring some functions out of PCI_NETBSD_CONFIGURE for
i386 & Cardbus to use for programming reasonable PCI configs?


David Young             OJC Technologies      Urbana, IL * (217) 278-3933