mirror of
https://github.com/ipxe/ipxe
synced 2025-12-16 09:32:33 +03:00
[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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user