iPXE
|
INT 13 emulation. More...
#include <stdint.h>
#include <stdlib.h>
#include <limits.h>
#include <byteswap.h>
#include <errno.h>
#include <assert.h>
#include <ipxe/blockdev.h>
#include <ipxe/io.h>
#include <ipxe/acpi.h>
#include <ipxe/sanboot.h>
#include <ipxe/device.h>
#include <ipxe/pci.h>
#include <ipxe/eltorito.h>
#include <realmode.h>
#include <bios.h>
#include <biosint.h>
#include <bootsector.h>
#include <int13.h>
Go to the source code of this file.
Data Structures | |
struct | int13_data |
INT 13 SAN device private data. More... | |
Macros | |
#define | int13_vector __use_text16 ( int13_vector ) |
#define | int13_fdd_params __use_data16 ( int13_fdd_params ) |
#define | num_fdds __use_text16 ( num_fdds ) |
#define | num_drives __use_text16 ( num_drives ) |
#define | eltorito_cmd __use_data16 ( eltorito_cmd ) |
#define | eltorito_address __use_data16 ( eltorito_address ) |
#define | XBFTAB_SIZE 768 |
Maximum size of boot firmware table(s) More... | |
#define | XBFTAB_ALIGN 16 |
Alignment of boot firmware table entries. More... | |
#define | xbftab __use_data16 ( xbftab ) |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static struct segoff | __text16 (int13_vector) |
Vector for chaining to other INT 13 handlers. More... | |
void | int13_wrapper (void) |
Assembly wrapper. More... | |
static struct int13_fdd_parameters | __data16 (int13_fdd_params) |
Dummy floppy disk parameter table. More... | |
static uint8_t | __text16 (num_fdds) |
Number of BIOS floppy disk drives. More... | |
static uint8_t | __text16 (num_drives) |
Number of BIOS hard disk drives. More... | |
static uint32_t | int13_capacity32 (struct san_device *sandev) |
Calculate SAN device capacity (limited to 32 bits) More... | |
static int | int13_is_fdd (struct san_device *sandev) |
Test if SAN device is a floppy disk drive. More... | |
static int | int13_parse_eltorito (struct san_device *sandev, void *scratch) |
Parse El Torito parameters. More... | |
static int | int13_guess_geometry_hdd (struct san_device *sandev, void *scratch, unsigned int *heads, unsigned int *sectors) |
Guess INT 13 hard disk drive geometry. More... | |
static int | int13_guess_geometry_fdd (struct san_device *sandev, unsigned int *heads, unsigned int *sectors) |
Guess INT 13 floppy disk drive geometry. More... | |
static int | int13_guess_geometry (struct san_device *sandev, void *scratch) |
Guess INT 13 drive geometry. More... | |
static void | int13_sync_num_drives (void) |
Update BIOS drive count. More... | |
static void | int13_check_num_drives (void) |
Check number of drives. More... | |
static int | int13_reset (struct san_device *sandev, struct i386_all_regs *ix86 __unused) |
INT 13, 00 - Reset disk system. More... | |
static int | int13_get_last_status (struct san_device *sandev, struct i386_all_regs *ix86 __unused) |
INT 13, 01 - Get status of last operation. More... | |
static int | int13_rw_sectors (struct san_device *sandev, struct i386_all_regs *ix86, int(*sandev_rw)(struct san_device *sandev, uint64_t lba, unsigned int count, userptr_t buffer)) |
Read / write sectors. More... | |
static int | int13_read_sectors (struct san_device *sandev, struct i386_all_regs *ix86) |
INT 13, 02 - Read sectors. More... | |
static int | int13_write_sectors (struct san_device *sandev, struct i386_all_regs *ix86) |
INT 13, 03 - Write sectors. More... | |
static int | int13_get_parameters (struct san_device *sandev, struct i386_all_regs *ix86) |
INT 13, 08 - Get drive parameters. More... | |
static int | int13_get_disk_type (struct san_device *sandev, struct i386_all_regs *ix86) |
INT 13, 15 - Get disk type. More... | |
static int | int13_extension_check (struct san_device *sandev, struct i386_all_regs *ix86) |
INT 13, 41 - Extensions installation check. More... | |
static int | int13_extended_rw (struct san_device *sandev, struct i386_all_regs *ix86, int(*sandev_rw)(struct san_device *sandev, uint64_t lba, unsigned int count, userptr_t buffer)) |
Extended read / write. More... | |
static int | int13_extended_read (struct san_device *sandev, struct i386_all_regs *ix86) |
INT 13, 42 - Extended read. More... | |
static int | int13_extended_write (struct san_device *sandev, struct i386_all_regs *ix86) |
INT 13, 43 - Extended write. More... | |
static int | int13_extended_verify (struct san_device *sandev, struct i386_all_regs *ix86) |
INT 13, 44 - Verify sectors. More... | |
static int | int13_extended_seek (struct san_device *sandev, struct i386_all_regs *ix86) |
INT 13, 44 - Extended seek. More... | |
static int | int13_device_path_info (struct san_device *sandev, struct edd_device_path_information *dpi) |
Build device path information. More... | |
static int | int13_get_extended_parameters (struct san_device *sandev, struct i386_all_regs *ix86) |
INT 13, 48 - Get extended parameters. More... | |
static int | int13_cdrom_status_terminate (struct san_device *sandev, struct i386_all_regs *ix86) |
INT 13, 4b - Get status or terminate CD-ROM emulation. More... | |
static int | int13_cdrom_read_boot_catalog (struct san_device *sandev, struct i386_all_regs *ix86) |
INT 13, 4d - Read CD-ROM boot catalog. More... | |
static __asmcall __used void | int13 (struct i386_all_regs *ix86) |
INT 13 handler. More... | |
static void | int13_hook_vector (void) |
Hook INT 13 handler. More... | |
static void | int13_unhook_vector (void) |
Unhook INT 13 handler. More... | |
static int | int13_hook (unsigned int drive, struct uri **uris, unsigned int count, unsigned int flags) |
Hook INT 13 SAN device. More... | |
static void | int13_unhook (unsigned int drive) |
Unhook INT 13 SAN device. More... | |
static int | int13_load_mbr (unsigned int drive, struct segoff *address) |
Load and verify master boot record from INT 13 drive. More... | |
static struct int13_cdrom_boot_catalog_command | __data16 (eltorito_cmd) |
El Torito boot catalog command packet. More... | |
static struct int13_disk_address | __bss16 (eltorito_address) |
El Torito disk address packet. More... | |
static int | int13_load_eltorito (unsigned int drive, struct segoff *address) |
Load and verify El Torito boot record from INT 13 drive. More... | |
static int | int13_boot (unsigned int drive, struct san_boot_config *config __unused) |
Attempt to boot from an INT 13 drive. More... | |
static uint8_t | __bss16_array (xbftab, [XBFTAB_SIZE]) |
The boot firmware table(s) generated by iPXE. More... | |
static int | int13_install (struct acpi_header *acpi) |
Install ACPI table. More... | |
static int | int13_describe (void) |
Describe SAN devices for SAN-booted operating system. More... | |
PROVIDE_SANBOOT (pcbios, san_hook, int13_hook) | |
PROVIDE_SANBOOT (pcbios, san_unhook, int13_unhook) | |
PROVIDE_SANBOOT (pcbios, san_boot, int13_boot) | |
PROVIDE_SANBOOT (pcbios, san_describe, int13_describe) | |
Variables | |
static uint16_t | equipment_word |
Equipment word. More... | |
static const struct int13_fdd_geometry | int13_fdd_geometries [] |
Recognised floppy disk geometries. More... | |
static size_t | xbftab_used |
Total used length of boot firmware tables. More... | |
INT 13 emulation.
This module provides a mechanism for exporting block devices via the BIOS INT 13 disk interrupt interface.
Definition in file int13.c.
#define int13_vector __use_text16 ( int13_vector ) |
#define int13_fdd_params __use_data16 ( int13_fdd_params ) |
#define num_fdds __use_text16 ( num_fdds ) |
#define num_drives __use_text16 ( num_drives ) |
#define eltorito_cmd __use_data16 ( eltorito_cmd ) |
#define eltorito_address __use_data16 ( eltorito_address ) |
#define XBFTAB_SIZE 768 |
#define XBFTAB_ALIGN 16 |
#define xbftab __use_data16 ( xbftab ) |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Vector for chaining to other INT 13 handlers.
void int13_wrapper | ( | void | ) |
Assembly wrapper.
Referenced by int13_hook_vector(), and int13_unhook_vector().
|
static |
Dummy floppy disk parameter table.
Number of BIOS floppy disk drives.
This is derived from the equipment word. It is held in .text16 to allow for easy access by the INT 13,08 wrapper.
|
static |
Number of BIOS hard disk drives.
This is a cached copy of the BIOS Data Area number of hard disk drives at 40:75. It is held in .text16 to allow for easy access by the INT 13,08 wrapper.
|
inlinestatic |
Calculate SAN device capacity (limited to 32 bits)
sandev | SAN device |
blocks | Number of blocks |
Definition at line 148 of file int13.c.
References sandev_capacity().
Referenced by int13_get_disk_type(), and int13_guess_geometry().
|
inlinestatic |
Test if SAN device is a floppy disk drive.
sandev | SAN device |
is_fdd | SAN device is a floppy disk drive |
Definition at line 159 of file int13.c.
References san_device::drive.
Referenced by int13_extended_rw(), int13_extension_check(), int13_get_disk_type(), int13_get_parameters(), int13_guess_geometry(), and int13_sync_num_drives().
|
static |
Parse El Torito parameters.
sandev | SAN device |
scratch | Scratch area for single-sector reads |
rc | Return status code |
Reads and parses El Torito parameters, if present.
Definition at line 172 of file int13.c.
References DBGC, san_device::drive, ELTORITO_LBA, int13(), ISO9660_ID, ISO9660_TYPE_BOOT, memcmp(), san_device::priv, rc, sandev_read(), eltorito_descriptor::sector, strerror(), eltorito_descriptor_fixed::type, and virt_to_user().
Referenced by int13_hook().
|
static |
Guess INT 13 hard disk drive geometry.
sandev | SAN device |
scratch | Scratch area for single-sector reads |
heads | Guessed number of heads |
sectors | Guessed number of sectors per track |
rc | Return status code |
Guesses the drive geometry by inspecting the partition table.
Definition at line 217 of file int13.c.
References partition_table_entry::chs_end, partition_table_entry::chs_start, DBGC, DBGC2, DBGC2_HDA, san_device::drive, heads, PART_CYLINDER, PART_HEAD, PART_SECTOR, master_boot_record::partitions, rc, sandev_read(), sectors, master_boot_record::signature, partition_table_entry::start, strerror(), partition_table_entry::type, and virt_to_user().
Referenced by int13_guess_geometry().
|
static |
Guess INT 13 floppy disk drive geometry.
sandev | SAN device |
heads | Guessed number of heads |
sectors | Guessed number of sectors per track |
rc | Return status code |
Guesses the drive geometry by inspecting the disk size.
Definition at line 331 of file int13.c.
References cylinders, DBGC, san_device::drive, heads, INT13_FDD_CYLINDERS, int13_fdd_geometries, INT13_FDD_HEADS, INT13_FDD_SECTORS, sandev_capacity(), and sectors.
Referenced by int13_guess_geometry().
|
static |
Guess INT 13 drive geometry.
sandev | SAN device |
scratch | Scratch area for single-sector reads |
rc | Return status code |
Definition at line 373 of file int13.c.
References assert(), int13(), int13_capacity32(), int13_guess_geometry_fdd(), int13_guess_geometry_hdd(), int13_is_fdd(), san_device::priv, and rc.
Referenced by int13_hook().
|
static |
Update BIOS drive count.
Definition at line 414 of file int13.c.
References BDA_EQUIPMENT_WORD, BDA_NUM_DRIVES, BDA_SEG, DBGC, san_device::drive, equipment_word, for_each_sandev, get_real, int13(), int13_is_fdd(), int13_data::natural_drive, num_drives, num_fdds, san_device::priv, and put_real.
Referenced by int13_check_num_drives(), and int13_hook().
|
static |
Check number of drives.
Definition at line 456 of file int13.c.
References BDA_EQUIPMENT_WORD, BDA_NUM_DRIVES, BDA_SEG, equipment_word, get_real, int13_sync_num_drives(), and num_drives.
Referenced by int13().
|
static |
INT 13, 00 - Reset disk system.
sandev | SAN device |
status | Status code |
Definition at line 474 of file int13.c.
References DBGC2, san_device::drive, INT13_STATUS_RESET_FAILED, rc, and sandev_reset().
Referenced by int13().
|
static |
INT 13, 01 - Get status of last operation.
sandev | SAN device |
status | Status code |
Definition at line 493 of file int13.c.
References DBGC2, san_device::drive, int13(), and san_device::priv.
Referenced by int13().
|
static |
Read / write sectors.
sandev | SAN device |
al | Number of sectors to read or write (must be nonzero) |
ch | Low bits of cylinder number |
cl | (bits 7:6) High bits of cylinder number |
cl | (bits 5:0) Sector number |
dh | Head number |
es:bx | Data buffer |
sandev_rw | SAN device read/write method |
status | Status code |
al | Number of sectors read or written |
Definition at line 515 of file int13.c.
References i386_regs::al, buffer, i386_regs::bx, i386_regs::ch, i386_regs::cl, count, DBGC, DBGC2, i386_regs::dh, san_device::drive, i386_seg_regs::es, head, int13(), INT13_BLKSIZE, INT13_STATUS_INVALID, INT13_STATUS_READ_ERROR, lba, san_device::priv, rc, real_to_user(), i386_all_regs::regs, sandev_blksize(), sandev_rw(), sector, i386_all_regs::segs, and strerror().
Referenced by int13_read_sectors(), and int13_write_sectors().
|
static |
INT 13, 02 - Read sectors.
sandev | SAN device |
al | Number of sectors to read (must be nonzero) |
ch | Low bits of cylinder number |
cl | (bits 7:6) High bits of cylinder number |
cl | (bits 5:0) Sector number |
dh | Head number |
es:bx | Data buffer |
status | Status code |
al | Number of sectors read |
Definition at line 581 of file int13.c.
References DBGC2, san_device::drive, int13_rw_sectors(), and sandev_read().
Referenced by int13().
|
static |
INT 13, 03 - Write sectors.
sandev | SAN device |
al | Number of sectors to write (must be nonzero) |
ch | Low bits of cylinder number |
cl | (bits 7:6) High bits of cylinder number |
cl | (bits 5:0) Sector number |
dh | Head number |
es:bx | Data buffer |
status | Status code |
al | Number of sectors written |
Definition at line 601 of file int13.c.
References DBGC2, san_device::drive, int13_rw_sectors(), and sandev_write().
Referenced by int13().
|
static |
INT 13, 08 - Get drive parameters.
sandev | SAN device |
status | Status code |
ch | Low bits of maximum cylinder number |
cl | (bits 7:6) High bits of maximum cylinder number |
cl | (bits 5:0) Maximum sector number |
dh | Maximum head number |
dl | Number of drives |
Definition at line 619 of file int13.c.
References __from_data16, i386_regs::bl, i386_regs::ch, i386_regs::cl, DBGC, DBGC2, i386_regs::dh, i386_regs::di, i386_regs::dl, san_device::drive, i386_seg_regs::es, int13(), INT13_BLKSIZE, int13_fdd_params, INT13_FDD_TYPE_1M44, int13_is_fdd(), INT13_STATUS_INVALID, num_drives, num_fdds, san_device::priv, i386_all_regs::regs, rm_ds, sandev_blksize(), and i386_all_regs::segs.
Referenced by int13().
|
static |
INT 13, 15 - Get disk type.
sandev | SAN device |
ah | Type code |
cx:dx | Sector count |
status | Status code / disk type |
Definition at line 660 of file int13.c.
References i386_regs::cx, DBGC2, san_device::drive, i386_regs::dx, int13_capacity32(), INT13_DISK_TYPE_FDD, INT13_DISK_TYPE_HDD, int13_is_fdd(), and i386_all_regs::regs.
Referenced by int13().
|
static |
INT 13, 41 - Extensions installation check.
sandev | SAN device |
bx | 0x55aa |
bx | 0xaa55 |
cx | Extensions API support bitmap |
status | Status code / API version |
Definition at line 685 of file int13.c.
References i386_regs::bx, i386_regs::cx, DBGC2, san_device::drive, INT13_EXTENSION_64BIT, INT13_EXTENSION_EDD, INT13_EXTENSION_LINEAR, INT13_EXTENSION_VER_3_0, int13_is_fdd(), INT13_STATUS_INVALID, and i386_all_regs::regs.
Referenced by int13().
|
static |
Extended read / write.
sandev | SAN device |
ds:si | Disk address packet |
sandev_rw | SAN device read/write method |
status | Status code |
Definition at line 708 of file int13.c.
References addr, buffer, buffer_phys, bufsize, copy_from_real, count, DBGC, DBGC2, san_device::drive, i386_seg_regs::ds, get_real, int13_is_fdd(), INT13_STATUS_INVALID, INT13_STATUS_READ_ERROR, lba, memset(), offsetof, phys_to_user(), put_real, rc, real_to_user(), i386_all_regs::regs, sandev_rw(), i386_all_regs::segs, i386_regs::si, strerror(), and typeof().
Referenced by int13_extended_read(), and int13_extended_write().
|
static |
INT 13, 42 - Extended read.
sandev | SAN device |
ds:si | Disk address packet |
status | Status code |
Definition at line 787 of file int13.c.
References DBGC2, san_device::drive, int13_extended_rw(), and sandev_read().
Referenced by int13().
|
static |
INT 13, 43 - Extended write.
sandev | SAN device |
ds:si | Disk address packet |
status | Status code |
Definition at line 801 of file int13.c.
References DBGC2, san_device::drive, int13_extended_rw(), and sandev_write().
Referenced by int13().
|
static |
INT 13, 44 - Verify sectors.
sandev | SAN device |
ds:si | Disk address packet |
status | Status code |
Definition at line 815 of file int13.c.
References addr, copy_from_real, count, DBG_EXTRA, DBGC2, san_device::drive, i386_seg_regs::ds, INT13_STATUS_INVALID, lba, i386_all_regs::regs, i386_all_regs::segs, and i386_regs::si.
Referenced by int13().
|
static |
INT 13, 44 - Extended seek.
sandev | SAN device |
ds:si | Disk address packet |
status | Status code |
Definition at line 842 of file int13.c.
References addr, copy_from_real, count, DBG_EXTRA, DBGC2, san_device::drive, i386_seg_regs::ds, lba, i386_all_regs::regs, i386_all_regs::segs, and i386_regs::si.
Referenced by int13().
|
static |
Build device path information.
sandev | SAN device |
dpi | Device path information |
rc | Return status code |
Definition at line 869 of file int13.c.
References san_device::active, assert(), san_path::block, edd_interface_path::bus, BUS_TYPE_PCI, edd_interface_path::channel, edd_device_path_information::checksum, DBGC, desc, device::desc, device, edd_device_path_information::device_path, dpi, san_device::drive, EDD_BUS_TYPE_PCI, edd_describe(), EDD_DEVICE_PATH_INFO_KEY, ENODEV, ENOTSUP, edd_interface_path::function, edd_device_path_information::host_bus_type, identify_device(), edd_device_path_information::interface_path, edd_device_path_information::interface_type, edd_device_path_information::key, edd_device_path_information::len, NULL, PCI_BUS, PCI_FUNC, PCI_SLOT, rc, sandev_needs_reopen(), sandev_reopen(), edd_interface_path::slot, strerror(), and edd_host_bus_type::type.
Referenced by int13_get_extended_parameters().
|
static |
INT 13, 48 - Get extended parameters.
sandev | SAN device |
ds:si | Drive parameter table |
status | Status code |
Definition at line 934 of file int13.c.
References address, bufsize, int13_disk_parameters::bufsize, copy_to_real, int13_disk_parameters::cylinders, DBGC, DBGC2, DBGC_HDA, dpi, int13_disk_parameters::dpi, dpte, int13_disk_parameters::dpte, san_device::drive, i386_seg_regs::ds, int13_disk_parameters::flags, get_real, int13_disk_parameters::heads, int13(), int13_device_path_info(), INT13_FL_CHS_VALID, INT13_FL_DMA_TRANSPARENT, INT13_MAX_CHS_SECTORS, INT13_STATUS_INVALID, len, memset(), offsetof, san_device::priv, rc, i386_all_regs::regs, sandev_blksize(), sandev_capacity(), int13_disk_parameters::sector_size, int13_disk_parameters::sectors, int13_disk_parameters::sectors_per_track, i386_all_regs::segs, i386_regs::si, strerror(), and typeof().
Referenced by int13().
|
static |
INT 13, 4b - Get status or terminate CD-ROM emulation.
sandev | SAN device |
ds:si | Specification packet |
status | Status code |
Definition at line 1003 of file int13.c.
References i386_regs::al, copy_to_real, DBGC, DBGC2, san_device::drive, int13_cdrom_specification::drive, i386_seg_regs::ds, INT13_STATUS_INVALID, san_device::is_cdrom, memset(), i386_all_regs::regs, i386_all_regs::segs, i386_regs::si, and int13_cdrom_specification::size.
Referenced by int13().
|
static |
INT 13, 4d - Read CD-ROM boot catalog.
sandev | SAN device |
ds:si | Command packet |
status | Status code |
Definition at line 1038 of file int13.c.
References copy_from_real, DBGC, DBGC2, san_device::drive, i386_seg_regs::ds, int13(), INT13_STATUS_INVALID, INT13_STATUS_READ_ERROR, phys_to_user(), san_device::priv, rc, i386_all_regs::regs, sandev_read(), i386_all_regs::segs, i386_regs::si, start, and strerror().
Referenced by int13().
|
static |
INT 13 handler.
Definition at line 1074 of file int13.c.
References i386_regs::ah, CF, DBGC, DBGC2, i386_regs::dl, san_device::drive, i386_all_regs::flags, for_each_sandev, INT13_CDROM_READ_BOOT_CATALOG, int13_cdrom_read_boot_catalog(), INT13_CDROM_STATUS_TERMINATE, int13_cdrom_status_terminate(), int13_check_num_drives(), INT13_EXTENDED_READ, int13_extended_read(), INT13_EXTENDED_SEEK, int13_extended_seek(), INT13_EXTENDED_VERIFY, int13_extended_verify(), INT13_EXTENDED_WRITE, int13_extended_write(), INT13_EXTENSION_CHECK, int13_extension_check(), INT13_GET_DISK_TYPE, int13_get_disk_type(), INT13_GET_EXTENDED_PARAMETERS, int13_get_extended_parameters(), INT13_GET_LAST_STATUS, int13_get_last_status(), INT13_GET_PARAMETERS, int13_get_parameters(), INT13_READ_SECTORS, int13_read_sectors(), INT13_RESET, int13_reset(), INT13_STATUS_INVALID, INT13_WRITE_SECTORS, int13_write_sectors(), san_device::is_cdrom, OF, san_device::priv, i386_all_regs::regs, and status.
Referenced by int13_cdrom_read_boot_catalog(), int13_get_extended_parameters(), int13_get_last_status(), int13_get_parameters(), int13_guess_geometry(), int13_hook(), int13_hook_vector(), int13_parse_eltorito(), int13_rw_sectors(), and int13_sync_num_drives().
|
static |
Hook INT 13 handler.
Definition at line 1181 of file int13.c.
References __asm__(), __volatile__(), hook_bios_interrupt(), int13(), int13_vector, int13_wrapper(), TEXT16_CODE, and VIRT_CALL.
Referenced by int13_hook().
|
static |
Unhook INT 13 handler.
Definition at line 1235 of file int13.c.
References int13_vector, int13_wrapper(), and unhook_bios_interrupt().
Referenced by int13_unhook().
|
static |
Hook INT 13 SAN device.
drive | Drive number |
uris | List of URIs |
count | Number of URIs |
flags | Flags |
drive | Drive number, or negative error |
Registers the drive with the INT 13 emulation subsystem, and hooks the INT 13 interrupt vector (if not already hooked).
Definition at line 1252 of file int13.c.
References alloc_sandev(), count, DBGC, devices_get(), drive, ENOMEM, flags, free, have_sandevs(), int13(), INT13_BLKSIZE, int13_guess_geometry(), int13_hook_vector(), int13_parse_eltorito(), int13_sync_num_drives(), san_device::is_cdrom, malloc(), int13_data::natural_drive, num_drives, num_fdds, san_device::priv, rc, register_sandev(), sandev_blksize(), sandev_put(), strerror(), and unregister_sandev().
|
static |
Unhook INT 13 SAN device.
drive | Drive number |
Unregisters the drive from the INT 13 emulation subsystem. If this is the last SAN device, the INT 13 vector is unhooked (if possible).
Definition at line 1336 of file int13.c.
References DBGC, devices_put(), drive, have_sandevs(), int13_unhook_vector(), sandev_find(), sandev_put(), and unregister_sandev().
|
static |
Load and verify master boot record from INT 13 drive.
drive | Drive number |
address | Boot code address to fill in |
rc | Return status code |
Definition at line 1372 of file int13.c.
References __asm__(), __volatile__(), address, DBGC, discard_c, drive, EIO, ENOEXEC, get_real, INT13_MBR_MAGIC, magic, offsetof, REAL_CODE, and status.
Referenced by int13_boot().
|
static |
El Torito boot catalog command packet.
|
static |
El Torito disk address packet.
|
static |
Load and verify El Torito boot record from INT 13 drive.
drive | Drive number |
address | Boot code address to fill in |
rc | Return status code |
Definition at line 1435 of file int13.c.
References __asm__(), __attribute__, __from_data16, __volatile__(), address, buffer_phys, copy_from_user(), DBGC, drive, EIO, eltorito_address, ELTORITO_BOOTABLE, eltorito_cmd, ELTORITO_NO_EMULATION, ELTORITO_PLATFORM_X86, ENOEXEC, ENOTSUP, offsetof, phys_to_user(), REAL_CODE, status, and typeof().
Referenced by int13_boot().
|
static |
Attempt to boot from an INT 13 drive.
drive | Drive number |
config | Boot configuration parameters |
rc | Return status code |
This boots from the specified INT 13 drive by loading the Master Boot Record to 0000:7c00 and jumping to it. INT 18 is hooked to capture an attempt by the MBR to boot the next device. (This is the closest thing to a return path from an MBR).
Note that this function can never return success, by definition.
Definition at line 1524 of file int13.c.
References address, call_bootsector(), DBGC, drive, ECANCELED, get_memmap(), int13_load_eltorito(), int13_load_mbr(), rc, and strerror().
|
static |
Install ACPI table.
acpi | ACPI description header |
rc | Return status code |
Definition at line 1573 of file int13.c.
References __from_data16, acpi, acpi_fix_checksum(), acpi_name(), DBGC, DBGC_HDA, ENOSPC, len, memcpy(), acpi_header::oem_id, acpi_header::oem_table_id, segoff::offset, rm_ds, segoff::segment, acpi_header::signature, strncpy(), xbftab, XBFTAB_ALIGN, and xbftab_used.
Referenced by int13_describe().
|
static |
Describe SAN devices for SAN-booted operating system.
rc | Return status code |
Definition at line 1616 of file int13.c.
References acpi_install(), DBG, int13_install(), memset(), rc, strerror(), xbftab, and xbftab_used.
PROVIDE_SANBOOT | ( | pcbios | , |
san_hook | , | ||
int13_hook | |||
) |
PROVIDE_SANBOOT | ( | pcbios | , |
san_unhook | , | ||
int13_unhook | |||
) |
PROVIDE_SANBOOT | ( | pcbios | , |
san_boot | , | ||
int13_boot | |||
) |
PROVIDE_SANBOOT | ( | pcbios | , |
san_describe | , | ||
int13_describe | |||
) |
|
static |
Equipment word.
This is a cached copy of the BIOS Data Area equipment word at 40:10.
Definition at line 121 of file int13.c.
Referenced by int13_check_num_drives(), and int13_sync_num_drives().
|
static |
Recognised floppy disk geometries.
Definition at line 298 of file int13.c.
Referenced by int13_guess_geometry_fdd().
|
static |
Total used length of boot firmware tables.
Definition at line 1565 of file int13.c.
Referenced by int13_describe(), and int13_install().