aboutsummaryrefslogtreecommitdiff
path: root/src/block.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2013-09-14 23:57:26 -0400
committerKevin O'Connor <kevin@koconnor.net>2013-09-18 20:48:34 -0400
commit135f3f676de1416f0cd0fa7f0c886cf1b72222cb (patch)
tree805d962c2b66daffcb30b0816cce8faf67e8a809 /src/block.c
parentb18557ab09a60476b4269c3a473d8aebeaaa002f (diff)
downloadseabios-hppa-135f3f676de1416f0cd0fa7f0c886cf1b72222cb.zip
seabios-hppa-135f3f676de1416f0cd0fa7f0c886cf1b72222cb.tar.gz
seabios-hppa-135f3f676de1416f0cd0fa7f0c886cf1b72222cb.tar.bz2
Split disk.h into block.h and std/disk.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/block.c')
-rw-r--r--src/block.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/block.c b/src/block.c
index 73d6068..4560b24 100644
--- a/src/block.c
+++ b/src/block.c
@@ -6,7 +6,8 @@
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "biosvar.h" // GET_GLOBAL
-#include "disk.h" // struct ata_s
+#include "block.h" // process_op
+#include "bregs.h" // struct bregs
#include "hw/ata.h" // process_ata_op
#include "hw/ahci.h" // process_ahci_op
#include "hw/cmos.h" // inb_cmos
@@ -15,7 +16,9 @@
#include "malloc.h" // malloc_low
#include "output.h" // dprintf
#include "stacks.h" // stack_hop
+#include "std/disk.h" // struct dpte_s
#include "string.h" // checksum
+#include "util.h" // process_floppy_op
u8 FloppyCount VARFSEG;
u8 CDCount;
@@ -277,6 +280,36 @@ map_floppy_drive(struct drive_s *drive_g)
/****************************************************************
+ * Return status functions
+ ****************************************************************/
+
+void
+__disk_ret(struct bregs *regs, u32 linecode, const char *fname)
+{
+ u8 code = linecode;
+ if (regs->dl < EXTSTART_HD)
+ SET_BDA(floppy_last_status, code);
+ else
+ SET_BDA(disk_last_status, code);
+ if (code)
+ __set_code_invalid(regs, linecode, fname);
+ else
+ set_code_success(regs);
+}
+
+void
+__disk_ret_unimplemented(struct bregs *regs, u32 linecode, const char *fname)
+{
+ u8 code = linecode;
+ if (regs->dl < EXTSTART_HD)
+ SET_BDA(floppy_last_status, code);
+ else
+ SET_BDA(disk_last_status, code);
+ __set_code_unimplemented(regs, linecode, fname);
+}
+
+
+/****************************************************************
* 16bit calling interface
****************************************************************/