[efi] Use a timer event to generate the currticks() timer
authorMichael Brown <mcb30@ipxe.org>
Wed, 4 May 2016 12:04:33 +0000 (13:04 +0100)
committerMichael Brown <mcb30@ipxe.org>
Wed, 4 May 2016 12:38:33 +0000 (13:38 +0100)
commit757ab983811ac8d3f65efb65b8309738bd33bea3
tree68e07447d247633a7f25cd85f3df1c59f3b8dada
parent1e066431a45a67321abcd134e888205fc633bd41
[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 <mcb30@ipxe.org>
src/include/ipxe/efi/Protocol/Cpu.h [deleted file]
src/include/ipxe/efi/efi_timer.h
src/interface/efi/efi_timer.c