readme.txt + pcie.c + in.txt +Makefile
可参考源码是: lspci
readme.txt
Please open the terminal in your linux system, then:
1.Please install two lib about pcie:
apt-get install libpciaccess-dev
apt-get install pciutils-dev
2.Please find the road path of libpci.a in your system, follows the commands:
cd /usr
find ./ -name "*pci*"
then, please modify the road path of the Makefile.
(in my ubuntu, it's road path: /usr/lib/i386-linux-gnu/libpci.a )
3.Please go into the directory of pcie.c, follows the commands:
make
./pcie
4. If you want to write pcie's configuration space, please write your data into the in.txt file.
Separating each byte with space .Such as "3a 4b 5c 6d 7e".
5. You computer may be poweroff, when you modify the byte 37, 38, 39 of PCIE configuration space. (that is,if you modify the Base Address Register 6)
pcie.c
</