]> git.ipfire.org Git - thirdparty/pciutils.git/blob - README.Windows
README: Update information about Windows support
[thirdparty/pciutils.git] / README.Windows
1 Since 2.1.99-test5, pciutils should also be compilable on Windows. Thanks
2 to Alexander Stock for contributing the port.
3
4 Updated after version 2.2.6 to compile again, and with MinGW, even (only?)
5 cross-compiling. (Hopefully it works with MSVC too.)
6
7 For simple listing PCI devices in system via win32-cfgmgr32 access method
8 which provides only basic information and emulated config space, there is no
9 special requirement. To list PCI resources on Windows 8 and higher versions,
10 it is necessary to have architecture-native version (e.g. AMD64 version on
11 AMD64 systems).
12
13 For config space access there are different windows specific access methods:
14 - win32-kldbg - Kernel Local Debugging Driver kldbgdrv.sys
15 - win32-sysdbg - NT SysDbg interface
16 - intel-conf1 - Direct hardware access via Intel configuration mechanism 1
17
18 The default access method is win32-cfgmgr32 and by default it tries to use
19 one of the above config access access method to provide as much as possible
20 information to application. More details about particular access method and
21 caveats are described in the pcilib(8) manual page.
22
23 To access config space via intel-conf1 access method on NT-based systems via
24 NT ProcessUserModeIOPL system call, it is required to have SeTcbPrivilege
25 (Act as part of the operating system privilege), which can be enabled in User
26 Accounts settings (take effect after next login). By default this privilege is
27 not enabled for any non-system user. Or alternatively it is required to be in
28 local Administrators group and on Windows 2000 SP4 or higher systems to have
29 SeImpersonatePrivilege (Impersonate a client after authentication privilege)
30 which is by default enabled for all local Administrators accounts. There is no
31 special requirement for DOS-based systems. 64-bit systems do not have to allow
32 users to access config space even with SeTcbPrivilege.
33
34 To compile this port, run following command:
35
36 make CROSS_COMPILE=i586-mingw32msvc- HOST=i586-windows ZLIB=no IDSDIR=""
37
38 To build 64-bit version, run:
39
40 make CROSS_COMPILE=x86_64-w64-mingw32- HOST=x86_64-windows ZLIB=no IDSDIR=""
41
42 Sometimes compilation may fail due to broken or missing getopt implementation.
43 In this case try to compile with additional make option: COMPAT_GETOPT=yes
44
45 Building of shared DLL library libpci3.dll is supported too but needs to be
46 manually enabled by make option: SHARED=yes
47
48 This DLL library libpci3.dll has versioned symbols with stable ordinal numbers
49 which provides backward and forward compatibility. Every symbol in DLL library
50 has '@LIBPCI_3.<version>' suffix to achieve it. For linking application to
51 libpci3.dll it is possible to generate import library from libpci3.def file.
52 Such import library will provide import symbol names without versioned suffix
53 as an alias for the latest symbol version, which matches function name in pci.h
54 header file. The alias is resolved by the linker at linking time, so the final
55 application binary would always reference only versioned symbol. DLL library
56 libpci3.dll does not provide unversioned symbols, so for using GetProcAddress()
57 or dlsym() it is needed to specify full versioned symbol name.