summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/device.h
diff options
context:
space:
mode:
authorMichael Brown2007-01-10 16:27:48 +0100
committerMichael Brown2007-01-10 16:27:48 +0100
commitfdc97499bf83ef958db8a50985fdd321835dccf3 (patch)
tree344a37ef66fa70650a85cd7429ad139bc7b284e0 /src/include/gpxe/device.h
parentGive UNDI device a more meaningful name. (diff)
downloadipxe-fdc97499bf83ef958db8a50985fdd321835dccf3.tar.gz
ipxe-fdc97499bf83ef958db8a50985fdd321835dccf3.tar.xz
ipxe-fdc97499bf83ef958db8a50985fdd321835dccf3.zip
Add device description fields to struct device.
Diffstat (limited to 'src/include/gpxe/device.h')
-rw-r--r--src/include/gpxe/device.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/include/gpxe/device.h b/src/include/gpxe/device.h
index 9f670cfd..139fb78b 100644
--- a/src/include/gpxe/device.h
+++ b/src/include/gpxe/device.h
@@ -11,10 +11,58 @@
#include <gpxe/list.h>
#include <gpxe/tables.h>
+/** A PCI device description */
+struct pci_device_description {
+ /** Bus type
+ *
+ * Must be @c BUS_TYPE_PCI.
+ */
+ unsigned int bus_type;
+ /** Bus:dev.fn address
+ *
+ * As constructed by PCI_BUSDEVFN().
+ */
+ unsigned int busdevfn;
+ /** Vendor ID */
+ unsigned int vendor;
+ /** Device ID */
+ unsigned int device;
+};
+
+/** PCI bus type */
+#define BUS_TYPE_PCI 1
+
+/** An ISAPnP device description */
+struct isapnp_device_description {
+ /** Bus type
+ *
+ * Must be @c BUS_TYPE_ISAPNP.
+ */
+ unsigned int bus_type;
+};
+
+/** PCI bus type */
+#define BUS_TYPE_ISAPNP 2
+
+/** A hardware device description */
+union device_description {
+ /** Bus type
+ *
+ * This must be a BUS_TYPE_XXX constant.
+ */
+ unsigned int bus_type;
+ /** PCI device description */
+ struct pci_device_description pci;
+ /** ISAPnP device description */
+ struct isapnp_device_description isapnp;
+};
+
/** A hardware device */
struct device {
/** Name */
char name[16];
+ /** Device description */
+ union device_description desc;
/** Devices on the same bus */
struct list_head siblings;
/** Devices attached to this device */