46#if ( defined ( CONSOLE_DISKLOG ) && ! defined ( CONSOLE_INT13 ) )
47#define CONSOLE_INT13 CONSOLE_DISKLOG
49#if ! ( defined ( CONSOLE_INT13 ) && CONSOLE_EXPLICIT ( CONSOLE_INT13 ) )
51#define CONSOLE_INT13 ( CONSOLE_USAGE_ALL & ~CONSOLE_USAGE_LOG )
55#define INT13CON_DRIVE 0x80
59#define int13con_vector __use_data16 ( int13con_vector )
63#define int13con_buffer __use_data16 ( int13con_buffer )
67#define int13con_address __use_data16 ( int13con_address )
97 "lcall *int13con_vector\n\t" )
102 DBG (
"INT13CON operation %04x failed: %02x\n",
151 DBG (
"INT13CON could not read MBR: %s\n",
strerror (
rc ) );
157 DBG (
"INT13CON incorrect MBR magic\n" );
158 DBG2_HDA ( 0, mbr,
sizeof ( *mbr ) );
164 for ( i = 0 ; i < (
sizeof ( part ) /
sizeof ( part[0] ) ) ; i++ ) {
172 part[i].
start ) ) != 0 ) {
173 DBG (
"INT13CON partition %d could not read header: "
185 DBG (
"INT13CON partition %d could not initialise: "
191 DBG (
"INT13CON partition %d at [%08llx,%08llx)\n", ( i + 1 ),
198 DBG (
"INT13CON found no log partition\n" );
210 unsigned int discard_d;
216 :
"=a" (
error ),
"=b" ( check ),
220 if (
error || ( check != 0xaa55 ) ) {
221 DBG (
"INT13CON missing extensions (%02x,%04x)\n",
229 DBG (
"INT13CON using original INT13 vector %04x:%04x\n",
237 int13con.disabled = 0;
257 ".equ ipxe_oem_info_disklog, 0x0001\n\t" );
struct arbelprm_rc_send_wqe rc
struct arbelprm_completion_with_error error
__asm__ __volatile__("call *%9" :"=a"(result), "=c"(discard_ecx), "=d"(discard_edx) :"d"(0), "a"(code), "b"(0), "c"(in_phys), "D"(0), "S"(out_phys), "m"(hypercall))
unsigned long long uint64_t
int disklog_open(struct disklog *disklog)
Open disk log console.
void disklog_putchar(struct disklog *disklog, int character)
Write character to disk log console.
#define DISKLOG_PARTITION_TYPE
Disk log partition type.
static void disklog_init(struct disklog *disklog, struct disklog_operations *op, struct console_driver *console, void *buffer, size_t blksize, uint64_t lba, uint64_t max_lba)
Initialise disk log console.
uint32_t type
Operating system type.
#define DBG(...)
Print a debugging message.
#define INIT_CONSOLE
Console initialisation.
uint32_t start
Starting offset.
#define INT13_MBR_MAGIC
MBR magic signature.
uint64_t lba
Starting block number.
uint16_t magic
0x55aa MBR signature
struct partition_table_entry partitions[4]
Partition table.
#define INT13_EXTENDED_WRITE
Extended write.
#define INT13_EXTENDED_READ
Extended read.
#define INT13_EXTENSION_CHECK
Extensions installation check.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define ENOENT
No such file or directory.
#define EINVAL
Invalid argument.
#define EIO
Input/output error.
#define CONSOLE_DISABLED
Console is disabled for all uses.
#define __console_driver
Mark a struct console_driver as being part of the console drivers table.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
#define __init_fn(init_order)
Declare an initialisation functon.
#define INT13_BLKSIZE
Block size for non-extended INT 13 calls.
static void int13con_putchar(int character)
Write character to console.
#define INT13CON_DRIVE
Disk drive number.
__asm__(".globl ipxe_oem_info_disklog\n\t" ".equ ipxe_oem_info_disklog, 0x0001\n\t")
static struct disklog_operations int13con_op
INT13 disk log operations.
static void int13con_init(void)
Initialise INT13 console.
static int int13con_rw(unsigned int op, uint64_t lba)
Read/write disk sector.
static struct disklog int13con_disklog
Disk log.
static int int13con_find(void)
Find log partition.
static int int13con_write(void)
Write current logical block.
#define REAL_CODE(asm_code_str)
#define __bss16(variable)
#define __from_data16(pointer)
#define __bss16_array(variable, array)
static uint16_t struct vmbus_xfer_pages_operations * op
__asm__(".section \".rodata\", \"a\", " PROGBITS "\n\t" "\nprivate_key_data:\n\t" ".size private_key_data, ( . - private_key_data )\n\t" ".equ private_key_len, ( . - private_key_data )\n\t" ".previous\n\t")
char * strerror(int errno)
Retrieve string representation of error number.
An initialisation function.
An INT 13 disk address packet.
A partition table entry within the MBR.