Caution: This is a dirrect manipulation with PCI devices. It may damage your computer when properly or improperly used. There is no safeguard. I take no responsibility of damage you may cause. I repeat: no warranty whatsoever. You have been warned.
setpci was added as a method to manipulation PCI configuration space. Its use is for driver developpers and advanced users willing to play with their hardware. If you don't know what you do please leave this page.
Syntax of grub2's setpci is the same as the one of pciutils. So for more information please refer to man setpci. Notable differences include:
- Only exactly one command per invocation is supported
- No capability support (patches are welcome)
- To compensate lack of pipes an option -v VARNAME is supported which stores read register into a variable VARNAME
Various Tips and Tricks
Set SATA Controller into AHCI mode on some intel mobos. Locate device by bus position:
setpci -s 0:1f.2 90.b=40
Locate device by device ID (safer):
setpci -d 8086:2829 90.b=40