|
iPXE
|
EFI disk log console. More...
#include <assert.h>#include <errno.h>#include <string.h>#include <ipxe/console.h>#include <ipxe/disklog.h>#include <ipxe/init.h>#include <ipxe/umalloc.h>#include <ipxe/efi/efi.h>#include <ipxe/efi/Protocol/BlockIo.h>#include <ipxe/efi/Protocol/PartitionInfo.h>#include <config/console.h>Go to the source code of this file.
Macros | |
| #define | CONSOLE_DISKLOG ( CONSOLE_USAGE_ALL & ~CONSOLE_USAGE_LOG ) |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| static int | efi_disklog_write (void) |
| Write current logical block. | |
| static void | efi_disklog_putchar (int character) |
| Write character to console. | |
| static int | efi_disklog_open (EFI_HANDLE handle) |
| Open EFI disk log partition. | |
| static void | efi_disklog_init (void) |
| Initialise EFI disk log console. | |
| struct init_fn efi_disklog_init_fn | __init_fn (INIT_CONSOLE) |
| EFI disk log console initialisation function. | |
| static void | efi_disklog_shutdown (int booting __unused) |
| Shut down EFI disk log console. | |
| struct startup_fn efi_disklog_startup_fn | __startup_fn (STARTUP_EARLY) |
| EFI disk log console shutdown function. | |
| IPXE_NOTE (DISKLOG) | |
Variables | |
| static EFI_HANDLE | efi_disklog_handle |
| EFI disk log console device handle. | |
| static EFI_BLOCK_IO_PROTOCOL * | efi_disklog_block |
| EFI disk log console block I/O protocol. | |
| static UINT32 | efi_disklog_media_id |
| EFI disk log console media ID. | |
| static struct disklog | efi_disklog |
| EFI disk log console. | |
| struct console_driver efi_disklog_console | __console_driver |
| EFI disk log console driver. | |
| static struct disklog_operations | efi_disklog_op |
| EFI disk log console operations. | |
EFI disk log console.
Definition in file efi_disklog.c.
| #define CONSOLE_DISKLOG ( CONSOLE_USAGE_ALL & ~CONSOLE_USAGE_LOG ) |
Definition at line 48 of file efi_disklog.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
static |
Write current logical block.
| rc | Return status code |
Definition at line 70 of file efi_disklog.c.
References disklog::blksize, block, disklog::buffer, DBGC, EEFI, efi_disklog, efi_disklog_block, efi_disklog_handle, efi_disklog_media_id, efi_handle_name(), disklog::lba, rc, and strerror().
|
static |
Write character to console.
| character | Character |
Definition at line 101 of file efi_disklog.c.
References disklog_putchar(), and efi_disklog.
|
static |
Open EFI disk log partition.
| handle | Block device handle |
| rc | Return status code |
Definition at line 113 of file efi_disklog.c.
References disklog::blksize, block, buffer, DBGC, DBGC2, disklog_init(), disklog_open(), DISKLOG_PARTITION_TYPE, EEFI, efi_block_io_protocol_guid, efi_close_by_driver(), efi_disklog, efi_disklog_block, efi_disklog_handle, efi_disklog_media_id, efi_disklog_op, EFI_HANDLE, efi_handle_name(), efi_open, efi_open_by_driver, efi_partition_info_protocol_guid, ENOMEM, ENOTTY, EPIPE, handle, EFI_PARTITION_INFO_PROTOCOL::Info, disklog::max_lba, EFI_PARTITION_INFO_PROTOCOL::Mbr, media, NULL, MBR_PARTITION_RECORD::OSIndicator, PARTITION_TYPE_MBR, rc, strerror(), EFI_PARTITION_INFO_PROTOCOL::Type, ufree(), and umalloc().
Referenced by efi_disklog_init().
|
static |
Initialise EFI disk log console.
Definition at line 226 of file efi_disklog.c.
References ByProtocol, count, DBGC, EEFI, efi_block_io_protocol_guid, efi_disklog, efi_disklog_open(), EFI_HANDLE, efi_systab, EFI_BOOT_SERVICES::FreePool, EFI_BOOT_SERVICES::LocateHandleBuffer, NULL, protocol, rc, and strerror().
Referenced by __init_fn().
| struct init_fn efi_disklog_init_fn __init_fn | ( | INIT_CONSOLE | ) |
EFI disk log console initialisation function.
References __init_fn, efi_disklog_init(), and INIT_CONSOLE.
|
static |
Shut down EFI disk log console.
| booting | System is shutting down for OS boot |
Definition at line 269 of file efi_disklog.c.
References __unused, disklog::buffer, DBGC, efi_block_io_protocol_guid, efi_close_by_driver(), efi_disklog, efi_disklog_block, efi_disklog_handle, efi_handle_name(), NULL, and ufree().
Referenced by __startup_fn().
| struct startup_fn efi_disklog_startup_fn __startup_fn | ( | STARTUP_EARLY | ) |
EFI disk log console shutdown function.
References __startup_fn, efi_disklog_shutdown(), and STARTUP_EARLY.
| IPXE_NOTE | ( | DISKLOG | ) |
|
static |
EFI disk log console device handle.
Definition at line 52 of file efi_disklog.c.
Referenced by efi_disklog_open(), efi_disklog_shutdown(), and efi_disklog_write().
|
static |
EFI disk log console block I/O protocol.
Definition at line 55 of file efi_disklog.c.
Referenced by efi_disklog_open(), efi_disklog_shutdown(), and efi_disklog_write().
|
static |
EFI disk log console media ID.
Definition at line 58 of file efi_disklog.c.
Referenced by efi_disklog_open(), and efi_disklog_write().
|
static |
EFI disk log console.
Definition at line 61 of file efi_disklog.c.
Referenced by efi_disklog_init(), efi_disklog_open(), efi_disklog_putchar(), efi_disklog_shutdown(), efi_disklog_write(), and PROVIDE_REQUIRING_SYMBOL().
| struct console_driver efi_disklog_console __console_driver |
EFI disk log console driver.
Definition at line 63 of file efi_disklog.c.
|
static |
EFI disk log console operations.
Definition at line 92 of file efi_disklog.c.
Referenced by efi_disklog_open().