iPXE
|
ACPI power management timer. More...
#include <unistd.h>
#include <errno.h>
#include <assert.h>
#include <byteswap.h>
#include <ipxe/io.h>
#include <ipxe/acpi.h>
Go to the source code of this file.
Macros | |
#define | ACPI_TIMER_HZ 3579545 |
ACPI timer frequency (fixed 3.579545MHz) More... | |
#define | ACPI_TIMER_MASK 0x00ffffffUL |
ACPI timer mask. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
struct timer acpi_timer | __timer (TIMER_PREFERRED) |
ACPI timer. More... | |
static unsigned long | acpi_currticks (void) |
Get current system time in ticks. More... | |
static void | acpi_udelay (unsigned long usecs) |
Delay for a fixed number of microseconds. More... | |
static int | acpi_timer_probe (void) |
Probe ACPI power management timer. More... | |
Variables | |
static unsigned int | pm_tmr |
Power management timer register address. More... | |
ACPI power management timer.
Definition in file acpi_timer.c.
#define ACPI_TIMER_HZ 3579545 |
ACPI timer frequency (fixed 3.579545MHz)
Definition at line 40 of file acpi_timer.c.
#define ACPI_TIMER_MASK 0x00ffffffUL |
ACPI timer mask.
Timers may be implemented as either 24-bit or 32-bit counters. We simplify the code by pessimistically assuming that the timer has only 24 bits.
Definition at line 48 of file acpi_timer.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
struct timer acpi_timer __timer | ( | TIMER_PREFERRED | ) |
ACPI timer.
|
static |
Get current system time in ticks.
ticks | Current time, in ticks |
Definition at line 60 of file acpi_timer.c.
References ACPI_TIMER_HZ, ACPI_TIMER_MASK, inl(), offset, pm_tmr, and TICKS_PER_SEC.
|
static |
Delay for a fixed number of microseconds.
usecs | Number of microseconds for which to delay |
Definition at line 82 of file acpi_timer.c.
References ACPI_TIMER_HZ, ACPI_TIMER_MASK, inl(), pm_tmr, and start.
|
static |
Probe ACPI power management timer.
rc | Return status code |
Definition at line 104 of file acpi_timer.c.
References ACPI_PM_TMR, acpi_table(), copy_from_user(), DBGC, ENOENT, FADT_SIGNATURE, le32_to_cpu, pm_tmr, and acpi_fadt::pm_tmr_blk.
|
static |
Power management timer register address.
Definition at line 51 of file acpi_timer.c.
Referenced by acpi_currticks(), acpi_timer_probe(), and acpi_udelay().