[contrib] Allow Network Protocol header to display in rom-o-matic
[gpxe.git] / src / include / gpxe / pcibackup.h
blob3d295c0fc446e8227ebd341443e76d6ae4dbacd3
1 #ifndef _GPXE_PCIBACKUP_H
2 #define _GPXE_PCIBACKUP_H
4 /** @file
6 * PCI configuration space backup and restoration
8 */
10 FILE_LICENCE ( GPL2_OR_LATER );
12 #include <stdint.h>
14 /** A PCI configuration space backup */
15 struct pci_config_backup {
16 uint32_t dwords[64];
19 /** PCI configuration space backup exclusion list end marker */
20 #define PCI_CONFIG_BACKUP_EXCLUDE_END 0xff
22 /** Define a PCI configuration space backup exclusion list */
23 #define PCI_CONFIG_BACKUP_EXCLUDE(...) \
24 { __VA_ARGS__, PCI_CONFIG_BACKUP_EXCLUDE_END }
26 extern void pci_backup ( struct pci_device *pci,
27 struct pci_config_backup *backup,
28 const uint8_t *exclude );
29 extern void pci_restore ( struct pci_device *pci,
30 struct pci_config_backup *backup,
31 const uint8_t *exclude );
33 #endif /* _GPXE_PCIBACKUP_H */