Implement cdrom disk emulation at high-level instead of in low-level ATA.
[seabios.git] / src / biosvar.h
index 0d175efd9f01989d66d23f55735f93d4d6db230e..90cb7032ed7c650f1e144f58aa652ce60f179363 100644 (file)
@@ -9,20 +9,26 @@
 #include "types.h" // u8
 #include "farptr.h" // GET_FARVAR
 #include "config.h" // CONFIG_*
+#include "disk.h" // struct chs_s
 
-
-/****************************************************************
- * Interupt vector table
- ****************************************************************/
-
-struct rmode_IVT {
+struct segoff_s {
     union {
         struct {
             u16 offset;
             u16 seg;
         };
         u32 segoff;
-    } ivec[256];
+    };
+};
+#define SEGOFF(s,o) ({struct segoff_s __so; __so.offset=(o); __so.seg=(s); __so;})
+
+
+/****************************************************************
+ * Interupt vector table
+ ****************************************************************/
+
+struct rmode_IVT {
+    struct segoff_s ivec[256];
 };
 
 #define GET_IVT(vector)                                         \
@@ -178,9 +184,7 @@ struct cdemu_s {
     u16 sector_count;
 
     // Virtual device
-    u16 heads;
-    u16 cylinders;
-    u16 spt;
+    struct chs_s lchs;
 };
 
 struct fdpt_s {
@@ -233,6 +237,8 @@ struct extended_bios_data_area_s {
 
     // Stack space available for code that needs it.
     u8 extra_stack[512] __aligned(8);
+
+    u8 cdemu_buf[2048 * !!CONFIG_CDROM_EMU];
 } PACKED;
 
 // The initial size and location of EBDA