]> git.proxmox.com Git - mirror_edk2.git/commitdiff
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 bd616d2efc732b384c697e3bc567648cbc473b74..478f1bece565aa8e764e4201ca675eac01ba53ba 100644 (file)
@@ -337,6 +337,7 @@ TimerInterruptHandler (
 \r
     // Set next compare value\r
     ArmGenericTimerSetCompareVal (CompareValue);\r
 \r
     // Set next compare value\r
     ArmGenericTimerSetCompareVal (CompareValue);\r
+    ArmGenericTimerReenableTimer ();\r
     ArmInstructionSynchronizationBarrier ();\r
   }\r
 \r
     ArmInstructionSynchronizationBarrier ();\r
   }\r
 \r
index 805025baa14b4f31546dec9549f2ef6021d2b948..47e28b79c033338b39f820be57c9fc99b6d34fad 100644 (file)
@@ -22,6 +22,12 @@ ArmGenericTimerEnableTimer (
   VOID\r
   );\r
 \r
   VOID\r
   );\r
 \r
+VOID\r
+EFIAPI\r
+ArmGenericTimerReenableTimer (\r
+  VOID\r
+  );\r
+\r
 VOID\r
 EFIAPI\r
 ArmGenericTimerDisableTimer (\r
 VOID\r
 EFIAPI\r
 ArmGenericTimerDisableTimer (\r
index d04e04fb334dd3299acde576a372ca3bb54a3225..03519f50e79a7c0cbc8ac85c9a653fb7842ea0bd 100644 (file)
@@ -29,6 +29,14 @@ ArmGenericTimerEnableTimer (
   ArmWriteCntpCtl (TimerCtrlReg);\r
 }\r
 \r
   ArmWriteCntpCtl (TimerCtrlReg);\r
 }\r
 \r
+VOID\r
+EFIAPI\r
+ArmGenericTimerReenableTimer (\r
+  VOID\r
+  )\r
+{\r
+}\r
+\r
 VOID\r
 EFIAPI\r
 ArmGenericTimerDisableTimer (\r
 VOID\r
 EFIAPI\r
 ArmGenericTimerDisableTimer (\r
index c941895a3574b0246a8718e3ee3ef02db664deda..4bb1e1cde5384a1ad25a68affeecad4e34e512bb 100644 (file)
@@ -29,6 +29,14 @@ ArmGenericTimerEnableTimer (
   ArmWriteCntvCtl (TimerCtrlReg);\r
 }\r
 \r
   ArmWriteCntvCtl (TimerCtrlReg);\r
 }\r
 \r
+VOID\r
+EFIAPI\r
+ArmGenericTimerReenableTimer (\r
+  VOID\r
+  )\r
+{\r
+}\r
+\r
 VOID\r
 EFIAPI\r
 ArmGenericTimerDisableTimer (\r
 VOID\r
 EFIAPI\r
 ArmGenericTimerDisableTimer (\r