aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/pci
Commit message (Collapse)AuthorAgeFilesLines
* libpci: merge BIOS read and BIOS writeHEADmasterH. Peter Anvin2010-02-205-22/+10
| | | | | | | Save a few bytes by merging the very similar BIOS read and BIOS write functions. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pci: replace '-' by '_' in modules namesErwan Velu2009-12-041-1/+14
| | | | | | | | | Impact: avoid kernel modules duplication In modules.pcimap, kernel modules name are featuring '_' or '-' whereas modules.alias is only using '_'. To avoid kernel modules duplication, let's rename all '-' by '_' to match what modules.alias provides This avoid stupid duplications like "a-b" & "a_b" whereas they are in fact the same kernel module
* pci: using zfopen instead of fopenErwan Velu2009-11-101-5/+6
| | | | | | | Impact: allow to open gzipped files This commit allow people using gzipped files (pci.ids/modules.pcimap/modules.alias)
* pci: Removing useless initialisationErwan Velu2009-11-091-3/+0
| | | | | | Impact: None The kernel module count is set to zero when the dev_info is allocated.
* pci: Prevent kernel modules to be listed twiceErwan Velu2009-11-091-4/+32
| | | | | | | | | | | Impact: Prevent duplicated modules If both get_module_name_from_pcimap() & get_module_name_from_alias() are called, we didn't checked if the module we are detecting already got detected. This leads to a situation where modules got listed twice. This patch add a test to insure that we aren't adding an already detected module.
* Merge commit 'hpa/master' into for-erwanPierre-Alexandre Meyer2009-08-046-517/+528
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: com32/cmenu/libmenu/com32io.h com32/gplinclude/dmi/dmi.h com32/gplinclude/dmi/dmi_base_board.h com32/gplinclude/dmi/dmi_memory.h com32/gplinclude/dmi/dmi_system.h com32/gpllib/dmi/dmi.c com32/gpllib/dmi/dmi_memory.c com32/include/sys/pci.h com32/lib/pci/scan.c com32/modules/Makefile Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * Run Nindent on com32/lib/pci/writex.cH. Peter Anvin2009-05-291-40/+39
| | | | | | | | | | | | | | | | | | Automatically reformat com32/lib/pci/writex.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Run Nindent on com32/lib/pci/writebios.cH. Peter Anvin2009-05-291-7/+7
| | | | | | | | | | | | | | | | | | Automatically reformat com32/lib/pci/writebios.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Run Nindent on com32/lib/pci/scan.cH. Peter Anvin2009-05-291-448/+473
| | | | | | | | | | | | | | | | | | Automatically reformat com32/lib/pci/scan.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Run Nindent on com32/lib/pci/readx.cH. Peter Anvin2009-05-291-47/+46
| | | | | | | | | | | | | | | | | | Automatically reformat com32/lib/pci/readx.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Run Nindent on com32/lib/pci/readbios.cH. Peter Anvin2009-05-291-7/+7
| | | | | | | | | | | | | | | | | | Automatically reformat com32/lib/pci/readbios.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Run Nindent on com32/lib/pci/cfgtype.cH. Peter Anvin2009-05-291-60/+60
| | | | | | | | | | | | | | | | | | Automatically reformat com32/lib/pci/cfgtype.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | pci: prevent modules.alias to destroy modules.pcimap contentErwan Velu2009-04-271-2/+4
| | | | | | | | | | | | | | Impact: multiple get_module_name_from_* corrupt result Prior to that commit, calling both get_module_name_from_pcimap and get_module_name_from_alias were reporting unknown modules.
* | pci: Adding get_module_name_from_alias()Erwan Velu2009-04-271-0/+125
|/ | | | | | | Impact: Users can now use modules.alias to find kernel modules get_module_name_from_alias() parses modules.alias to find the appropriate kernel modules required by the local pci devices.
* pci: Using for_each_pci_func3Erwan Velu2009-04-151-3/+2
| | | | | | Impact: cleaning code Using for_each_pci_func3 instead of for_each_pci_func + pci_mkaddr
* PCI: Fixing freeze when detecting many PCI devicesErwan Velu2009-04-141-22/+11
| | | | | | | | | Impact: Prevent hard freeze when having many PCI devices A user reported that calling gather_additional_pci_config() when many PCI devices exists on a host could lead to a complete freeze. This patch remove some useless code and use for_each_pci_func() instead. This prevent useless memory allocation.
* pci: Rename get_module_name_from_pci_idssyslinux-3.74-pre13syslinux-3.74-pre12Erwan Velu2009-03-291-1/+1
| | | | | | | | | Impact: none Rename get_module_name_from_pci_ids to get_module_name_from_pcimap since the module names are read from the modules.pcimap and not pci.ids file. Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
* pci: Check if configuration type is PCI_CFG_NONEErwan Velu2009-03-231-0/+7
| | | | | | Impact: prevent from grabbing configuration when PCI is PCI_CFG_NONE Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
* pci: Remove "(void)cfgtype"Erwan Velu2009-03-231-2/+0
| | | | | | | Impact: none Remove useless "(void)cfgtype" Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
* hdt: Adding PCI latencyErwan Velu2009-03-141-0/+1
| | | | Adding the pci latency information
* hdt: irq have to be in dev_infoErwan Velu2009-03-141-1/+7
| | | | Moving irq stuff to the dev_info structure to keep coherent
* hdt: Adding legacy IRQ stuffErwan Velu2009-03-131-1/+28
| | | | | | | | In the cli mode, the pci context feature the following : pci> show irq Under cli, "pci> show device <x>" display the IRQ when device features one. The menu mode behave the same way.
* PCI: flexible modules.pcimap & pci.ids pathsErwan Velu2009-03-111-6/+6
| | | | | | While detecting the pci names, class name & kernel modules, it's better to let the user choosing the path instead of the harcoded value "/" is not always the wanted path
* hdt: PCI: Adding categoryErwan Velu2009-02-261-1/+4
|
* hdt: We have to iterate & copy the vendor name to all matching pci devices ↵Erwan Velu2009-02-251-4/+13
| | | | as all pci devices might not have a matching vendor/product id. This will help us having the proper vendor device with an unknown product.
* hdt: Adding more defined values for pci components Enabling mulitple kernel ↵Erwan Velu2009-02-251-21/+26
| | | | modules per pci device Updating pcitest
* hdt: Returning ENOPCIIDS and ENOMODULESPCIMAP when pci.ids and ↵Erwan Velu2009-02-251-3/+3
| | | | modules.pcidmap files are missing
* hdt: Improving performances by not computing product ids when the vendor ↵Erwan Velu2009-02-251-30/+25
| | | | | | doesn't exist on the local system. Removing useless break() that prevent other com32 module to load
* hdt: Improving detection speed by skipping uncessary linesErwan Velu2009-02-251-0/+13
|
* hdt: No need to only copy vendor nameErwan Velu2009-02-251-8/+6
|
* hdt: Performance optimisations : avoiding hex_to_int in pci_domain loopsErwan Velu2009-02-251-14/+29
|
* hdt: Adding get_class_name_from_pci_ids to grab class name from the pciidsErwan Velu2009-02-251-0/+87
|
* pci: fix pci_scan()Sebastian Herbszt2008-08-121-2/+4
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pci: cosmetic fixesSebastian Herbszt2008-08-121-34/+34
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pci: revamp the PCI system to have a hierarchial formatH. Peter Anvin2008-08-121-179/+183
| | | | | | | | Create the concept of a PCI domain, as a hierarcy of busses, devices and functions. This avoids large static-sized arrays and allows for geographical addressing of devices. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pci: store device addressH. Peter Anvin2008-08-011-3/+7
| | | | | | | When scanning PCI devices, store the device address for reference. Based on a patch by Sebastian Herbszt. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pci: fix off-by-one error and introduce MAX_PCI_FUNCSebastian Herbszt2008-06-131-7/+7
| | | | | | | | | | | | | | | | | | | | | | | In include/sys/pci.h we have #define MAX_PCI_BUSES 255 and struct pci_bus_list { struct pci_bus pci_bus[MAX_PCI_BUSES]; uint8_t count; }; And in lib/pci/scan.c for (bus = 0; bus <= MAX_PCI_BUSES; bus++) { pci_bus_list->pci_bus[bus].pci_device_count = 0; Fix possible overflows and introduce MAX_PCI_FUNC. - Sebastian
* PCI detection code doesn't corrupt memory anymore (2nd try)Erwan2008-03-201-22/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From : Erwan Velu <erwan.velu@free.fr> This patch fixes the pci detection stuff demo'd in pcitest.c32 - Fix a wrong type in malloc - Incorrect use of strdup - Replacing strncpy by strnlcpy (thx hpa) This two fixes makes pcitest.c32 working far better, no more crash when running it twice. I'd like to thank Sebastian Herbszt for its reports and tests. This patch was made for 3.62-pre16 but applies fine on 3.63-pre1. Signed-off-by:Erwan Velu <erwan.velu@free.fr> -------------------------------------------------------------------------------- Les opinions et prises de position emises par le signataire du present message lui sont propres et ne sauraient engager la responsabilite de la societe SEANODES. Ce message ainsi que les eventuelles pieces jointes constituent une correspondance privee et confidentielle a l'attention exclusive du destinataire designe ci-dessus. Si vous n'etes pas le destinataire du present message ou une personne susceptible de pouvoir le lui delivrer, il vous est signifie que toute divulgation, distribution ou copie de cette transmission est strictement interdite. Si vous avez recu ce message par erreur, nous vous remercions d'en informer l'expediteur par telephone ou de lui retourner le present message, puis d'effacer immediatement ce message de votre systeme. The views and opinions expressed by the author of this message are personal. SEANODES shall assume no liability, express or implied for such message. This e-mail and any attachments is a confidential correspondence intended only for use of the individual or entity named above. If you are not the intended recipient or the agent responsible for delivering the message to the intended recipient, you are hereby notified that any disclosure, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender by phone or by replying this message, and then delete this message from your system.
* Whitespace cleanup...syslinux-3.62-pre11H. Peter Anvin2008-02-191-10/+10
|
* Clean up some of the new PCI code from Erwan Velu.syslinux-3.52-pre7H. Peter Anvin2007-08-161-79/+86
| | | | | | | More needs to be done; the code has console I/O at the library level, which isn't good. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Improving PCI collected informationsErwan Velu2007-08-161-6/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch - add a new pci_dev_info structure : It contains additional informations about the pci devices like the product/vendor name and the associated linux kernel module - add a get_name_from_pci_ids() function in pci/scan.c This function reads a pci.ids file from the boot device. Then it assign for each pci device, its vendor/product name. You just have to put this file in the root directory of your isolinux/pxelinux (i.e the root directory of your tfptboot server if you are using pxelinux). - add a get_module_name_from_pci_ids() function in pci/scan.c This function reads a modules.pcimap file from the boot device. Then it assign for each pci_device its linux kernel module. You just have to put this file in the root directory of your isolinux/pxelinux (i.e the root directory of your tfptboot server if you are using pxelinux). - Add a call to get_name_from_pci_ids() into the pcitest COM32 module - Add a call to get_module_name_from_pci_ids() into the pcitest COM32 module - Fixing typedef struct { ... } s_pci...; by struct pci... {}; - Improving comments - Fixing the memory allocation to prevent leaks With this patch, pcitest.c32 act like lspci plus a bonus by displaying the linux kernel module assiocated to each pci device. Signed-off-by:Erwan Velu <erwan.velu@free.fr> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Move the PCI-scanning code into the library proper.H. Peter Anvin2007-04-031-0/+165
|
* Across-the-board stealth whitespace cleanupH. Peter Anvin2006-05-034-13/+11
|
* Better tests for CM#1 and CM#2syslinux-3.10-pre6hpa2005-08-091-33/+56
|
* Out-of-line __intcall and __farcall; better detection mechanism for CM#2hpa2005-08-091-10/+37
|
* Explain conf method #2hpa2005-08-092-2/+2
|
* Be even more anal about PCI BIOS detection.hpa2005-08-081-2/+3
|
* Actual implementation of the read/write through BIOShpa2005-08-032-0/+30
|
* Support PCI config via BIOShpa2005-08-0310-11/+44
|
* Add missing header filesyslinux-3.10-pre1hpa2005-01-061-0/+14
|