]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[pci] Backup and restore standard config space across PCIe FLR 801/head
authorMichael Brown <mcb30@ipxe.org>
Sun, 13 Nov 2022 20:45:38 +0000 (20:45 +0000)
committerMichael Brown <mcb30@ipxe.org>
Sun, 13 Nov 2022 21:38:41 +0000 (21:38 +0000)
commit2ae535532188b7772c2aba80247dfdce23d8f275
tree20e4364923e725d91ac259040d403a0d420c4905
parentca2be7e094c900542e36f70f3abc3c8ff7c3055d
[pci] Backup and restore standard config space across PCIe FLR

The behaviour of PCI devices across a function-level reset seems to be
inconsistent in practice: some devices will preserve PCI BARs, some
will not.

Fix the behaviour of FLR on devices that do not preserve PCI BARs by
backing up and restoring PCI configuration space across the reset.
Preserve only the standard portion of the configuration space, since
there may be registers with unexpected side effects in the remaining
non-standardised space.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/bus/pciextra.c