audk/ArmPkg/Drivers
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 ArmPkg/ArmCortexA9Lib RVCT: remove incompatible GCC include 2016-10-28 10:24:24 +01:00
ArmGic ArmPkg/ArmGicLib: use correct loop variable 2016-09-09 16:56:38 +01:00
ArmPciCpuIo2Dxe ArmPkg: implement CpuIo2 protocol driver specific for PCI 2016-04-29 18:04:25 +02:00
CpuDxe ArmPkg/CpuDxe: set DmaBufferAlignment according to CWG 2016-11-02 16:22:48 +00:00
CpuPei ArmPkg: Rectify file modes 2016-01-30 12:25:59 +00:00
GenericWatchdogDxe
TimerDxe ArmPkg/ArmLib: remove indirection layer from timer register accessors 2017-01-20 15:51:34 +00:00