[pci] Auto-resize VPD fields used for non-volatile storage

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2011-01-10 03:35:34 +00:00
parent e67c79b856
commit 7bf37147b3
3 changed files with 151 additions and 40 deletions

View File

@@ -73,6 +73,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#define ERRFILE_spi ( ERRFILE_DRIVER | 0x00110000 )
#define ERRFILE_i2c_bit ( ERRFILE_DRIVER | 0x00120000 )
#define ERRFILE_spi_bit ( ERRFILE_DRIVER | 0x00130000 )
#define ERRFILE_nvsvpd ( ERRFILE_DRIVER | 0x00140000 )
#define ERRFILE_3c509 ( ERRFILE_DRIVER | 0x00200000 )
#define ERRFILE_bnx2 ( ERRFILE_DRIVER | 0x00210000 )

View File

@@ -13,21 +13,21 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <ipxe/nvs.h>
#include <ipxe/pcivpd.h>
struct nvo_block;
struct refcnt;
/** An NVS VPD device */
struct nvs_vpd_device {
/** NVS device */
struct nvs_device nvs;
/** PCI VPD device */
struct pci_vpd vpd;
/** Starting address
*
* This address is added to the NVS address to form the VPD
* address.
*/
unsigned int address;
};
extern int nvs_vpd_init ( struct nvs_vpd_device *nvsvpd, struct pci_device *pci,
unsigned int field );
extern int nvs_vpd_init ( struct nvs_vpd_device *nvsvpd,
struct pci_device *pci );
extern void nvs_vpd_nvo_init ( struct nvs_vpd_device *nvsvpd,
unsigned int field, struct nvo_block *nvo,
struct refcnt *refcnt );
#endif /* IPXE_NVSVPD_H */