23#define INT13_RESET 0x00
25#define INT13_GET_LAST_STATUS 0x01
27#define INT13_READ_SECTORS 0x02
29#define INT13_WRITE_SECTORS 0x03
31#define INT13_GET_PARAMETERS 0x08
33#define INT13_GET_DISK_TYPE 0x15
35#define INT13_EXTENSION_CHECK 0x41
37#define INT13_EXTENDED_READ 0x42
39#define INT13_EXTENDED_WRITE 0x43
41#define INT13_EXTENDED_VERIFY 0x44
43#define INT13_EXTENDED_SEEK 0x47
45#define INT13_GET_EXTENDED_PARAMETERS 0x48
47#define INT13_CDROM_STATUS_TERMINATE 0x4b
49#define INT13_CDROM_READ_BOOT_CATALOG 0x4d
59#define INT13_STATUS_SUCCESS 0x00
61#define INT13_STATUS_INVALID 0x01
63#define INT13_STATUS_READ_ERROR 0x04
65#define INT13_STATUS_RESET_FAILED 0x05
67#define INT13_STATUS_WRITE_ERROR 0xcc
72#define INT13_BLKSIZE 512
79#define INT13_FDD_TYPE_360K 0x01
81#define INT13_FDD_TYPE_1M2 0x02
83#define INT13_FDD_TYPE_720K 0x03
85#define INT13_FDD_TYPE_1M44 0x04
137#define INT13_DISK_TYPE_NONE 0x00
139#define INT13_DISK_TYPE_FDD 0x01
141#define INT13_DISK_TYPE_FDD_CL 0x02
143#define INT13_DISK_TYPE_HDD 0x03
153#define INT13_FL_DMA_TRANSPARENT 0x01
155#define INT13_FL_CHS_VALID 0x02
157#define INT13_FL_REMOVABLE 0x04
159#define INT13_FL_VERIFIABLE 0x08
161#define INT13_FL_CHANGE_LINE 0x10
163#define INT13_FL_LOCKABLE 0x20
165#define INT13_FL_CHS_MAX 0x40
175#define INT13_EXTENSION_LINEAR 0x01
177#define INT13_EXTENSION_REMOVABLE 0x02
179#define INT13_EXTENSION_EDD 0x04
181#define INT13_EXTENSION_64BIT 0x08
191#define INT13_EXTENSION_VER_1_X 0x01
193#define INT13_EXTENSION_VER_2_0 0x20
195#define INT13_EXTENSION_VER_2_1 0x21
197#define INT13_EXTENSION_VER_3_0 0x30
205#define INT13_MAX_CHS_SECTORS 15482880
257#define PART_HEAD(chs) ( (chs).head )
258#define PART_SECTOR(chs) ( (chs).cyl_sector & 0x3f )
259#define PART_CYLINDER(chs) ( (chs).cyl | ( ( (chs).cyl_sector & 0xc0 ) << 2 ) )
292#define INT13_MBR_MAGIC 0xaa55
303#define INT13_FDD_GEOMETRY( cylinders, heads, sectors ) \
305 .tracks = (cylinders), \
306 .heads_spt = ( ( (heads) << 6 ) | (sectors) ), \
310#define INT13_FDD_CYLINDERS( geometry ) ( (geometry)->tracks )
313#define INT13_FDD_HEADS( geometry ) ( (geometry)->heads_spt >> 6 )
316#define INT13_FDD_SECTORS( geometry ) ( (geometry)->heads_spt & 0x3f )
unsigned long long uint64_t
Enhanced Disk Drive specification.
uint8_t cyl
Low 8 bits of cylinder number.
uint8_t bufsize
Size of the packet, in bytes.
uint8_t drive
Drive number.
uint64_t lba
Starting block number.
uint32_t signature
Disk signature.
uint64_t sectors
Total number of sectors on drive.
uint8_t format_gap_length
uint16_t start
First sector in boot catalog to transfer.
uint8_t cyl
Low 8 bits of cylinder number.
uint8_t controller
CD-ROM controller number.
uint32_t start
Linear start address.
uint32_t lba
LBA of disk image to emulate.
uint8_t bootable
Bootable flag.
uint16_t bufsize
Size of this structure.
uint16_t sector_size
Bytes per sector.
uint32_t sectors_per_track
Number of sectors per track.
uint8_t size
Size of packet in bytes.
uint8_t cyl_sector
Sector number, plus high 2 bits of cylinder number.
uint8_t heads_spt
Number of heads and sectors per track.
struct partition_chs chs_end
C/H/S end address.
uint32_t reserved_c
Reserved.
uint32_t length
Linear length.
uint64_t buffer_phys
Data buffer (EDD 3.0+ only)
uint8_t size
Size of packet in bytes.
uint8_t count
Number of sectors of boot catalog to read.
uint8_t type
System indicator (partition type)
struct partition_chs chs_start
C/H/S start address.
uint32_t buffer
Buffer for boot catalog.
uint8_t step_rate__head_unload
struct int13_fdd_geometry __attribute__
uint32_t long_count
Block count (EDD 4.0+ only)
uint8_t tracks
Number of tracks.
uint8_t code[440]
Code area.
uint8_t sectors_per_track
struct edd_device_path_information dpi
Device path information.
uint8_t cyl_sector
Sector number, plus high 2 bits of cylinder number.
uint16_t cache_segment
Segment of 3K buffer for caching CD-ROM reads.
uint8_t reserved_b
Reserved.
struct segoff buffer
Data buffer.
uint8_t reserved_a
Reserved.
uint8_t media_type
Boot media type.
uint16_t load_segment
Load segment for initial boot image.
struct segoff dpte
Device parameter table extension.
uint32_t heads
Number of heads.
uint32_t cylinders
Number of cylinders.
uint16_t magic
0x55aa MBR signature
struct partition_table_entry partitions[4]
Partition table.
uint8_t count
Block count.
uint16_t device
Device specification.
uint16_t load_sectors
Number of 512-byte sectors to load.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Bootable CD-ROM boot catalog command packet.
Bootable CD-ROM specification packet.
An INT 13 disk address packet.
A floppy drive parameter table.
A C/H/S address within a partition table entry.
A partition table entry within the MBR.