iPXE
|
iPXE timer API for EFI More...
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <ipxe/timer.h>
#include <ipxe/init.h>
#include <ipxe/efi/efi.h>
Go to the source code of this file.
Macros | |
#define | EFI_JIFFIES_PER_SEC 32 |
Number of jiffies per second. More... | |
#define | colour &efi_jiffies |
Colour for debug messages. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | efi_udelay (unsigned long usecs) |
Delay for a fixed number of microseconds. More... | |
static unsigned long | efi_currticks (void) |
Get current system time in ticks. More... | |
static EFIAPI void | efi_tick (EFI_EVENT event __unused, void *context __unused) |
Timer tick. More... | |
static void | efi_tick_startup (void) |
Start timer tick. More... | |
static void | efi_tick_shutdown (int booting __unused) |
Stop timer tick. More... | |
struct startup_fn efi_tick_startup_fn | __startup_fn (STARTUP_EARLY) |
Timer tick startup function. More... | |
struct timer efi_timer | __timer (TIMER_NORMAL) |
EFI timer. More... | |
Variables | |
static unsigned long | efi_jiffies |
Current tick count. More... | |
static EFI_EVENT | efi_tick_event |
Timer tick event. More... | |
iPXE timer API for EFI
Definition in file efi_timer.c.
#define EFI_JIFFIES_PER_SEC 32 |
#define colour &efi_jiffies |
Colour for debug messages.
Definition at line 53 of file efi_timer.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Delay for a fixed number of microseconds.
usecs | Number of microseconds for which to delay |
Definition at line 60 of file efi_timer.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, EEFI, efi_systab, rc, EFI_BOOT_SERVICES::Stall, and strerror().
|
static |
Get current system time in ticks.
ticks | Current time, in ticks |
Definition at line 78 of file efi_timer.c.
References EFI_SYSTEM_TABLE::BootServices, efi_external_tpl, efi_internal_tpl, efi_jiffies, EFI_JIFFIES_PER_SEC, efi_shutdown_in_progress, efi_systab, EFI_BOOT_SERVICES::RaiseTPL, EFI_BOOT_SERVICES::RestoreTPL, and TICKS_PER_SEC.
Timer tick.
event | Timer tick event |
context | Event context |
Definition at line 152 of file efi_timer.c.
References efi_jiffies.
Referenced by efi_tick_startup().
|
static |
Start timer tick.
Definition at line 163 of file efi_timer.c.
References EFI_SYSTEM_TABLE::BootServices, colour, EFI_BOOT_SERVICES::CreateEvent, DBGC, EEFI, EFI_JIFFIES_PER_SEC, efi_systab, efi_tick(), efi_tick_event, EVT_NOTIFY_SIGNAL, EVT_TIMER, NULL, rc, EFI_BOOT_SERVICES::SetTimer, strerror(), TimerPeriodic, and TPL_CALLBACK.
|
static |
Stop timer tick.
booting | System is shutting down in order to boot |
Definition at line 197 of file efi_timer.c.
References EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::CloseEvent, colour, DBGC, EEFI, efi_systab, efi_tick_event, rc, EFI_BOOT_SERVICES::SetTimer, strerror(), and TimerCancel.
struct startup_fn efi_tick_startup_fn __startup_fn | ( | STARTUP_EARLY | ) |
Timer tick startup function.
struct timer efi_timer __timer | ( | TIMER_NORMAL | ) |
EFI timer.
|
static |
Current tick count.
Definition at line 47 of file efi_timer.c.
Referenced by efi_currticks(), and efi_tick().
|
static |
Timer tick event.
Definition at line 50 of file efi_timer.c.
Referenced by efi_tick_shutdown(), and efi_tick_startup().