iPXE
|
BIOS timer. More...
Go to the source code of this file.
Macros | |
#define | BIOS_TICKS_PER_DAY 0x1800b0 |
Number of ticks per day. More... | |
#define | TICKS_PER_BIOS_TICK ( ( TICKS_PER_SEC * 60 * 60 * 24 ) / BIOS_TICKS_PER_DAY ) |
Number of ticks per BIOS tick. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static unsigned long | bios_currticks (void) |
Get current system time in ticks. More... | |
struct timer bios_timer | __timer (TIMER_NORMAL) |
BIOS timer. More... | |
BIOS timer.
Definition in file bios_timer.c.
#define BIOS_TICKS_PER_DAY 0x1800b0 |
Number of ticks per day.
This seems to be the normative value, as used by e.g. SeaBIOS to decide when to set the midnight rollover flag.
Definition at line 42 of file bios_timer.c.
#define TICKS_PER_BIOS_TICK ( ( TICKS_PER_SEC * 60 * 60 * 24 ) / BIOS_TICKS_PER_DAY ) |
Number of ticks per BIOS tick.
Definition at line 45 of file bios_timer.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Get current system time in ticks.
ticks | Current time, in ticks |
Use direct memory access to BIOS variables, longword 0040:006C (ticks today) and byte 0040:0070 (midnight crossover flag) instead of calling timeofday BIOS interrupt.
Definition at line 57 of file bios_timer.c.
References __asm__(), __volatile__(), BDA_MIDNIGHT, BDA_SEG, BDA_TICKS, BIOS_TICKS_PER_DAY, get_real, offset, put_real, and TICKS_PER_BIOS_TICK.
struct timer bios_timer __timer | ( | TIMER_NORMAL | ) |
BIOS timer.