summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/include/bios_disks.h
diff options
context:
space:
mode:
authorMichael Brown2005-04-25 21:29:55 +0200
committerMichael Brown2005-04-25 21:29:55 +0200
commitfcee25024fa8d0851c8b863c8df7ba1c70f31c32 (patch)
treeaa97da96d01373c87c757aeda3422e5c49235075 /src/arch/i386/include/bios_disks.h
parentAdded arch/i386/drivers/disk (diff)
downloadipxe-fcee25024fa8d0851c8b863c8df7ba1c70f31c32.tar.gz
ipxe-fcee25024fa8d0851c8b863c8df7ba1c70f31c32.tar.xz
ipxe-fcee25024fa8d0851c8b863c8df7ba1c70f31c32.zip
BIOS floppy handling code moved to where it will really live.
Diffstat (limited to 'src/arch/i386/include/bios_disks.h')
-rw-r--r--src/arch/i386/include/bios_disks.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/arch/i386/include/bios_disks.h b/src/arch/i386/include/bios_disks.h
new file mode 100644
index 00000000..1a2c31aa
--- /dev/null
+++ b/src/arch/i386/include/bios_disks.h
@@ -0,0 +1,68 @@
+#ifndef BIOS_DISKS_H
+#define BIOS_DISKS_H
+
+#include "dev.h"
+
+/*
+ * Constants
+ *
+ */
+
+#define BIOS_DISK_MAX_NAME_LEN 6
+
+struct bios_disk_sector {
+ char data[512];
+};
+
+/*
+ * The location of a BIOS disk
+ *
+ */
+struct bios_disk_loc {
+ uint8_t drive;
+};
+
+/*
+ * A physical BIOS disk device
+ *
+ */
+struct bios_disk_device {
+ char name[BIOS_DISK_MAX_NAME_LEN];
+ uint8_t drive;
+ uint8_t type;
+};
+
+/*
+ * A BIOS disk driver, with a valid device ID range and naming
+ * function.
+ *
+ */
+struct bios_disk_driver {
+ void ( *fill_drive_name ) ( char *buf, uint8_t drive );
+ uint8_t min_drive;
+ uint8_t max_drive;
+};
+
+/*
+ * Define a BIOS disk driver
+ *
+ */
+#define BIOS_DISK_DRIVER( _fill_drive_name, _min_drive, _max_drive ) { \
+ .fill_drive_name = _fill_drive_name, \
+ .min_drive = _min_drive, \
+ .max_drive = _max_drive, \
+}
+
+/*
+ * Functions in bios_disks.c
+ *
+ */
+
+
+/*
+ * bios_disk bus global definition
+ *
+ */
+extern struct bus_driver bios_disk_driver;
+
+#endif /* BIOS_DISKS_H */