iPXE
pcibackup.h
Go to the documentation of this file.
00001 #ifndef _IPXE_PCIBACKUP_H
00002 #define _IPXE_PCIBACKUP_H
00003 
00004 /** @file
00005  *
00006  * PCI configuration space backup and restoration
00007  *
00008  */
00009 
00010 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
00011 
00012 #include <stdint.h>
00013 
00014 /** A PCI configuration space backup */
00015 struct pci_config_backup {
00016         uint32_t dwords[64];
00017 };
00018 
00019 /** PCI configuration space backup exclusion list end marker */
00020 #define PCI_CONFIG_BACKUP_EXCLUDE_END 0xff
00021 
00022 /** Define a PCI configuration space backup exclusion list */
00023 #define PCI_CONFIG_BACKUP_EXCLUDE(...) \
00024         { __VA_ARGS__, PCI_CONFIG_BACKUP_EXCLUDE_END }
00025 
00026 extern void pci_backup ( struct pci_device *pci,
00027                          struct pci_config_backup *backup,
00028                          const uint8_t *exclude );
00029 extern void pci_restore ( struct pci_device *pci,
00030                           struct pci_config_backup *backup,
00031                           const uint8_t *exclude );
00032 
00033 #endif /* _IPXE_PCIBACKUP_H */