1ee7d8384SMartin MaresSince 2.1.99-test5, pciutils should also be compilable on Windows. Thanks 2ee7d8384SMartin Maresto Alexander Stock for contributing the port. 3c0eece92SMartin Mares 409156b3bSMartin MaresUpdated after version 2.2.6 to compile again, and with MinGW, even (only?) 509156b3bSMartin Marescross-compiling. (Hopefully it works with MSVC too.) 609156b3bSMartin Mares 7353f4109SPali RohárFor simple listing PCI devices in system with basic information, there is no 8353f4109SPali Rohárspecial requirement. To list PCI resources on Windows 8 and higher versions, 9353f4109SPali Rohárit is necessary to have architecture-native version (e.g. AMD64 version on 10353f4109SPali RohárAMD64 systems). 11353f4109SPali Rohár 12353f4109SPali RohárTo access config space on NT-based systems, it is required to have SeTcbPrivilege 13b8fbb6f0SPali Rohár(Act as part of the operating system privilege), which can be enabled in User 14b8fbb6f0SPali RohárAccounts settings (take effect after next login). By default this privilege is 15b8fbb6f0SPali Rohárnot enabled for any non-system user. Or alternatively it is required to be in 16b8fbb6f0SPali Rohárlocal Administrators group and on Windows 2000 SP4 or higher systems to have 17b8fbb6f0SPali RohárSeImpersonatePrivilege (Impersonate a client after authentication privilege) 18b8fbb6f0SPali Rohárwhich is by default enabled for all local Administrators accounts. There is no 19353f4109SPali Rohárspecial requirement for DOS-based systems. 64-bit systems do not have to allow 20353f4109SPali Rohárusers to access config space even with SeTcbPrivilege. 21b5847329SMartin Mares 2263435b6eSPali RohárTo compile this port, run following command: 2363435b6eSPali Rohár 24*42e6a803SMartin Mares make CROSS_COMPILE=i586-mingw32msvc- HOST=i586-windows ZLIB=no IDSDIR="" 2563435b6eSPali Rohár 26353f4109SPali RohárTo build 64-bit version, run: 27353f4109SPali Rohár 28353f4109SPali Rohár make CROSS_COMPILE=x86_64-w64-mingw32- HOST=x86_64-windows ZLIB=no IDSDIR="" 29353f4109SPali Rohár 3063435b6eSPali RohárSometimes compilation may fail due to broken or missing getopt implementation. 3163435b6eSPali RohárIn this case try to compile with additional make option: COMPAT_GETOPT=yes 3263435b6eSPali Rohár 33b5847329SMartin Mares================================================================================ 34b5847329SMartin MaresBEWARE: The current implementation pokes I/O ports to access the PCI devices 35b5847329SMartin Maresdirectly. This leads to several problems: some devices are invisible, extended 36b5847329SMartin MaresPCIe configuration space is not available, and there are many potential race 37b5847329SMartin Maresconditions. Instead, libpci should use the proper Windows drivers. 38b5847329SMartin Mares================================================================================ 39