iPXE
Data Structures | Macros | Functions | Variables
int13.h File Reference

INT 13 emulation. More...

#include <stdint.h>
#include <ipxe/list.h>
#include <ipxe/edd.h>
#include <realmode.h>

Go to the source code of this file.

Data Structures

struct  int13_disk_address
 An INT 13 disk address packet. More...
 
struct  int13_disk_parameters
 INT 13 disk parameters. More...
 
struct  int13_cdrom_specification
 Bootable CD-ROM specification packet. More...
 
struct  int13_cdrom_boot_catalog_command
 Bootable CD-ROM boot catalog command packet. More...
 
struct  partition_chs
 A C/H/S address within a partition table entry. More...
 
struct  partition_table_entry
 A partition table entry within the MBR. More...
 
struct  master_boot_record
 A Master Boot Record. More...
 
struct  int13_fdd_geometry
 A floppy disk geometry. More...
 
struct  int13_fdd_parameters
 A floppy drive parameter table. More...
 

Macros

#define INT13_RESET   0x00
 Reset disk system. More...
 
#define INT13_GET_LAST_STATUS   0x01
 Get status of last operation. More...
 
#define INT13_READ_SECTORS   0x02
 Read sectors. More...
 
#define INT13_WRITE_SECTORS   0x03
 Write sectors. More...
 
#define INT13_GET_PARAMETERS   0x08
 Get drive parameters. More...
 
#define INT13_GET_DISK_TYPE   0x15
 Get disk type. More...
 
#define INT13_EXTENSION_CHECK   0x41
 Extensions installation check. More...
 
#define INT13_EXTENDED_READ   0x42
 Extended read. More...
 
#define INT13_EXTENDED_WRITE   0x43
 Extended write. More...
 
#define INT13_EXTENDED_VERIFY   0x44
 Verify sectors. More...
 
#define INT13_EXTENDED_SEEK   0x47
 Extended seek. More...
 
#define INT13_GET_EXTENDED_PARAMETERS   0x48
 Get extended drive parameters. More...
 
#define INT13_CDROM_STATUS_TERMINATE   0x4b
 Get CD-ROM status / terminate emulation. More...
 
#define INT13_CDROM_READ_BOOT_CATALOG   0x4d
 Read CD-ROM boot catalog. More...
 
#define INT13_STATUS_SUCCESS   0x00
 Operation completed successfully. More...
 
#define INT13_STATUS_INVALID   0x01
 Invalid function or parameter. More...
 
#define INT13_STATUS_READ_ERROR   0x04
 Read error. More...
 
#define INT13_STATUS_RESET_FAILED   0x05
 Reset failed. More...
 
#define INT13_STATUS_WRITE_ERROR   0xcc
 Write error. More...
 
#define INT13_BLKSIZE   512
 Block size for non-extended INT 13 calls. More...
 
#define INT13_FDD_TYPE_360K   0x01
 360K More...
 
#define INT13_FDD_TYPE_1M2   0x02
 1.2M More...
 
#define INT13_FDD_TYPE_720K   0x03
 720K More...
 
#define INT13_FDD_TYPE_1M44   0x04
 1.44M More...
 
#define INT13_DISK_TYPE_NONE   0x00
 No such drive. More...
 
#define INT13_DISK_TYPE_FDD   0x01
 Floppy without change-line support. More...
 
#define INT13_DISK_TYPE_FDD_CL   0x02
 Floppy with change-line support. More...
 
#define INT13_DISK_TYPE_HDD   0x03
 Hard disk. More...
 
#define INT13_FL_DMA_TRANSPARENT   0x01
 DMA boundary errors handled transparently. More...
 
#define INT13_FL_CHS_VALID   0x02
 CHS information is valid. More...
 
#define INT13_FL_REMOVABLE   0x04
 Removable drive. More...
 
#define INT13_FL_VERIFIABLE   0x08
 Write with verify supported. More...
 
#define INT13_FL_CHANGE_LINE   0x10
 Has change-line supported (valid only for removable drives) More...
 
#define INT13_FL_LOCKABLE   0x20
 Drive can be locked (valid only for removable drives) More...
 
#define INT13_FL_CHS_MAX   0x40
 CHS is max possible, not current media (valid only for removable drives) More...
 
#define INT13_EXTENSION_LINEAR   0x01
 Extended disk access functions supported. More...
 
#define INT13_EXTENSION_REMOVABLE   0x02
 Removable drive functions supported. More...
 
#define INT13_EXTENSION_EDD   0x04
 EDD functions supported. More...
 
#define INT13_EXTENSION_64BIT   0x08
 64-bit extensions are present More...
 
#define INT13_EXTENSION_VER_1_X   0x01
 INT13 extensions version 1.x. More...
 
#define INT13_EXTENSION_VER_2_0   0x20
 INT13 extensions version 2.0 (EDD-1.0) More...
 
#define INT13_EXTENSION_VER_2_1   0x21
 INT13 extensions version 2.1 (EDD-1.1) More...
 
#define INT13_EXTENSION_VER_3_0   0x30
 INT13 extensions version 3.0 (EDD-3.0) More...
 
#define INT13_MAX_CHS_SECTORS   15482880
 Maximum number of sectors for which CHS geometry is allowed to be valid. More...
 
#define PART_HEAD(chs)   ( (chs).head )
 
#define PART_SECTOR(chs)   ( (chs).cyl_sector & 0x3f )
 
#define PART_CYLINDER(chs)   ( (chs).cyl | ( ( (chs).cyl_sector & 0xc0 ) << 2 ) )
 
#define INT13_MBR_MAGIC   0xaa55
 MBR magic signature. More...
 
#define INT13_FDD_GEOMETRY(cylinders, heads, sectors)
 Define a floppy disk geometry. More...
 
#define INT13_FDD_CYLINDERS(geometry)   ( (geometry)->tracks )
 Get floppy disk number of cylinders. More...
 
#define INT13_FDD_HEADS(geometry)   ( (geometry)->heads_spt >> 6 )
 Get floppy disk number of heads. More...
 
#define INT13_FDD_SECTORS(geometry)   ( (geometry)->heads_spt & 0x3f )
 Get floppy disk number of sectors per track. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
struct int13_disk_address __attribute__ ((packed))
 

Variables

uint8_t bufsize
 Size of the packet, in bytes. More...
 
uint8_t reserved_a
 Reserved. More...
 
uint8_t count
 Block count. More...
 
uint8_t reserved_b
 Reserved. More...
 
struct segoff buffer
 Data buffer. More...
 
uint64_t lba
 Starting block number. More...
 
uint64_t buffer_phys
 Data buffer (EDD 3.0+ only) More...
 
uint32_t long_count
 Block count (EDD 4.0+ only) More...
 
uint32_t reserved_c
 Reserved. More...
 
uint16_t flags
 Flags. More...
 
uint32_t cylinders
 Number of cylinders. More...
 
uint32_t heads
 Number of heads. More...
 
uint32_t sectors_per_track
 Number of sectors per track. More...
 
uint64_t sectors
 Total number of sectors on drive. More...
 
uint16_t sector_size
 Bytes per sector. More...
 
struct segoff dpte
 Device parameter table extension. More...
 
struct edd_device_path_information dpi
 Device path information. More...
 
uint8_t size
 Size of packet in bytes. More...
 
uint8_t media_type
 Boot media type. More...
 
uint8_t drive
 Drive number. More...
 
uint8_t controller
 CD-ROM controller number. More...
 
uint16_t device
 Device specification. More...
 
uint16_t cache_segment
 Segment of 3K buffer for caching CD-ROM reads. More...
 
uint16_t load_segment
 Load segment for initial boot image. More...
 
uint16_t load_sectors
 Number of 512-byte sectors to load. More...
 
uint8_t cyl
 Low 8 bits of cylinder number. More...
 
uint8_t cyl_sector
 Sector number, plus high 2 bits of cylinder number. More...
 
uint8_t head
 Head number. More...
 
uint16_t start
 First sector in boot catalog to transfer. More...
 
uint8_t bootable
 Bootable flag. More...
 
struct partition_chs chs_start
 C/H/S start address. More...
 
uint8_t type
 System indicator (partition type) More...
 
struct partition_chs chs_end
 C/H/S end address. More...
 
uint32_t length
 Linear length. More...
 
uint8_t code [440]
 Code area. More...
 
uint32_t signature
 Disk signature. More...
 
uint8_t pad [2]
 Padding. More...
 
struct partition_table_entry partitions [4]
 Partition table. More...
 
uint16_t magic
 0x55aa MBR signature More...
 
struct int13_fdd_geometry __attribute__
 
uint8_t step_rate__head_unload
 
uint8_t head_load__ndma
 
uint8_t motor_off_delay
 
uint8_t bytes_per_sector
 
uint8_t gap_length
 
uint8_t data_length
 
uint8_t format_gap_length
 
uint8_t format_filler
 
uint8_t head_settle_time
 
uint8_t motor_start_time
 

Detailed Description

INT 13 emulation.

Definition in file int13.h.

Macro Definition Documentation

◆ INT13_BLKSIZE

#define INT13_BLKSIZE   512

Block size for non-extended INT 13 calls.

Definition at line 72 of file int13.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )