]> xenbits.xensource.com Git - seabios.git/commitdiff
floppy: Allow floppy code to be used with coreboot.
authorKevin O'Connor <kevin@koconnor.net>
Mon, 26 Nov 2012 16:18:11 +0000 (11:18 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Mon, 26 Nov 2012 16:18:11 +0000 (11:18 -0500)
Allow coreboot users to enable the floppy support (via CBFS files
etc/floppy0 and etc/floppy1) on real hardware.  It is unknown if the
Bochs derived floppy controller support will work on real hardware,
but this option will make it easier for those wishing to test.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/floppy.c

index 3c8ae5a944d29a7e1c1622553f63c7d64e69579a..f508559a54184eb00a43baced59c62515ca446f2 100644 (file)
@@ -126,7 +126,12 @@ floppy_setup(void)
     dprintf(3, "init floppy drives\n");
 
     if (CONFIG_COREBOOT) {
-        // XXX - disable floppies on coreboot for now.
+        u8 type = romfile_loadint("etc/floppy0", 0);
+        if (type)
+            addFloppy(0, type);
+        type = romfile_loadint("etc/floppy1", 0);
+        if (type)
+            addFloppy(1, type);
     } else {
         u8 type = inb_cmos(CMOS_FLOPPY_DRIVE_TYPE);
         if (type & 0xf0)