|
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. | |
| #define | colour &efi_jiffies |
| Colour for debug messages. | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| static void | efi_udelay (unsigned long usecs) |
| Delay for a fixed number of microseconds. | |
| static unsigned long | efi_currticks (void) |
| Get current system time in ticks. | |
| static EFIAPI void | efi_tick (EFI_EVENT event __unused, void *context __unused) |
| Timer tick. | |
| static void | efi_tick_startup (void) |
| Start timer tick. | |
| static void | efi_tick_shutdown (int booting __unused) |
| Stop timer tick. | |
| struct startup_fn efi_tick_startup_fn | __startup_fn (STARTUP_EARLY) |
| Timer tick startup function. | |
| struct timer efi_timer | __timer (TIMER_NORMAL) |
| EFI timer. | |
Variables | |
| static unsigned long | efi_jiffies |
| Current tick count. | |
| static EFI_EVENT | efi_tick_event |
| Timer tick event. | |
iPXE timer API for EFI
Definition in file efi_timer.c.
| #define EFI_JIFFIES_PER_SEC 32 |
Number of jiffies per second.
This is a policy decision.
Definition at line 45 of file efi_timer.c.
Referenced by efi_currticks(), and efi_tick_startup().
| #define colour &efi_jiffies |
Colour for debug messages.
Definition at line 54 of file efi_timer.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
static |
Delay for a fixed number of microseconds.
| usecs | Number of microseconds for which to delay |
Definition at line 61 of file efi_timer.c.
References colour, DBGC, EEFI, efi_systab, rc, EFI_BOOT_SERVICES::Stall, and strerror().
Referenced by __timer().
|
static |
Get current system time in ticks.
| ticks | Current time, in ticks |
Definition at line 79 of file efi_timer.c.
References 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.
Referenced by __timer().
Timer tick.
| event | Timer tick event |
| context | Event context |
Definition at line 153 of file efi_timer.c.
References __unused, EFI_EVENT, efi_jiffies, and EFIAPI.
Referenced by efi_tick_startup().
|
static |
Start timer tick.
Definition at line 164 of file efi_timer.c.
References 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.
Referenced by __startup_fn().
|
static |
Stop timer tick.
| booting | System is shutting down in order to boot |
Definition at line 198 of file efi_timer.c.
References __unused, EFI_BOOT_SERVICES::CloseEvent, colour, DBGC, EEFI, efi_systab, efi_tick_event, rc, EFI_BOOT_SERVICES::SetTimer, strerror(), and TimerCancel.
Referenced by __startup_fn().
| struct startup_fn efi_tick_startup_fn __startup_fn | ( | STARTUP_EARLY | ) |
Timer tick startup function.
References __startup_fn, efi_tick_shutdown(), efi_tick_startup(), and STARTUP_EARLY.
| struct timer efi_timer __timer | ( | TIMER_NORMAL | ) |
EFI timer.
References __timer, efi_currticks(), efi_udelay(), and TIMER_NORMAL.
|
static |
Current tick count.
Definition at line 48 of file efi_timer.c.
Referenced by efi_currticks(), and efi_tick().
|
static |
Timer tick event.
Definition at line 51 of file efi_timer.c.
Referenced by efi_tick_shutdown(), and efi_tick_startup().