From 7bf37147b31c8b8af6178b094f0c02069f13e152 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 10 Jan 2011 03:35:34 +0000 Subject: [pci] Auto-resize VPD fields used for non-volatile storage Signed-off-by: Michael Brown --- src/include/ipxe/errfile.h | 1 + src/include/ipxe/nvsvpd.h | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src/include') diff --git a/src/include/ipxe/errfile.h b/src/include/ipxe/errfile.h index 2d0422e46..f3a8efb03 100644 --- a/src/include/ipxe/errfile.h +++ b/src/include/ipxe/errfile.h @@ -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 ) diff --git a/src/include/ipxe/nvsvpd.h b/src/include/ipxe/nvsvpd.h index 5f80844e7..3450e5c71 100644 --- a/src/include/ipxe/nvsvpd.h +++ b/src/include/ipxe/nvsvpd.h @@ -13,21 +13,21 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include #include +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 */ -- cgit v1.2.3-55-g7522