aboutsummaryrefslogtreecommitdiff
path: root/src/biosvar.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2009-08-09 17:25:19 -0400
committerKevin O'Connor <kevin@koconnor.net>2009-08-09 17:25:19 -0400
commitb68ac71b00360dde1e8f8176985935dc43868858 (patch)
tree454d3c3c9c0c2da715f2bb886abaacfcb647f405 /src/biosvar.h
parentdbbb7cf9a334beadd1d4e5a8dddcf2b1b81ad839 (diff)
downloadseabios-hppa-b68ac71b00360dde1e8f8176985935dc43868858.zip
seabios-hppa-b68ac71b00360dde1e8f8176985935dc43868858.tar.gz
seabios-hppa-b68ac71b00360dde1e8f8176985935dc43868858.tar.bz2
Implement cdrom disk emulation at high-level instead of in low-level ATA.
Add a 2K buffer to the ebda to allow for cdrom 512 byte vs 2048 byte sector emulation. For unaliagned cdemu reads, just make multiple cdrom reads instead of using ata specific code for short reads. Also, define cdemu virtual sectors using struct chs_s, and update legacy_lba() func to take pointer to a chs_s struct.
Diffstat (limited to 'src/biosvar.h')
-rw-r--r--src/biosvar.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/biosvar.h b/src/biosvar.h
index 0d175ef..90cb703 100644
--- a/src/biosvar.h
+++ b/src/biosvar.h
@@ -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