audk/ArmPkg/Include
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
..
Chipset ArmPkg/ArmLib: remove indirection layer from timer register accessors 2017-01-20 15:51:34 +00:00
Guid ARM Packages: Replace tabs by spaces for indentation 2014-08-26 10:14:17 +00:00
IndustryStandard ArmPkg: Add PSCI 0.2 constants for system poweroff and reset 2014-09-10 18:45:08 +00:00
Library ArmPkg/ArmLib: remove indirection layer from timer register accessors 2017-01-20 15:51:34 +00:00
Ppi ArmPkg/ArmMpCoreInfo.h: Fixed macro definition 2013-12-10 16:37:10 +00:00
Protocol ARM Packages: Removed trailing spaces 2014-08-19 13:29:52 +00:00
AsmMacroExport.inc ArmPkg RVCT: add asm macro combining EXPORT, AREA and label definition 2015-12-02 16:23:20 +00:00
AsmMacroIoLib.h ArmPkg: remove LoadConstantXxx() asm macros 2016-10-28 16:26:15 +01:00
AsmMacroIoLib.inc ArmPkg: remove LoadConstantXxx() asm macros 2016-10-28 16:26:15 +01:00
AsmMacroIoLibV8.h ArmPkg: remove LoadConstantXxx() asm macros 2016-10-28 16:26:15 +01:00