aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2012-11-26 11:18:11 -0500
committerKevin O'Connor <kevin@koconnor.net>2012-11-26 11:18:11 -0500
commit8b73b838de25aaf04ff0d397855b1eecd0443e98 (patch)
tree03bb0953a32f174626932f6a5b7b4039edd87006 /src
parentef71989a37a54a04dc2b83651c8dc78df2004fdc (diff)
downloadseabios-hppa-8b73b838de25aaf04ff0d397855b1eecd0443e98.zip
seabios-hppa-8b73b838de25aaf04ff0d397855b1eecd0443e98.tar.gz
seabios-hppa-8b73b838de25aaf04ff0d397855b1eecd0443e98.tar.bz2
floppy: Allow floppy code to be used with coreboot.
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>
Diffstat (limited to 'src')
-rw-r--r--src/floppy.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/floppy.c b/src/floppy.c
index 3c8ae5a..f508559 100644
--- a/src/floppy.c
+++ b/src/floppy.c
@@ -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)