[syslinux] [PATCH] pci: Introduce slot and function information

Keith Schincke keith.schincke at gmail.com
Mon Jul 14 06:33:44 PDT 2008


Out of  habit, I would vote for the second option as a more correct
solution.

What would be the maximum fixed size of the pci_device array? Which has a
smaller object code size? Which would have a shorter runtime? Do you have
pre-built linked list functions?

I am not a hardware expert, but can't some systems have multiple PCI buses?
Wouldn't this make it difficult to have a fixed array?

Keith

---------- Forwarded message ----------
From: H. Peter Anvin <hpa at zytor.com>
Date: Sun, Jul 13, 2008 at 7:59 PM
Subject: Re: [syslinux] [PATCH] pci: Introduce slot and function information
To: For discussion of SYSLINUX and tftp-hpa <syslinux at zytor.com>


Sebastian Herbszt wrote:
> Introduce slot and function information to pci_device and fill them in
pci_scan().

Hm.  I started digging into this, and it's pretty clear we have a
serious problem.

I was originally going to propose that if we're going to have the device
address in there, we should include either the bus number or a back
pointer to the bus.

However, the worse problem is that we use a fixed size for the
pci_device[] array of MAX_PCI_DEVICES, but then we populate the array
with *functions*, and there can be MAX_PCI_DEVICES*MAX_PCI_FUNC (256) of
those.

Given that, I'm thinking that we should do one of two things: either
retain the fixed-sized arrays, but size them appropriately, *and* just
make the array slot used strictly based on device address (i.e. dev:func
in this case) -- in that case, there is no need to store any of that --
  or use dynamically allocated linked lists.

What do you think?

       -hpa

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX at zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.



More information about the Syslinux mailing list