On Fri, 3 Mar 2006, Kumar Gala wrote:
>
> On Mar 3, 2006, at 5:18 PM, Greg KH wrote:
>
> > On Fri, Mar 03, 2006 at 04:39:52PM -0600, Kumar Gala wrote:
> >> On Fri, 3 Mar 2006, Greg KH wrote:
> >>
> >>> On Fri, Mar 03, 2006 at 11:42:03AM -0600, Kumar Gala wrote:
> >>>> I was wondering what the proper way to assign and setup a single
> >>>> PCI
> >>>> device that comes into existence after the system has booted. I
> >>>> have
> >>>> an FPGA that we load from user space at which time it shows up
> >>>> on the
> >>>> PCI bus.
> >>>
> >>> Idealy your BIOS would set up this information :)
> >>
> >> How would my BIOS know about a device that didn't exist when it
> >> booted.
> >
> > According to the PCI Hotplug spec, your BIOS needs to take that into
> > consideration at boot time. Yeah, it's a wierd thing, I agree, but is
> > how this works for x86 systems. The space and resources are reserved
> > at boot time by the pci hotplug controller in anticipation of a device
> > being added sometime in the future.
> >
> > Other arches do this differently (ppc64 has the stuff reserverd by the
> > hypervisor), and then compat pci does it by just plain guessing. It
> > sounds like your situation is just like this one.
>
> Well I reserve space for the device in my "BIOS". However this is an
> embedded system so there isn't any calling out to the "BIOS" after
> linux has booted. Is there some additional "work" that the x86
> systems do beyond ensure proper holes in the memory map exist for
> future devices to be placed into?
For CompactPCI, most boards I've encountered actually do not reserve any
extra resources on the bridge to the hotplug bus. I have had a patch for
a while that allows reallocating the resources for a specified bridge and
all its children at boot time, and recently ported it to 2.6. It doesn't
sound like you need it since you've got your own bootloader, but let me
know if you want to take a look at it.
> Ahh, looked at cpqphp_* and only found cpqhp_configure_device() of
> any use. I'll take a look at cpcihp*.c
Just a warning, cpci_configure_slot in cpci_hotplug_pci.c is somewhat
broken atm, I've got a small patch I was going to clean up and send to
Greg for 2.6.17. I can provide it if you want to compare a working
cpci_configure_slot against cpqhp_configure_device.
Scott
--
==============================================================================
Scott Murray, [email protected]
"Good, bad ... I'm the guy with the gun." - Ash, "Army of Darkness"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]