ArmPkg: add reenable hook to ArmGenericTimerCounterLib
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 23 Apr 2018 14:47:18 +0000 (16:47 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 26 Apr 2018 06:31:12 +0000 (08:31 +0200)
In preparation of selectively reinstating the timer enable quirk for Xen
that we removed in commit 411a373ed642 ("ArmPkg/TimerDxe: remove workaround
for KVM timer handling"), add a ArmGenericTimerReenableTimer() library
function to ArmGenericTimerCounterLib that we will populate for Xen only.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Julien Grall <julien.grall@arm.com>
Acked-by: Julien Grall <julien.grall@arm.com>
ArmPkg/Drivers/TimerDxe/TimerDxe.c
ArmPkg/Include/Library/ArmGenericTimerCounterLib.h
ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.c
ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c

index bd616d2..478f1be 100644 (file)
@@ -337,6 +337,7 @@ TimerInterruptHandler (
 \r
     // Set next compare value\r
     ArmGenericTimerSetCompareVal (CompareValue);\r
+    ArmGenericTimerReenableTimer ();\r
     ArmInstructionSynchronizationBarrier ();\r
   }\r
 \r
index 805025b..47e28b7 100644 (file)
@@ -22,6 +22,12 @@ ArmGenericTimerEnableTimer (
   VOID\r
   );\r
 \r
+VOID\r
+EFIAPI\r
+ArmGenericTimerReenableTimer (\r
+  VOID\r
+  );\r
+\r
 VOID\r
 EFIAPI\r
 ArmGenericTimerDisableTimer (\r
index d04e04f..03519f5 100644 (file)
@@ -29,6 +29,14 @@ ArmGenericTimerEnableTimer (
   ArmWriteCntpCtl (TimerCtrlReg);\r
 }\r
 \r
+VOID\r
+EFIAPI\r
+ArmGenericTimerReenableTimer (\r
+  VOID\r
+  )\r
+{\r
+}\r
+\r
 VOID\r
 EFIAPI\r
 ArmGenericTimerDisableTimer (\r
index c941895..4bb1e1c 100644 (file)
@@ -29,6 +29,14 @@ ArmGenericTimerEnableTimer (
   ArmWriteCntvCtl (TimerCtrlReg);\r
 }\r
 \r
+VOID\r
+EFIAPI\r
+ArmGenericTimerReenableTimer (\r
+  VOID\r
+  )\r
+{\r
+}\r
+\r
 VOID\r
 EFIAPI\r
 ArmGenericTimerDisableTimer (\r