1 // Standard disk BIOS definitions.
5 #include "types.h" // u8
7 #define DISK_RET_SUCCESS 0x00
8 #define DISK_RET_EPARAM 0x01
9 #define DISK_RET_EADDRNOTFOUND 0x02
10 #define DISK_RET_EWRITEPROTECT 0x03
11 #define DISK_RET_ECHANGED 0x06
12 #define DISK_RET_EBOUNDARY 0x09
13 #define DISK_RET_EBADTRACK 0x0c
14 #define DISK_RET_ECONTROLLER 0x20
15 #define DISK_RET_ETIMEOUT 0x80
16 #define DISK_RET_ENOTLOCKED 0xb0
17 #define DISK_RET_ELOCKED 0xb1
18 #define DISK_RET_ENOTREMOVABLE 0xb2
19 #define DISK_RET_ETOOMANYLOCKS 0xb4
20 #define DISK_RET_EMEDIA 0xC0
21 #define DISK_RET_ENOTREADY 0xAA
24 /****************************************************************
26 ****************************************************************/
28 // Bios disk structures.
53 // Disk Physical Table definition
92 u8 drive_control_byte;
100 // Floppy "Disk Base Table"
101 struct floppy_dbt_s {
115 struct floppy_ext_dbt_s {
116 struct floppy_dbt_s dbt;
124 /****************************************************************
126 ****************************************************************/
128 struct packed_chs_s {
136 struct packed_chs_s first;
138 struct packed_chs_s last;
150 struct partition_s partitions[4];
155 #define MBR_SIGNATURE 0xaa55
158 /****************************************************************
159 * ElTorito CDROM interface
160 ****************************************************************/
172 struct packed_chs_s chs;