iPXE
|
INT13 disk log console. More...
#include <stdint.h>
#include <string.h>
#include <errno.h>
#include <ipxe/console.h>
#include <ipxe/init.h>
#include <realmode.h>
#include <int13.h>
#include <config/console.h>
Go to the source code of this file.
Data Structures | |
struct | int13con_header |
Log partition header. More... | |
Macros | |
#define | CONSOLE_INT13 ( CONSOLE_USAGE_ALL & ~CONSOLE_USAGE_LOG ) |
#define | INT13CON_DRIVE 0x80 |
Disk drive number. More... | |
#define | INT13CON_PARTITION_TYPE 0xe0 |
Log partition type. More... | |
#define | INT13CON_MAX_UNWRITTEN 64 |
Maximum number of outstanding unwritten characters. More... | |
#define | INT13CON_MAGIC "iPXE LOG\n\n" |
Log partition magic signature. More... | |
#define | int13con_vector __use_data16 ( int13con_vector ) |
#define | int13con_buffer __use_data16 ( int13con_buffer ) |
#define | int13con_address __use_data16 ( int13con_address ) |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static struct segoff | __bss16 (int13con_vector) |
Original INT13 vector. More... | |
static uint8_t | __bss16_array (int13con_buffer, [INT13_BLKSIZE]) |
Sector buffer. More... | |
static struct int13_disk_address | __bss16 (int13con_address) |
Disk address packet. More... | |
static int | int13con_rw (unsigned int op, uint64_t lba) |
Read/write disk sector. More... | |
static void | int13con_putchar (int character) |
Write character to console. More... | |
static int | int13con_find (void) |
Find log partition. More... | |
static void | int13con_init (void) |
Initialise INT13 console. More... | |
struct init_fn int13con_init_fn | __init_fn (INIT_CONSOLE) |
INT13 console initialisation function. More... | |
Variables | |
static uint64_t | int13con_lba |
Current LBA. More... | |
static uint64_t | int13con_max_lba |
Maximum LBA. More... | |
static size_t | int13con_offset |
Current offset within sector. More... | |
static size_t | int13con_unwritten |
Number of unwritten characters. More... | |
struct console_driver int13con | __console_driver |
INT13 console driver. More... | |
INT13 disk log console.
Definition in file int13con.c.
#define CONSOLE_INT13 ( CONSOLE_USAGE_ALL & ~CONSOLE_USAGE_LOG ) |
Definition at line 44 of file int13con.c.
#define INT13CON_DRIVE 0x80 |
Disk drive number.
Definition at line 48 of file int13con.c.
#define INT13CON_PARTITION_TYPE 0xe0 |
Log partition type.
Definition at line 51 of file int13con.c.
#define INT13CON_MAX_UNWRITTEN 64 |
Maximum number of outstanding unwritten characters.
Definition at line 54 of file int13con.c.
#define INT13CON_MAGIC "iPXE LOG\n\n" |
Log partition magic signature.
Definition at line 63 of file int13con.c.
#define int13con_vector __use_data16 ( int13con_vector ) |
Definition at line 67 of file int13con.c.
#define int13con_buffer __use_data16 ( int13con_buffer ) |
Definition at line 71 of file int13con.c.
#define int13con_address __use_data16 ( int13con_address ) |
Definition at line 75 of file int13con.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Original INT13 vector.
|
static |
Sector buffer.
|
static |
Disk address packet.
|
static |
Read/write disk sector.
op | Operation |
lba | Logical block address |
rc | Return status code |
Definition at line 98 of file int13con.c.
References __asm__(), __from_data16, DBG, EIO, error, int13con_address, int13con_buffer, INT13CON_DRIVE, lba, op, REAL_CODE, and rm_ds.
Referenced by int13con_find(), and int13con_putchar().
|
static |
Write character to console.
character | Character |
Definition at line 132 of file int13con.c.
References DBG, INT13_BLKSIZE, INT13_EXTENDED_WRITE, int13con_buffer, int13con_lba, int13con_max_lba, INT13CON_MAX_UNWRITTEN, int13con_offset, int13con_rw(), int13con_unwritten, memset(), and rc.
|
static |
Find log partition.
rc | Return status code |
Definition at line 185 of file int13con.c.
References DBG, DBG2_HDA, EINVAL, ENOENT, hdr, INT13_EXTENDED_READ, INT13_MBR_MAGIC, int13con_buffer, int13con_lba, INT13CON_MAGIC, int13con_max_lba, int13con_offset, INT13CON_PARTITION_TYPE, int13con_rw(), length, partition_table_entry::length, master_boot_record::magic, memcmp(), memcpy(), memset(), master_boot_record::partitions, rc, start, partition_table_entry::start, strerror(), and type.
Referenced by int13con_init().
|
static |
Initialise INT13 console.
Definition at line 253 of file int13con.c.
References __asm__(), __volatile__(), copy_from_real, DBG, discard_c, error, INT13_EXTENSION_CHECK, INT13CON_DRIVE, int13con_find(), int13con_vector, rc, and REAL_CODE.
struct init_fn int13con_init_fn __init_fn | ( | INIT_CONSOLE | ) |
INT13 console initialisation function.
|
static |
Current LBA.
Definition at line 78 of file int13con.c.
Referenced by int13con_find(), and int13con_putchar().
|
static |
Maximum LBA.
Definition at line 81 of file int13con.c.
Referenced by int13con_find(), and int13con_putchar().
|
static |
Current offset within sector.
Definition at line 84 of file int13con.c.
Referenced by int13con_find(), and int13con_putchar().
|
static |
Number of unwritten characters.
Definition at line 87 of file int13con.c.
Referenced by int13con_putchar().
struct console_driver int13con __console_driver |
INT13 console driver.
Definition at line 89 of file int13con.c.