1 #ifndef _GPXE_BIOS_TIMER_H
2 #define _GPXE_BIOS_TIMER_H
11 #define TIMER_PREFIX_pcbios
13 #define TIMER_PREFIX_pcbios __pcbios_
16 #include <gpxe/timer2.h>
19 * Delay for a fixed number of microseconds
21 * @v usecs Number of microseconds for which to delay
23 static inline __always_inline void
24 TIMER_INLINE ( pcbios, udelay ) ( unsigned long usecs ) {
25 /* BIOS timer is not high-resolution enough for udelay(), so
28 timer2_udelay ( usecs );
32 * Get number of ticks per second
34 * @ret ticks_per_sec Number of ticks per second
36 static inline __always_inline unsigned long
37 TIMER_INLINE ( pcbios, ticks_per_sec ) ( void ) {
38 /* BIOS timer ticks over at 18.2 ticks per second */
42 #endif /* _GPXE_BIOS_TIMER_H */