]> mj.ucw.cz Git - pciutils.git/log
pciutils.git
22 months agolibpci: Document physmem API
Pali Rohár [Sat, 17 Feb 2024 15:30:30 +0000 (16:30 +0100)]
libpci: Document physmem API

22 months agolibpci: Add Windows physmem support for PCIe ECAM access
Pali Rohár [Mon, 8 May 2023 19:25:12 +0000 (21:25 +0200)]
libpci: Add Windows physmem support for PCIe ECAM access

It requires either access to NT Section \Device\PhysicalMemory (or
compatible) or to have available kernel32.dll VxDCall2 function or
w32skrnl.dll DPMI function.

22 months agolibpci: Add DJGPP physmem support for PCIe ECAM access
Pali Rohár [Mon, 8 May 2023 19:22:59 +0000 (21:22 +0200)]
libpci: Add DJGPP physmem support for PCIe ECAM access

It requires either Device Mapping support on DPMI host or Physical Address
Mapping support together with support for changing DS descriptor limit to
maximal size 4 GB which enables address wrapping and so access to addresses
below the process base address.

22 months agoMaintainer scripts: Create GitHub releases
Martin Mares [Sat, 8 Jun 2024 18:46:00 +0000 (20:46 +0200)]
Maintainer scripts: Create GitHub releases

22 months agoReleased as v3.13.0 v3.13.0
Martin Mares [Thu, 30 May 2024 15:58:10 +0000 (17:58 +0200)]
Released as v3.13.0

22 months agoUpdated pci.ids
Martin Mares [Thu, 30 May 2024 15:54:02 +0000 (17:54 +0200)]
Updated pci.ids

22 months agoABI version bump for pci_fill_info()
Martin Mares [Thu, 30 May 2024 15:52:26 +0000 (17:52 +0200)]
ABI version bump for pci_fill_info()

We have new flags and new fields in struct pci_dev.

22 months agoChangeLog was missing a 3.12 release
Martin Mares [Thu, 30 May 2024 15:46:57 +0000 (17:46 +0200)]
ChangeLog was missing a 3.12 release

22 months agoRCD: Cleanup
Martin Mares [Thu, 30 May 2024 15:46:01 +0000 (17:46 +0200)]
RCD: Cleanup

22 months agoAdd display function for cxl1.1 device link status information. (#183)
Kobayashi Daisuke [Thu, 30 May 2024 15:41:28 +0000 (00:41 +0900)]
Add display function for cxl1.1 device link status information. (#183)

* Add display function for cxl1.1 device link status information.

* Modifications according to comments. Adding a description, Fix odd indent, and remove unnecessary statement.

22 months agopcilmr: Fix margining for ports with Lane reversal
Nikita Proshkin [Mon, 27 May 2024 15:22:55 +0000 (18:22 +0300)]
pcilmr: Fix margining for ports with Lane reversal

Current implementation interacts only with first Negotiated Link Width
lanes even when Maximum Link Width for the port is bigger than that and
Lane reversal is used. Utility in such situation may try to margin lane
which is not used right now and erroneously fail with
'Error during caps reading' message. Fix that behaviour.

Signed-off-by: Nikita Proshkin <n.proshkin@yadro.com>
22 months agopcilmr.man: Fix whitespace errors
Martin Mares [Mon, 27 May 2024 12:36:34 +0000 (14:36 +0200)]
pcilmr.man: Fix whitespace errors

22 months agopcilmr: Update usage and man: new arguments format and grading
Nikita Proshkin [Wed, 22 May 2024 16:06:34 +0000 (19:06 +0300)]
pcilmr: Update usage and man: new arguments format and grading

Signed-off-by: Nikita Proshkin <n.proshkin@yadro.com>
22 months agopcilmr: Apply grading quirk for Ice Lake RC ports
Nikita Proshkin [Wed, 22 May 2024 16:06:33 +0000 (19:06 +0300)]
pcilmr: Apply grading quirk for Ice Lake RC ports

Ice Lake RC ports don't support two side independent timing margining,
however the entire margin across the eye is what is reported by one side
margining. Utility already has quirks for Ice Lake RC, so expand them
based on this grading information.

Signed-off-by: Nikita Proshkin <n.proshkin@yadro.com>
22 months agopcilmr: Add option to configure margining dwell time
Nikita Proshkin [Wed, 22 May 2024 16:06:32 +0000 (19:06 +0300)]
pcilmr: Add option to configure margining dwell time

Signed-off-by: Nikita Proshkin <n.proshkin@yadro.com>
22 months agopcilmr: Add new grading option
Nikita Proshkin [Wed, 22 May 2024 16:06:31 +0000 (19:06 +0300)]
pcilmr: Add new grading option

Original version of the utility used values from the Table 8-11 of the
PCIe Base Spec Rev 5.0 to evaluate lanes. But it seems that these values
relate only to the margining equipment and are not relevant to evaluating
the quality of connections.

The PCIe Base Spec Rev 5.0 sets the minimum values for the eye in the
section 8.4.2. Change default grading values in the utility according to
this section.

The specification uses the values of the full width and height of the eye,
so add these values to the output of the utility.

In addition, manufacturers can provide criteria for their devices that
differ from the standard ones. Usually this information falls under the
NDA, so add an option to the utility that will allow the user to set
necessary criteria for evaluating the quality of lanes.

Implement the following syntax for the -g(rading) option:
-g 1t=15ps,f | -g 6v=20

Use passed per link receiver criteria for the eye width (timing - t) or
height (voltage - v) in the utility results.

Additional flag f is for situations when port doesn't support two side
independent margining. In such cases by default calculate EW or EH as a
double one side result. User can add f flag for -g option to tell the
utility that the result in one direction is actually the measurement of
the full eye (for example, Ice Lake RC ports work in this way) and it does
not need to be multiplied.

Signed-off-by: Nikita Proshkin <n.proshkin@yadro.com>
22 months agopcilmr: Move most of pcilmr arguments parsing logic to the separate file
Nikita Proshkin [Wed, 22 May 2024 16:06:30 +0000 (19:06 +0300)]
pcilmr: Move most of pcilmr arguments parsing logic to the separate file

Also change arguments parsing logic: now link parameters (selected lane
numbers, timing or voltage steps, etc) need to be specified after link port
and will affect only this link margining (previously, one option was
applied to all links).

See updated man for syntax and example.

Signed-off-by: Nikita Proshkin <n.proshkin@yadro.com>
22 months agopcilmr: Ensure that utility can accept either Downstream or Upstream link port
Nikita Proshkin [Wed, 22 May 2024 16:06:29 +0000 (19:06 +0300)]
pcilmr: Ensure that utility can accept either Downstream or Upstream link port

Previously, the utility expected only the Upstream Port to be input and,
in fact, passing the Downstream Port led to strange and buggy error
messages. Improve arguments parsing logic to accept any side of the link.

It seems that the only use case that will not be available now is margining
the internal links of the switch, but this scenario looks as strange as
possible.

Signed-off-by: Nikita Proshkin <n.proshkin@yadro.com>
22 months agosysfs: Include <libgen.h> for basename()
Martin Mares [Mon, 27 May 2024 12:21:29 +0000 (14:21 +0200)]
sysfs: Include <libgen.h> for basename()

Otherwise, it fails to build with musl libc.

22 months agodump: allow 6-digit domains
Konrad Sztyber [Wed, 22 May 2024 10:16:44 +0000 (12:16 +0200)]
dump: allow 6-digit domains

The SPDK VMD driver assigns domains for the devices behind a VMD by
concatenating bus/device/function of the VMD, each on a separate byte.
For instance, a device behind a VMD with an address of 5d:05.5 would be
assigned domain 5d0505.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
23 months agols-ecaps: extend decode support for more fields for AER CE and UE status
Shuai Xue [Fri, 26 Apr 2024 08:38:25 +0000 (16:38 +0800)]
ls-ecaps: extend decode support for more fields for AER CE and UE status

Extend decode support for more fields for AER CE and UE status prior to
PCIe r6.0.

Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
23 months agols-ecaps: Correct the link state reporting
Alexey Kardashevskiy [Wed, 24 Apr 2024 10:20:11 +0000 (20:20 +1000)]
ls-ecaps: Correct the link state reporting

PCIe r6.0, sec 7.9.26.4.2 "Link IDE Stream Status Register defines"
the link state as:

0000b Insecure
0010b Secure

The same definition applies to selective streams as well.
The existing code wrongly assumes "secure" is 0001b, fix that for both
link and selective streams.

While at this, add missing "Selective IDE for Configuration Requests Enable".
Also fix the base and limit parsing for the memory and RID ranges.

Fixes: 42fc4263ec0e ("ls-ecaps: Add decode support for IDE Extended Capability")
Signed-off-by: Alexey Kardashevskiy <aik@amd.com>
2 years agomaint/README: Use release-prog
Martin Mares [Fri, 5 Apr 2024 21:38:16 +0000 (23:38 +0200)]
maint/README: Use release-prog

2 years agomaint/README: git push --tags is done by push-to-public
Martin Mares [Fri, 5 Apr 2024 21:36:11 +0000 (23:36 +0200)]
maint/README: git push --tags is done by push-to-public

2 years agoReleased as v3.12.0
Martin Mares [Fri, 5 Apr 2024 21:31:56 +0000 (23:31 +0200)]
Released as v3.12.0

2 years agoUpdate pci.ids to today's snapshot
Martin Mares [Fri, 5 Apr 2024 21:29:11 +0000 (23:29 +0200)]
Update pci.ids to today's snapshot

2 years agoREADME.Windows: Fix typo
Martin Mares [Fri, 5 Apr 2024 20:51:49 +0000 (22:51 +0200)]
README.Windows: Fix typo

2 years agoREADME: Copy win32-kldbg info from manpage
Pali Rohár [Fri, 5 Apr 2024 16:36:14 +0000 (18:36 +0200)]
README: Copy win32-kldbg info from manpage

2 years agolibpci: hwdb: Remove ID_SUBSYSTEM and ID_GEN_SUBSYSTEM usage from pci_id_hwdb_lookup()
Pali Rohár [Sat, 30 Mar 2024 10:06:25 +0000 (11:06 +0100)]
libpci: hwdb: Remove ID_SUBSYSTEM and ID_GEN_SUBSYSTEM usage from pci_id_hwdb_lookup()

Currently used udev hwdb key "ID_MODEL_FROM_DATABASE" does not return
subsystem, but returns device name.

There is no udev hwdb key which returns subsystem or generic subsystem.
So remove ID_SUBSYSTEM and ID_GEN_SUBSYSTEM from pci_id_hwdb_lookup().

This change fixes issue that pci_id_hwdb_lookup() as subsystem name always
returned device name.

2 years agowindows: Do not show unwanted file-not-found GUI message box
Pali Rohár [Fri, 29 Mar 2024 20:19:27 +0000 (21:19 +0100)]
windows: Do not show unwanted file-not-found GUI message box

Sometimes SEM_FAILCRITICALERRORS flag (disable critical-error-handler GUI
messages) is not enough for LoadLibrary() and SEM_NOOPENFILEERRORBOX flag
(disable file-not-found GUI messages) is needed too to prevent showing GUI
messages on LoadLibrary() failures.

2 years agowindows: Correctly propagate error code from win32_call_func_with_tcb_privilege()
Pali Rohár [Wed, 28 Feb 2024 00:06:38 +0000 (01:06 +0100)]
windows: Correctly propagate error code from win32_call_func_with_tcb_privilege()

Cleanup phase may change error code as it calls other WinAPI functions.

2 years agolibpci: ecam: Fix scanning of Extended BIOS Data Area for ACPI RSDP
Pali Rohár [Tue, 27 Feb 2024 23:32:08 +0000 (00:32 +0100)]
libpci: ecam: Fix scanning of Extended BIOS Data Area for ACPI RSDP

At physical address 0x40E (part of BDA) is stored indirect 16-bit paragraph
offset to the EBDA, and not the EBDA itself. Fix it.

ACPI code in linux kernel checks if the EBDA offset in BDA is above
physical address 0x400. Do the same check here. It is for detection if EBDA
is present as it does not have to be on the old computers or in some
virtualised environments.

2 years agoMakefile: Pass CFLAGS also when linking executable
Pali Rohár [Sun, 25 Feb 2024 02:22:08 +0000 (03:22 +0100)]
Makefile: Pass CFLAGS also when linking executable

Optimization flags like -O2 from $(OPT) passed via $(CFLAGS) used during
compiling individual object files are ignored when gcc's LTO is enabled for
the linking final executable.

Optimization flags used for compiling individual object files should be
same as optimization flags for linking final executable.

Fix propagation of $(CFLAGS) and $(OPT) when LTO is enabled.

2 years agomaint/push-to-public: git push --tags requires branches
Martin Mares [Fri, 29 Mar 2024 22:25:43 +0000 (23:25 +0100)]
maint/push-to-public: git push --tags requires branches

2 years agopci.h: Document PCI_FILL_xxx flags
Martin Mares [Fri, 29 Mar 2024 22:10:49 +0000 (23:10 +0100)]
pci.h: Document PCI_FILL_xxx flags

2 years agoUse C99 named initializers for struct pci_methods
Martin Mares [Fri, 29 Mar 2024 21:47:48 +0000 (22:47 +0100)]
Use C99 named initializers for struct pci_methods

2 years agoMerge remote-tracking branch 'github/master'
Martin Mares [Wed, 13 Mar 2024 17:55:25 +0000 (18:55 +0100)]
Merge remote-tracking branch 'github/master'

2 years agoMerge pull request #178 from OscarL/haiku-fix-build-with-dns
Martin Mareš [Wed, 13 Mar 2024 17:55:15 +0000 (18:55 +0100)]
Merge pull request #178 from OscarL/haiku-fix-build-with-dns

Haiku: fix build with DNS=yes.

2 years agoMerge pull request #177 from OscarL/cache-loc-on-man-pages
Martin Mareš [Wed, 13 Mar 2024 17:54:24 +0000 (18:54 +0100)]
Merge pull request #177 from OscarL/cache-loc-on-man-pages

lspci.man: update the path used to store the cached files.

2 years agoHaiku: fix build with DNS=yes.
Oscar Lesta [Wed, 13 Mar 2024 06:26:13 +0000 (03:26 -0300)]
Haiku: fix build with DNS=yes.

2 years agolspci.man: update the path used to store the cached files.
Oscar Lesta [Wed, 13 Mar 2024 05:56:34 +0000 (02:56 -0300)]
lspci.man: update the path used to store the cached files.

2 years agosysfs: Avoid close() potentially clobbering errno
Martin Mares [Tue, 12 Mar 2024 19:47:28 +0000 (20:47 +0100)]
sysfs: Avoid close() potentially clobbering errno

2 years agoMerge remote-tracking branch 'github/master'
Martin Mares [Tue, 12 Mar 2024 11:22:48 +0000 (12:22 +0100)]
Merge remote-tracking branch 'github/master'

2 years agoMerge pull request #176 from OscarL/haiku-build-fix
Martin Mareš [Tue, 12 Mar 2024 11:22:35 +0000 (12:22 +0100)]
Merge pull request #176 from OscarL/haiku-build-fix

Build fix on Haiku.

2 years agoBuild fix on Haiku.
Zoltán Mizsei [Sun, 1 Jul 2018 16:42:31 +0000 (18:42 +0200)]
Build fix on Haiku.

2 years agomaint/push-to-public: Push including tags
Martin Mares [Mon, 26 Feb 2024 20:16:23 +0000 (21:16 +0100)]
maint/push-to-public: Push including tags

2 years agolspci: Add TEE-IO extended capability bit
Alexey Kardashevskiy [Mon, 26 Feb 2024 06:01:35 +0000 (17:01 +1100)]
lspci: Add TEE-IO extended capability bit

PCIe r6.1, sec 7.5.3.3 defines "TEE-IO Supported" in the PCI Express Device
Capabilities Register which indicates that the function implements
the TEE-IO functionality as described by the TEE Device Interface Security
Protocol (TDISP, PCIe r6.1, chapter 11).

tests/cap-ide is an example of such device.

Signed-off-by: Alexey Kardashevskiy <aik@amd.com>
2 years agols-ecaps: Add decode support for IDE Extended Capability
Alexey Kardashevskiy [Mon, 26 Feb 2024 06:01:34 +0000 (17:01 +1100)]
ls-ecaps: Add decode support for IDE Extended Capability

IDE (Integrity & Data Encryption) Extended Capability defined in [1]
implements control of the PCI link encryption. The verbose level > 2 prints
offsets of the fields to make running setpci easier.

The example output is:

Capabilities: [830 v1] Integrity & Data Encryption
IDECap: Lnk=0 Sel=1 FlowThru- PartHdr- Aggr- PCPC- IDE_KM+ Alg='AES-GCM-256-96b' TCs=8 TeeLim+
IDECtl: FTEn-
SelectiveIDE#0 Cap: RID#=1
SelectiveIDE#0 Ctl: En- NPR- PR- CPL- PCRC- HdrEnc=no Alg='AES-GCM-256-96b' TC0 ID0
SelectiveIDE#0 Sta: insecure RecvChkFail-
SelectiveIDE#0 RID: Valid- Base=0 Limit=0 SegBase=0
SelectiveIDE#0 RID#0: Valid- Base=0 Limit=0

[1] PCIe r6.0.1, sections 6.33, 7.9.26

Signed-off-by: Alexey Kardashevskiy <aik@amd.com>
2 years agomaint/README: Mention maint/push-to-public
Martin Mares [Sat, 24 Feb 2024 23:12:16 +0000 (00:12 +0100)]
maint/README: Mention maint/push-to-public

2 years agoReleasing as v3.11.1. v3.11.1
Martin Mares [Sat, 24 Feb 2024 23:11:10 +0000 (00:11 +0100)]
Releasing as v3.11.1.

2 years agoREADME: Update information about Windows support
Pali Rohár [Sat, 24 Feb 2024 22:57:35 +0000 (23:57 +0100)]
README: Update information about Windows support

2 years agolib/init.c: Fixed a typo causing compilation on Windows to fail
Martin Mares [Sat, 24 Feb 2024 22:38:10 +0000 (23:38 +0100)]
lib/init.c: Fixed a typo causing compilation on Windows to fail

The typo was introduced by merging the AmigaOS back-end.

2 years agoReleased as v3.11.0 v3.11.0
Martin Mares [Sat, 24 Feb 2024 21:59:12 +0000 (22:59 +0100)]
Released as v3.11.0

2 years agoREADME: Update copyright year and mention pcilmr
Martin Mares [Sat, 24 Feb 2024 21:21:16 +0000 (22:21 +0100)]
README: Update copyright year and mention pcilmr

2 years agoUpdated pci.ids to today's snapshot
Martin Mares [Sat, 24 Feb 2024 20:29:47 +0000 (21:29 +0100)]
Updated pci.ids to today's snapshot

2 years agolibpci: Add missing dependences for i386-ports.o target
Pali Rohár [Tue, 20 Feb 2024 17:44:43 +0000 (18:44 +0100)]
libpci: Add missing dependences for i386-ports.o target

2 years agolibpci: i386-io-sunos.h: Implement intel_cleanup_io
Pali Rohár [Tue, 20 Feb 2024 17:44:06 +0000 (18:44 +0100)]
libpci: i386-io-sunos.h: Implement intel_cleanup_io

Call 'sysi86(SI86V86, V86SC_IOPL, 0);' - same what is X11 and FlashROM doing.

2 years agolibpci: Define STATIC_ALIAS for DLL Windows builds
Pali Rohár [Sat, 24 Feb 2024 15:12:26 +0000 (16:12 +0100)]
libpci: Define STATIC_ALIAS for DLL Windows builds

Windows builds for versioned symbols use inline asm .set directive which in
some cases makes x86-64 LTO compiler to drop the referenced value. Define
STATIC_ALIAS macro with VERSIONED_ABI (used) attribute which forces LTO
compiler to not drop the symbol from the final DLL library.

2 years agolibpci: win32-cfgmgr32: Do not include resolver for cfgmgr32 function for MinGW-w64
Pali Rohár [Sat, 24 Feb 2024 15:09:35 +0000 (16:09 +0100)]
libpci: win32-cfgmgr32: Do not include resolver for cfgmgr32 function for MinGW-w64

MinGW-w64 toolchain (as opposite to MinGW32) provides all needed cfgmgr32
functions in import library. Use import library and do not resolve
functions at runtime.

2 years agolibpci: win32-cfgmgr32: Define mMD_Prefetchable constant
Pali Rohár [Sat, 24 Feb 2024 15:08:13 +0000 (16:08 +0100)]
libpci: win32-cfgmgr32: Define mMD_Prefetchable constant

Older version of cfgmgr32.h header file use define name fMD_Prefetchable
instead of mMD_Prefetchable. Define constant to fix compilation.

2 years agowindows: Try to return error message from win32_strerror() in US English language
Pali Rohár [Sat, 24 Feb 2024 15:05:43 +0000 (16:05 +0100)]
windows: Try to return error message from win32_strerror() in US English language

The default LANG_NEUTRAL language is the system language, not the "C" locale.

2 years agoMerge branch 'amiga'
Martin Mares [Fri, 23 Feb 2024 13:56:39 +0000 (14:56 +0100)]
Merge branch 'amiga'

2 years agolibpci: Do not build physmem-posix.c when not needed
Pali Rohár [Sun, 18 Feb 2024 18:43:13 +0000 (19:43 +0100)]
libpci: Do not build physmem-posix.c when not needed

2 years agolspci: Fix make uninstall
Pali Rohár [Sun, 18 Feb 2024 16:45:21 +0000 (17:45 +0100)]
lspci: Fix make uninstall

2 years agopcilmr: Add missing Makefile rules
Pali Rohár [Sun, 18 Feb 2024 16:41:23 +0000 (17:41 +0100)]
pcilmr: Add missing Makefile rules

2 years agolibpci: ecam: Cache ACPI MCFG table between detect() and init() phase
Pali Rohár [Thu, 18 May 2023 19:40:44 +0000 (21:40 +0200)]
libpci: ecam: Cache ACPI MCFG table between detect() and init() phase

This will speed up listing devices by lspci as it is not needed to scan
BIOS memory two times.

2 years agolibpci: ecam: Fix detect sequence when addresses are not specified
Pali Rohár [Mon, 8 May 2023 19:25:36 +0000 (21:25 +0200)]
libpci: ecam: Fix detect sequence when addresses are not specified

Search for ACPI MCFG table in detect sequence, so on failure we can move to
the next pci access method.

2 years agolibpci: Enable POSIX physmem also on Solaris, Haiku nad BeOS
Pali Rohár [Mon, 8 May 2023 19:19:27 +0000 (21:19 +0200)]
libpci: Enable POSIX physmem also on Solaris, Haiku nad BeOS

Solaris can access physical memory via mmap() of /dev/xsvc device and
Haiku + BeOS of /dev/misc/mem device.

2 years agolibpci: physmem-posix: Fix OFF_MAX definition
Pali Rohár [Sat, 20 Jan 2024 11:30:08 +0000 (12:30 +0100)]
libpci: physmem-posix: Fix OFF_MAX definition

Expression ((1 << n) - 1) for n=31 has undefined behavior and gcc 11
already evaluates it to zero.

Fix definition of OFF_MAX to prevent signed integer overflow.

2 years agolibpci: Move physical memory mapping mmap() code from ecam/mmio-ports to physmem...
Pali Rohár [Mon, 8 May 2023 19:15:07 +0000 (21:15 +0200)]
libpci: Move physical memory mapping mmap() code from ecam/mmio-ports to physmem-posix.c file

This deduplicates physical memory mapping mmap() code found in ecam and
mmio-ports backends into common functions with new physmem API.

This new physmem API allows to implement also non-mmap() variants of
physical memory mapping.

2 years agopcilmr: Fix compilation for windows and djgpp
Pali Rohár [Sun, 18 Feb 2024 13:50:54 +0000 (14:50 +0100)]
pcilmr: Fix compilation for windows and djgpp

2 years agowindows: Fix setting permissions in grant_process_token_dacl_permissions()
Pali Rohár [Wed, 14 Jun 2023 15:43:21 +0000 (17:43 +0200)]
windows: Fix setting permissions in grant_process_token_dacl_permissions()

Rewrite function to always add a new allow granting permissions at first
position in DACL. Normally all deny permissions are before allow
permissions, so previously allow permission could have been overridden by
explicit deny permission. With this change, our newly added allow
permission override any possible deny permission and always grant access
for asked process user.

Also properly handle automatic inheritance model which is in use since
Windows 2000 and handle also special case when DACL is not present which
gives allow access to everyone.

2 years agowindows: Move win32_call_func_with_tcb_privilege() from i386-io-windows.h to win32...
Pali Rohár [Wed, 24 May 2023 18:28:38 +0000 (20:28 +0200)]
windows: Move win32_call_func_with_tcb_privilege() from i386-io-windows.h to win32-helpers.c

2 years agowindows: Move common non-I/O port code from i386-io-windows.h to win32-helpers.c
Pali Rohár [Mon, 8 May 2023 12:04:40 +0000 (14:04 +0200)]
windows: Move common non-I/O port code from i386-io-windows.h to win32-helpers.c

2 years agowindows: Deduplicate code and move helper functions to new file win32-helpers.c
Pali Rohár [Sun, 7 May 2023 14:40:28 +0000 (16:40 +0200)]
windows: Deduplicate code and move helper functions to new file win32-helpers.c

Function win32_strerror() was duplicated in two different files:
win32-cfgmgr32.c and win32-kldbg.c. Now there is only one in
win32-helpers.c.

2 years agowindows: Translate NT status to Win32 error
Pali Rohár [Sun, 7 May 2023 15:05:42 +0000 (17:05 +0200)]
windows: Translate NT status to Win32 error

2 years agowindows: Split code for enabling Tcb privilege and calling ProcessUserModeIOPL
Pali Rohár [Sun, 7 May 2023 11:32:54 +0000 (13:32 +0200)]
windows: Split code for enabling Tcb privilege and calling ProcessUserModeIOPL

Code for enabling Tcb privilege is split from SetProcessUserModeIOPL() into
new function CallFuncWithTcbPrivilege().

2 years agowindows: Comment on MSVC inline asm issues
Martin Mares [Sun, 18 Feb 2024 13:15:06 +0000 (14:15 +0100)]
windows: Comment on MSVC inline asm issues

2 years agowindows: Add strtoull defines for msvc
Pali Rohár [Wed, 24 May 2023 19:45:48 +0000 (21:45 +0200)]
windows: Add strtoull defines for msvc

2 years agowindows: Make msvc __readeflags more readable
Pali Rohár [Sun, 1 Jan 2023 18:52:16 +0000 (19:52 +0100)]
windows: Make msvc __readeflags more readable

Semicolon in msvc __asm block means start of the comment, and not end of
the __asm statement, like it is for all other C statements. Also function
which uses msvc inline assembly cannot be inlined to another function
(compiler reports a warning about it, not a fatal error). So add explicit
curly brackets for __asm block, remove misleading semicolons and do not
declare function as inline.

2 years agoMakefile: Fix dependencies on header files
Martin Mares [Sun, 18 Feb 2024 13:12:10 +0000 (14:12 +0100)]
Makefile: Fix dependencies on header files

2 years agoMaint: Added a script for pushing to both public repos
Martin Mares [Sun, 18 Feb 2024 11:12:01 +0000 (12:12 +0100)]
Maint: Added a script for pushing to both public repos

2 years agoLet us use <getopt.h> everywhere
Martin Mares [Sun, 18 Feb 2024 11:10:21 +0000 (12:10 +0100)]
Let us use <getopt.h> everywhere

It is needed by pcilmr anyway.

If it turns out to be missing on your system, please extend
the condition for use of compat/getopt.h in pciutils.h.

2 years agopcilmr: Avoid strftime with %F and produce proper ISO 8601 time
Martin Mares [Sun, 18 Feb 2024 11:09:19 +0000 (12:09 +0100)]
pcilmr: Avoid strftime with %F and produce proper ISO 8601 time

%F is not portable.

2 years agopcilmr: Clean up includes
Martin Mares [Sun, 18 Feb 2024 11:09:02 +0000 (12:09 +0100)]
pcilmr: Clean up includes

2 years agopcilmr: No need to copy a string passed to filter parsing functions
Martin Mares [Sun, 18 Feb 2024 11:08:21 +0000 (12:08 +0100)]
pcilmr: No need to copy a string passed to filter parsing functions

The parsing is guaranteed to be non-destructive in recent libpci.

2 years agobitops.h moved to root
Martin Mares [Sun, 18 Feb 2024 11:07:50 +0000 (12:07 +0100)]
bitops.h moved to root

It is a part of the utilities, not of libpci.

2 years agolib/types.h makes NULL always available
Martin Mares [Sun, 18 Feb 2024 11:06:03 +0000 (12:06 +0100)]
lib/types.h makes NULL always available

2 years agoSince we already require C99, we can rely on <stdint.h>
Martin Mares [Sun, 18 Feb 2024 11:05:21 +0000 (12:05 +0100)]
Since we already require C99, we can rely on <stdint.h>

2 years agoMakefile: Additions to CFLAGS require an override
Martin Mares [Sun, 18 Feb 2024 11:04:44 +0000 (12:04 +0100)]
Makefile: Additions to CFLAGS require an override

Otherwise, they are ignored when "make CFLAGS=something" is used.

2 years agoMakefile: When linking pcilmr, specify library last
Martin Mares [Sun, 18 Feb 2024 11:04:28 +0000 (12:04 +0100)]
Makefile: When linking pcilmr, specify library last

2 years agoChangeLog: Preparing for release
Martin Mares [Sun, 18 Feb 2024 00:43:57 +0000 (01:43 +0100)]
ChangeLog: Preparing for release

2 years agoManual: Document tilde expansion in net.cache_name
Martin Mares [Sun, 18 Feb 2024 00:42:25 +0000 (01:42 +0100)]
Manual: Document tilde expansion in net.cache_name

2 years agoLocation of name cache now follows XDG base dir specification
Martin Mares [Sun, 18 Feb 2024 00:40:36 +0000 (01:40 +0100)]
Location of name cache now follows XDG base dir specification

We also create parent directories of net.cache_name automatically.

Tilde expansion is performed internally and it does not change
user-specified net.cache_name any longer.

2 years agoNames: Fixed a rare bug in loading of pci.ids
Martin Mares [Sun, 18 Feb 2024 00:37:49 +0000 (01:37 +0100)]
Names: Fixed a rare bug in loading of pci.ids

If the pci.ids file was empty, it was never considered loaded,
so the loading function was called repeatedly and it always flushed
the name cache.

2 years agoGitignore: Add pcilmr
Martin Mares [Sun, 18 Feb 2024 00:36:44 +0000 (01:36 +0100)]
Gitignore: Add pcilmr

2 years agoLibrary: pci_define_param() returns a pointer to the parameter
Martin Mares [Sun, 18 Feb 2024 00:35:59 +0000 (01:35 +0100)]
Library: pci_define_param() returns a pointer to the parameter

This will allow overriding pci_param->malloced.

2 years agobitops.h should not be included from public pci.h
Martin Mares [Sat, 17 Feb 2024 23:07:14 +0000 (00:07 +0100)]
bitops.h should not be included from public pci.h

2 years agoRemoved a forgotten debugging test
Martin Mares [Sat, 17 Feb 2024 23:06:33 +0000 (00:06 +0100)]
Removed a forgotten debugging test

It was introduced by commit 0ce6ff4aafb36a7923511a8da6bbbebb642e3109.

2 years agopcilmr: Add pcilmr man page
Nikita Proshkin [Wed, 27 Dec 2023 09:45:04 +0000 (14:45 +0500)]
pcilmr: Add pcilmr man page

Reviewed-by: Sergei Miroshnichenko <s.miroshnichenko@yadro.com>
Signed-off-by: Nikita Proshkin <n.proshkin@yadro.com>