46#if ! ( defined ( CONSOLE_DISKLOG ) && CONSOLE_EXPLICIT ( CONSOLE_DISKLOG ) )
48#define CONSOLE_DISKLOG ( CONSOLE_USAGE_ALL & ~CONSOLE_USAGE_LOG )
81 DBGC (
disklog,
"EFIDISKLOG %s could not write LBA %#llx: "
128 DBGC (
disklog,
"EFIDISKLOG %s could not open: %s\n",
137 if ( !
media->LogicalPartition ) {
141 goto err_not_partition;
155 DBGC2 (
disklog,
"EFIDISKLOG %s has no partition info\n",
171 DBGC (
disklog,
"EFIDISKLOG %s could not read block 0: %s\n",
182 DBGC (
disklog,
"EFIDISKLOG %s could not initialise log: "
190 DBGC (
disklog,
"EFIDISKLOG %s could not reopen: %s\n",
195 DBGC (
disklog,
"EFIDISKLOG %s changed during reopening\n",
198 goto err_reopen_mismatch;
202 DBGC2 (
disklog,
"EFIDISKLOG has %zd-byte LBA [%#x,%#llx]\n",
238 &handles ) ) != 0 ) {
246 for ( i = 0 ; i <
count ; i++ ) {
UINT64 UINTN
Unsigned value of native width.
unsigned int UINT32
4-byte unsigned value.
#define NULL
NULL pointer (VOID *).
Block IO protocol as defined in the UEFI 2.0 specification.
struct _EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL
This file defines the EFI Partition Information Protocol.
#define PARTITION_TYPE_MBR
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
GUID EFI_GUID
128-bit buffer containing a unique identifier value.
@ ByProtocol
Retrieve the set of handles from the handle database that support a specified protocol.
struct arbelprm_rc_send_wqe rc
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.
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
static EFI_HANDLE efi_disklog_handle
EFI disk log console device handle.
static int efi_disklog_write(void)
Write current logical block.
static struct disklog_operations efi_disklog_op
EFI disk log console operations.
static int efi_disklog_open(EFI_HANDLE handle)
Open EFI disk log partition.
static UINT32 efi_disklog_media_id
EFI disk log console media ID.
static void efi_disklog_putchar(int character)
Write character to console.
static void efi_disklog_shutdown(int booting __unused)
Shut down EFI disk log console.
static struct disklog efi_disklog
EFI disk log console.
static EFI_BLOCK_IO_PROTOCOL * efi_disklog_block
EFI disk log console block I/O protocol.
static void efi_disklog_init(void)
Initialise EFI disk log console.
EFI_GUID efi_block_io_protocol_guid
Block I/O protocol GUID.
EFI_GUID efi_partition_info_protocol_guid
Partition information protocol GUID.
void efi_close_by_driver(EFI_HANDLE handle, EFI_GUID *protocol)
Close protocol opened for persistent use by a driver.
#define __unused
Declare a variable or data structure as unused.
#define INIT_CONSOLE
Console initialisation.
static unsigned int count
Number of entries.
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER).
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define EPIPE
Broken pipe.
#define ENOMEM
Not enough space.
#define ENOTTY
Inappropriate I/O control operation.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
#define STARTUP_EARLY
Early startup.
#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.
#define efi_open_by_driver(handle, protocol, interface)
Open protocol for persistent use by a driver.
#define efi_open(handle, protocol, interface)
Open protocol for ephemeral use.
#define EEFI(efirc)
Convert an EFI status code to an iPXE status code.
EFI_SYSTEM_TABLE * efi_systab
static __always_inline void * umalloc(size_t size)
Allocate external memory.
static __always_inline void ufree(void *ptr)
Free external memory.
#define __init_fn(init_order)
Declare an initialisation functon.
#define __startup_fn(startup_order)
Declare a startup/shutdown function.
uint8_t block[3][8]
DES-encrypted blocks.
uint16_t protocol
Protocol ID.
char * strerror(int errno)
Retrieve string representation of error number.
EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer
Partition Information Protocol structure.
MBR_PARTITION_RECORD Mbr
MBR data.
union EFI_PARTITION_INFO_PROTOCOL::@056321252157326256300375054226170121123346213234 Info
uint8_t * buffer
Logical block data buffer.
size_t blksize
Logical block size.
uint64_t lba
Current logical block index.
uint64_t max_lba
Maximum logical block index.
An initialisation function.
A startup/shutdown function.