audk/ArmPkg/Include/Chipset
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
..
AArch64.h ArmPkg/ArmLib: remove indirection layer from timer register accessors 2017-01-20 15:51:34 +00:00
AArch64Mmu.h ArmPkg/ArmMmuLib: avoid type promotion in TCR_EL1 assignment 2016-07-13 12:38:48 +02:00
ArmCortexA5x.h ArmPkg/ArmCortexA5x: Declared the helper functions to access the CPU Extended Control Register 2014-03-26 19:32:48 +00:00
ArmCortexA9.h ArmPkg: Introduce ArmCpuLib to abstract ARM Cpu specific initialization (2) 2011-09-27 16:26:03 +00:00
ArmV7.h ArmPkg/ArmLib: remove indirection layer from timer register accessors 2017-01-20 15:51:34 +00:00
ArmV7Mmu.h ArmPkg/ArmV7Lib: take MP extensions into account when programming TTBR 2015-11-18 15:59:59 +00:00