lkml.org 
[lkml]   [2006]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: proper way to assign fixed PCI resources to a "hotplug" device
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, scott@spiteful.org

"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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-04 00:53    [W:0.915 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site