summaryrefslogtreecommitdiffstats
path: root/ArmPkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2018-04-23 16:47:18 +0200
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2018-04-26 08:31:12 +0200
commit5853e2e45092ee49a88971ef0c5f97ac808ed47d (patch)
treee881c28834f7edc8fd9ad08eed2d85af7cddf8e3 /ArmPkg
parent1eb72acddd61ab30709076c5747204f3bf629178 (diff)
downloadedk2-5853e2e45092ee49a88971ef0c5f97ac808ed47d.tar.gz
edk2-5853e2e45092ee49a88971ef0c5f97ac808ed47d.tar.bz2
edk2-5853e2e45092ee49a88971ef0c5f97ac808ed47d.zip
ArmPkg: add reenable hook to ArmGenericTimerCounterLib
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>
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Drivers/TimerDxe/TimerDxe.c1
-rw-r--r--ArmPkg/Include/Library/ArmGenericTimerCounterLib.h6
-rw-r--r--ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.c8
-rw-r--r--ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c8
4 files changed, 23 insertions, 0 deletions
diff --git a/ArmPkg/Drivers/TimerDxe/TimerDxe.c b/ArmPkg/Drivers/TimerDxe/TimerDxe.c
index bd616d2efc..478f1bece5 100644
--- a/ArmPkg/Drivers/TimerDxe/TimerDxe.c
+++ b/ArmPkg/Drivers/TimerDxe/TimerDxe.c
@@ -337,6 +337,7 @@ TimerInterruptHandler (
// Set next compare value
ArmGenericTimerSetCompareVal (CompareValue);
+ ArmGenericTimerReenableTimer ();
ArmInstructionSynchronizationBarrier ();
}
diff --git a/ArmPkg/Include/Library/ArmGenericTimerCounterLib.h b/ArmPkg/Include/Library/ArmGenericTimerCounterLib.h
index 805025baa1..47e28b79c0 100644
--- a/ArmPkg/Include/Library/ArmGenericTimerCounterLib.h
+++ b/ArmPkg/Include/Library/ArmGenericTimerCounterLib.h
@@ -24,6 +24,12 @@ ArmGenericTimerEnableTimer (
VOID
EFIAPI
+ArmGenericTimerReenableTimer (
+ VOID
+ );
+
+VOID
+EFIAPI
ArmGenericTimerDisableTimer (
VOID
);
diff --git a/ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.c b/ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.c
index d04e04fb33..03519f50e7 100644
--- a/ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.c
+++ b/ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.c
@@ -31,6 +31,14 @@ ArmGenericTimerEnableTimer (
VOID
EFIAPI
+ArmGenericTimerReenableTimer (
+ VOID
+ )
+{
+}
+
+VOID
+EFIAPI
ArmGenericTimerDisableTimer (
VOID
)
diff --git a/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c b/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c
index c941895a35..4bb1e1cde5 100644
--- a/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c
+++ b/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c
@@ -31,6 +31,14 @@ ArmGenericTimerEnableTimer (
VOID
EFIAPI
+ArmGenericTimerReenableTimer (
+ VOID
+ )
+{
+}
+
+VOID
+EFIAPI
ArmGenericTimerDisableTimer (
VOID
)