[pci] Allow PCI config space backup to be limited by maximum offset

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2022-11-13 20:42:09 +00:00
parent 688646fe6d
commit ca2be7e094
5 changed files with 22 additions and 13 deletions

View File

@@ -11,9 +11,15 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <stdint.h>
/** Limit of PCI configuration space */
#define PCI_CONFIG_BACKUP_ALL 0x100
/** Limit of standard PCI configuration space */
#define PCI_CONFIG_BACKUP_STANDARD 0x40
/** A PCI configuration space backup */
struct pci_config_backup {
uint32_t dwords[64];
uint32_t dwords[ PCI_CONFIG_BACKUP_ALL / sizeof ( uint32_t ) ];
};
/** PCI configuration space backup exclusion list end marker */
@@ -25,9 +31,9 @@ struct pci_config_backup {
extern void pci_backup ( struct pci_device *pci,
struct pci_config_backup *backup,
const uint8_t *exclude );
unsigned int limit, const uint8_t *exclude );
extern void pci_restore ( struct pci_device *pci,
struct pci_config_backup *backup,
const uint8_t *exclude );
unsigned int limit, const uint8_t *exclude );
#endif /* _IPXE_PCIBACKUP_H */