10 FILE_LICENCE ( GPL2_OR_LATER
);
14 #include <gpxe/device.h>
15 #include <pxe_types.h>
19 * This structure is used by assembly code as well as C; do not alter
20 * this structure without editing pxeprefix.S to match.
23 /** PXENV+ structure address */
25 /** !PXE structure address */
29 /** Free base memory after load */
31 /** Free base memory prior to load */
32 UINT16_t restore_fbms
;
33 /** PCI bus:dev.fn, or @c UNDI_NO_PCI_BUSDEVFN */
34 UINT16_t pci_busdevfn
;
35 /** ISAPnP card select number, or @c UNDI_NO_ISAPNP_CSN */
37 /** ISAPnP read port, or @c UNDI_NO_ISAPNP_READ_PORT */
38 UINT16_t isapnp_read_port
;
41 * Filled in only for the preloaded UNDI device by pxeprefix.S
46 * Filled in only for the preloaded UNDI device by pxeprefix.S
51 * This is the bitwise OR of zero or more UNDI_FL_XXX
58 /** Driver-private data
60 * Use undi_set_drvdata() and undi_get_drvdata() to access this
64 } __attribute__ (( packed
));
67 * Set UNDI driver-private data
70 * @v priv Private data
72 static inline void undi_set_drvdata ( struct undi_device
*undi
, void *priv
) {
77 * Get UNDI driver-private data
80 * @ret priv Private data
82 static inline void * undi_get_drvdata ( struct undi_device
*undi
) {
88 /** PCI bus:dev.fn field is invalid */
89 #define UNDI_NO_PCI_BUSDEVFN 0xffff
91 /** ISAPnP card select number field is invalid */
92 #define UNDI_NO_ISAPNP_CSN 0xffff
94 /** ISAPnP read port field is invalid */
95 #define UNDI_NO_ISAPNP_READ_PORT 0xffff
97 /** UNDI flag: START_UNDI has been called */
98 #define UNDI_FL_STARTED 0x0001
100 /** UNDI flag: UNDI_STARTUP and UNDI_INITIALIZE have been called */
101 #define UNDI_FL_INITIALIZED 0x0002
103 /** UNDI flag: keep stack resident */
104 #define UNDI_FL_KEEP_ALL 0x0004