diff options
| author | Michael Brown | 2007-01-08 03:24:53 +0100 |
|---|---|---|
| committer | Michael Brown | 2007-01-08 03:24:53 +0100 |
| commit | 675fe200e54a5f0f071822ed4e685d3240dd14f2 (patch) | |
| tree | 1f83794c3265a2de2387381af461d340f3830f9b /src/arch/i386/include | |
| parent | Renamed undi.c to undinet.c. (undi.c will become the UNDI PCI driver) (diff) | |
| download | ipxe-675fe200e54a5f0f071822ed4e685d3240dd14f2.tar.gz ipxe-675fe200e54a5f0f071822ed4e685d3240dd14f2.tar.xz ipxe-675fe200e54a5f0f071822ed4e685d3240dd14f2.zip | |
Use "struct undi_device" instead of "struct pxe_device", and use the
function prefix "undinet_" and the variable name "undinic" in undinet.c,
so that we can reserve the variable name "undi" for a struct undi_device.
The idea is that we preserve the Etherboot 5.4 convention that the "UNDI"
code refers to our using an underlying UNDI stack, while the "PXE" code
refers to our providing a PXE API.
Diffstat (limited to 'src/arch/i386/include')
| -rw-r--r-- | src/arch/i386/include/undi.h | 59 | ||||
| -rw-r--r-- | src/arch/i386/include/undinet.h | 15 |
2 files changed, 74 insertions, 0 deletions
diff --git a/src/arch/i386/include/undi.h b/src/arch/i386/include/undi.h new file mode 100644 index 000000000..7d6623452 --- /dev/null +++ b/src/arch/i386/include/undi.h @@ -0,0 +1,59 @@ +#ifndef _UNDI_H +#define _UNDI_H + +/** @file + * + * UNDI driver + * + */ + +/** An UNDI device */ +struct undi_device { + /** Generic device */ + struct device dev; + /** Driver-private data + * + * Use undi_set_drvdata() and undi_get_drvdata() to access this + * field. + */ + void *priv; + + /** PXENV+ structure address */ + SEGOFF16_t pxenv; + /** !PXE structure address */ + SEGOFF16_t ppxe; + /** Entry point */ + SEGOFF16_t entry; + /** PCI bus:dev.fn, or 0 */ + unsigned int pci_busdevfn; + /** ISAPnP card select number, or -1U */ + unsigned int isapnp_csn; + /** ISAPnP read port, or -1U */ + unsigned int isapnp_read_port; + /** Free base memory prior to load */ + unsigned int restore_fbms; + /** Free base memory after load */ + unsigned int fbms; +}; + +/** + * Set UNDI driver-private data + * + * @v undi UNDI device + * @v priv Private data + */ +static inline void undi_set_drvdata ( struct undi_device *undi, void *priv ) { + undi->priv = priv; +} + +/** + * Get UNDI driver-private data + * + * @v undi UNDI device + * @ret priv Private data + */ +static inline void * undi_get_drvdata ( struct undi_device *undi ) { + return undi->priv; +} + +#endif /* _UNDI_H */ diff --git a/src/arch/i386/include/undinet.h b/src/arch/i386/include/undinet.h new file mode 100644 index 000000000..1a4a385e9 --- /dev/null +++ b/src/arch/i386/include/undinet.h @@ -0,0 +1,15 @@ +#ifndef _UNDINET_H +#define _UNDINET_H + +/** @file + * + * UNDI network device driver + * + */ + +struct undi_device; + +extern int undinet_probe ( struct undi_device *undi ); +extern void undinet_remove ( struct undi_device *undi ); + +#endif /* _UNDINET_H */ |
