From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org
Cc: leif.lindholm@linaro.org, lersek@redhat.com,
julien.grall@arm.com, Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH 1/2] ArmPkg: add reenable hook to ArmGenericTimerCounterLib
Date: Mon, 23 Apr 2018 17:00:56 +0200 [thread overview]
Message-ID: <20180423150057.13515-2-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <20180423150057.13515-1-ard.biesheuvel@linaro.org>
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>
---
ArmPkg/Drivers/TimerDxe/TimerDxe.c | 1 +
ArmPkg/Include/Library/ArmGenericTimerCounterLib.h | 6 ++++++
ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.c | 8 ++++++++
ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c | 8 ++++++++
4 files changed, 23 insertions(+)
diff --git a/ArmPkg/Drivers/TimerDxe/TimerDxe.c b/ArmPkg/Drivers/TimerDxe/TimerDxe.c
index bd616d2efc73..478f1bece565 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 805025baa14b..47e28b79c033 100644
--- a/ArmPkg/Include/Library/ArmGenericTimerCounterLib.h
+++ b/ArmPkg/Include/Library/ArmGenericTimerCounterLib.h
@@ -22,6 +22,12 @@ ArmGenericTimerEnableTimer (
VOID
);
+VOID
+EFIAPI
+ArmGenericTimerReenableTimer (
+ VOID
+ );
+
VOID
EFIAPI
ArmGenericTimerDisableTimer (
diff --git a/ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.c b/ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.c
index d04e04fb334d..03519f50e79a 100644
--- a/ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.c
+++ b/ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.c
@@ -29,6 +29,14 @@ ArmGenericTimerEnableTimer (
ArmWriteCntpCtl (TimerCtrlReg);
}
+VOID
+EFIAPI
+ArmGenericTimerReenableTimer (
+ VOID
+ )
+{
+}
+
VOID
EFIAPI
ArmGenericTimerDisableTimer (
diff --git a/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c b/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c
index c941895a3574..4bb1e1cde538 100644
--- a/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c
+++ b/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c
@@ -29,6 +29,14 @@ ArmGenericTimerEnableTimer (
ArmWriteCntvCtl (TimerCtrlReg);
}
+VOID
+EFIAPI
+ArmGenericTimerReenableTimer (
+ VOID
+ )
+{
+}
+
VOID
EFIAPI
ArmGenericTimerDisableTimer (
--
2.17.0
next prev parent reply other threads:[~2018-04-23 15:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-23 15:00 [PATCH 0/2] Reenable timer mask quirk for Xen Ard Biesheuvel
2018-04-23 15:00 ` Ard Biesheuvel [this message]
2018-04-23 15:00 ` [PATCH 2/2] ArmVirtPkg: reinstate timer unmask " Ard Biesheuvel
2018-04-23 16:57 ` [PATCH 0/2] Reenable timer mask " Leif Lindholm
2018-04-23 18:52 ` Laszlo Ersek
2018-04-25 17:26 ` Julien Grall
2018-04-26 6:33 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180423150057.13515-2-ard.biesheuvel@linaro.org \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox