audk/ArmPkg/Include/Library
Ard Biesheuvel 734bd6cc41 ArmPkg/ArmLib: remove indirection layer from timer register accessors
The generic timer support libraries call the actual system register
accessor function via a single pair of functions ArmArchTimerReadReg()
and ArmArchTimerWriteReg(), which take an enum argument to identify
the register, and return output values by pointer reference.

Since these functions are never called with a non-immediate argument,
we can simply replace each invocation with the underlying system register
accessor instead. This is mostly functionally equivalent, with the
exception of the bounds check for the enum (which is pointless given the
fact that we never pass a variable), the check for the presence of the
architected timer (which only makes sense for ARMv7, but is highly unlikely
to vary between platforms that are similar enough to run the same firmware
image), and a check for enum values that refer to the HYP view of the timer,
which we never referred to anywhere in the code in the first place.

So get rid of the middle man, and update the ArmGenericTimerPhyCounterLib
and ArmGenericTimerVirtCounterLib implementations to call the system
register accessors directly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
2017-01-20 15:51:34 +00:00
..
ArmCpuLib.h ARM Packages: Fixed line endings 2013-01-25 11:28:06 +00:00
ArmDisassemblerLib.h ARM Packages: Removed trailing spaces 2014-08-19 13:29:52 +00:00
ArmGenericTimerCounterLib.h ArmPkg: add ArmGenericTimerCounterLib interface 2014-09-09 16:04:39 +00:00
ArmGicArchLib.h ArmPkg: split off ArmGicArchLib from ArmGicLib 2015-07-28 20:44:44 +00:00
ArmGicLib.h ArmPkg/ArmGicV3Dxe: configure all interrupts as non-secure Group-1 2016-06-23 16:16:00 +02:00
ArmHvcLib.h ArmPkg: Add ArmHvcLib 2014-09-10 18:46:23 +00:00
ArmLib.h ArmPkg/ArmLib: remove indirection layer from timer register accessors 2017-01-20 15:51:34 +00:00
ArmMmuLib.h ArmPkg: introduce ArmMmuLib library class 2016-07-07 14:33:47 +02:00
ArmSmcLib.h ArmPkg/ArmSmcLib: Fixed SMC helper functions 2014-08-04 14:18:13 +00:00
BdsLib.h ArmPkg/BdsLib: Remove Linux loader from BdsLib 2015-07-14 14:35:20 +00:00
DefaultExceptionHandlerLib.h ARM Packages: Removed trailing spaces 2014-08-19 13:29:52 +00:00
SemihostLib.h ArmPkg/SemihostLib: Add library functions 2014-10-27 10:38:18 +00:00
UncachedMemoryAllocationLib.h ARM Packages: Removed trailing spaces 2014-08-19 13:29:52 +00:00