Skip to content
Browse files
[efi] Use a timer event to generate the currticks() timer
We currently use the EFI_CPU_ARCH_PROTOCOL's GetTimerValue() method to
generate the currticks() timer, calibrated against a 1ms delay from
the boot services Stall() method.

This does not work on ARM platforms, where GetTimerValue() is an empty
stub which just returns EFI_UNSUPPORTED.

Fix by instead creating a periodic timer event, and using this event
to increment a current tick counter.

Signed-off-by: Michael Brown <>
  • Loading branch information
mcb30 committed May 4, 2016
1 parent 1e06643 commit 757ab983811ac8d3f65efb65b8309738bd33bea3
Showing 3 changed files with 86 additions and 352 deletions.

This file was deleted.

@@ -15,4 +15,22 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define TIMER_PREFIX_efi __efi_

* Number of ticks per second
* This is a policy decision.
#define EFI_TICKS_PER_SEC 20

* Get number of ticks per second
* @ret ticks_per_sec Number of ticks per second
static inline __attribute__ (( always_inline )) unsigned long
TIMER_INLINE ( efi, ticks_per_sec ) ( void ) {


#endif /* _IPXE_EFI_TIMER_H */

0 comments on commit 757ab98

Please sign in to comment.