diff options
author | Michael Brown <mcb30@ipxe.org> | 2022-11-13 20:42:09 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2022-11-13 20:42:09 +0000 |
commit | ca2be7e094c900542e36f70f3abc3c8ff7c3055d (patch) | |
tree | dc22399acbc7aba0a69f673fb93d7d095a179a85 /src/include/ipxe | |
parent | 688646fe6d034e98fe7cbcc9403a2d0f70434f40 (diff) | |
download | ipxe-ca2be7e094c900542e36f70f3abc3c8ff7c3055d.tar.gz |
[pci] Allow PCI config space backup to be limited by maximum offset
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
-rw-r--r-- | src/include/ipxe/pcibackup.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/include/ipxe/pcibackup.h b/src/include/ipxe/pcibackup.h index 159d25392..e5249df99 100644 --- a/src/include/ipxe/pcibackup.h +++ b/src/include/ipxe/pcibackup.h @@ -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 */ |