| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
When parsing the modules.alias, we shall report it as broken if we
cannot find any valid line in it.
This patch simply count the number of valid lines and report a missing
modules.alias if no valid lines are found.
|
|
|
|
|
| |
free_pci_domain is releasing the memory too early; should be out
of the for loops, because in the loop the memory is still dereferenced.
|
|
|
|
|
|
|
| |
Instead of using ad hoc definitions of dprintf, dprintf2, vdprintf and
vdprintf2, use <dprintf.h> everywhere possible.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
| |
chr_replace was only used in pci/scan.c but this could be useful for
other modules like hdt ;)
|
|
|
|
| |
no need to keep several versions of it.
|
|
|
|
|
| |
As reported by hpa, strlcpy is safer and could prevent some bugs.
So I replaced all strncpy by strlcpy calls.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Impact: allow to open gzipped files
This commit allow people using gzipped files
(pci.ids/modules.pcimap/modules.alias)
|
|
|
|
|
|
| |
Impact: None
The kernel module count is set to zero when the dev_info is allocated.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Impact: cleaning code
Using for_each_pci_func3 instead of for_each_pci_func + pci_mkaddr
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
Impact: prevent from grabbing configuration when PCI is PCI_CFG_NONE
Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
|
|
|
|
|
|
|
| |
Impact: none
Remove useless "(void)cfgtype"
Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
|
|
|
|
| |
Adding the pci latency information
|
|
|
|
| |
Moving irq stuff to the dev_info structure to keep coherent
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
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.
|
|
|
|
| |
modules per pci device Updating pcitest
|
|
|
|
| |
modules.pcidmap files are missing
|
|
|
|
|
|
| |
doesn't exist on the local system.
Removing useless break() that prevent other com32 module to load
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
| |
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|