| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes 3d7466ef8545d37a4666e185a9f5d65ceb9c8af4.
|
| |
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Represent each domain as domain bridge under the &host_bridge and put root
bus of each domain under the domain bridge.
With this change lspci in tree view does not show zero bus on domain 0 in
the output if this bus does not exist at all. Root bus in PCIe hierarchy
does not have to be zero and on Freescale PowerPC systems it is common.
Also with this change are separate domain showed in the output separately.
|
| |
| |
| |
| | |
It refers to the previous value in linked-list, not to the next.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For PCIe devices of PCI Bridge type is Primary Bus Number not used and the
default value is 0. PCIe devices capture their Bus and Device numbers
automatically from PCIe TLP packets.
Instead of Primary Bus Number use Device Number because zero value confuse
tree building algorithm. Existing code already expects that Device Number
of PCI Bridge is already set to Primary Bus Number.
|
| | |
|
|\ \
| | |
| | | |
Makefile: change STRIP to '--strip-program' when cross-compile
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When cross-compile, we should use specific strip instead of default
/usr/bin/strip.
reference:https://man7.org/linux/man-pages/man1/install.1.html
Signed-off-by: mingrui.ren <mingrui.ren@bst.ai>
|
|\ \ \
| | |/
| |/| |
lspci: Fix bridge filter support in tree view
|
|/ /
| |
| |
| |
| | |
Correctly show whole subtree of PCI-to-PCI bridge in tree view when filter
(-s or -d option) was specified for PCI-to-PCI bridge device itself.
|
|/ |
|
| |
|
|
|
|
|
|
| |
When multiple back-ends use the same option (e.g., "devmem.path"),
they tend to define it each. This is not nice, but before we generalize
these options properly, let us at least remove the duplicate definitions.
|
|
|
|
|
|
|
|
|
|
| |
This is a new direct hardware access method via PCIe ECAM (Enhanced
Configuration Access Mechanism). It is available on all PCIe-compliant
hardware. Requires root privileges and access to physical memory.
ECAM mapping can be specified manually via a new ecam.addrs parameter or
can be read from ACPI MCFG table. ACPI MCFG table can be located in the
system or read from x86 BIOS memory.
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Extend win32-cfgmgr32 backend and add a new option win32.cfgmethod for
specifying other backend for accessing PCI config space. There are more
config space access methods available on Windows and each is working only
sometimes (either requires special privileges or special setup).
So by default try to choose the first working one via order defined in pci
probe_sequence[] array. If none is available then emulate PCI config space
like before this change.
Function pci_init_v35() is extended and renamed to pci_init_internal() to
optionally do not throw errors and allow to specify one access method which
will be skipped in AUTO mode. This is used to prevent choosing win32-cfgmgr32
as config space access method for win32-cfgmgr32.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Apparently, people started considering "which" obsolete. I still
consider "which" rather useful and definitely more comfortable to type
than "command -v".
Still, "command -v" should be more portable, so let us use it.
I wonder which of the ancient systems which we are still supporting
will be broken by this change...
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Fix compile issues with older toolchain which does not define ERROR_NOT_FOUND macro.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
C function fopen() implemented by msvcrt.dll requires special prefix
"\\\\?\\" for paths longer than 260 bytes. Because GetModuleFileName()
returns absolute path, it may be longer than 260 bytes. Add fixup to handle
long paths.
|
| | |
| | |
| | |
| | |
| | | |
GetModuleFileName() on Windows 10 has bugs and returns bogus path.
Implement fixups to make path usable for later fopen() call.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Like for windows builds this will cause to load pci.ids file from the same
directory where is stored application binary. Code is same as for Windows,
just djgpp uses global symbol __dos_argv0 instead of _pgmptr.
Tested with following compile command:
make CROSS_COMPILE=i586-pc-msdosdjgpp- HOST=i586-djgpp ZLIB=no DNS=no IDSDIR=
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When using shared libpci DLL library, it is expected that pci.ids file is
stored in directory where is also libpci DLL library and not in directory
where is application executable.
Based on the build mode and compile options, choose the appropriate
function for retrieving path to the libpci DLL library or application
executable. Also pass correct module argument to GetModuleFileName() call.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Module file name can have arbitrary length despite all MS examples say
about MAX_PATH upper limit. This limit does not apply for example when
executable is running from network disk with very long UNC paths or
when using "\\??\\" prefix for specifying executable binary path.
So handle buffer truncatenation by retrying GetModuleFileName() call with
larger buffer.
Fixes loading of pci.ids file when lspci.exe binary is running from network
drive with path longer than 260 bytes.
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
On 64-bit non-LLP64 systems is type long 64-bit. On 32-bit and 64-bit LLP64
systems is type long only 32-bit. But readl() and writel() functions works
with 32-bit PCI word. Fix it for non-LLP64 systems by using type u32.
|
| | | |
|
| | | |
|
|/ /
| |
| |
| | |
Suggested by Pali.
|
| | |
|
|/
|
|
|
| |
Worked around encoding issues in the database before we fix them
for real.
|
|
|
|
|
|
|
| |
Extended method allows to access all PCIe registers, including extended
registers starting at 0x100 offset. This method uses 4 reserved buts above
bus bits for PCIe registers. On ARM platforms it is very common for PCIe
controllers. Like standard method, it needs to be properly configured.
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Between accessing address address and data I/O ports it is needed to issue
barriers. Use explicit readl() for barrier and O_DSYNC to bypass CPU cache.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Microsoft Kernel Local Debugging Driver (kldbgdrv.sys) allow access for
userspace processes to the PCI config space. It supports access up to
65536 domains and whole 4096 bytes long extended PCIe config space. Driver
is signed by Microsoft and is available for both 32-bit and 64-bit systems.
Driver is not part of Windows system and has to be installed via WinDbg
installation package. Standalone installers for WinDbg 6.12.2.633 version:
https://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools_amd64/dbg_amd64.msi
https://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools/dbg_x86.msi
This kldbgdrv.sys API is used by the !pci command of new WinDbg kernel
debugger for displaying PCI config space.
API of this driver is available only for processes with Debug privilege and
only if system was booted with Debugging option.
|
| |
| |
| |
| | |
Feel free to re-enable it if you find it useful.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Lot of non-x86 platforms also support Intel Type 1 mechanism. x86 IO ports
CF8 and CFC are on these platforms mapped into standard memory space.
Address mapping itself is platform or board specific and there is no
default value.
Lot of ARM boards with multiple PCIe controllers are multi-domain and each
PCI domain has its own CF8/CFC (address/data) registers mapped into memory
space.
Add new mmio-conf1 backend which access CF8/CFC ports via MMIO and define
new config option mmio-conf1.addrs which specify list of address/data
register pairs in memory space for each PCI domain. Format of this option
is: 0xaddr1/0xdata1,0xaddr2/0xdata2,...
|
| | |
|
| |
| |
| |
| |
| | |
Function pci_generic_scan() scans PCI domain 0. This new function
pci_generic_scan_domain() scans specified PCI domain number.
|