From: "Rebecca Cran" <quic_rcran@quicinc.com>
To: <devel@edk2.groups.io>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
"Thomas Abraham" <thomas.abraham@arm.com>,
Sami Mujawar <sami.mujawar@arm.com>
Cc: Rebecca Cran <rebecca@quicinc.com>
Subject: [PATCH edk2-platforms 1/3] Platform/ARM/JunoPkg: Switch to MdeModulePkg/Universal/Metronome driver
Date: Tue, 29 Nov 2022 06:53:56 -0700 [thread overview]
Message-ID: <20221129135358.136555-2-rebecca@quicinc.com> (raw)
In-Reply-To: <20221129135358.136555-1-rebecca@quicinc.com>
The MetronomeDxe driver uses the PCD PcdMetronomeTickPeriod to calculate
how many ticks to wait in MicroSecondDelay. Given that the timer clock
on Juno runs at 50 MHz, it ticks every 20 ns; therefore, a setting of
1000 is wrong: for example it causes a call to gBS->Stall (1) to take
10 us.
The driver in MdeModulePkg/Universal/Metronome assumes the clock ticks
at least every 100 ns, which is the minimum allowed by the Metronome
protocol. Since that's the case on Juno, switch from
EmbeddedPkg/MetronomeDxe to MdeModulePkg/Universal/Metronome.
Signed-off-by: Rebecca Cran <rebecca@quicinc.com>
---
Platform/ARM/JunoPkg/ArmJuno.dsc | 3 +--
Platform/ARM/JunoPkg/ArmJuno.fdf | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/Platform/ARM/JunoPkg/ArmJuno.dsc b/Platform/ARM/JunoPkg/ArmJuno.dsc
index a00b866c5e9a..9cde4c862651 100644
--- a/Platform/ARM/JunoPkg/ArmJuno.dsc
+++ b/Platform/ARM/JunoPkg/ArmJuno.dsc
@@ -189,7 +189,6 @@ [PcdsFixedAtBuild.common]
# ARM Architectural Timer Frequency
#
gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|50000000
- gEmbeddedTokenSpaceGuid.PcdMetronomeTickPeriod|1000
gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
@@ -248,10 +247,10 @@ [Components.common]
MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
+ MdeModulePkg/Universal/Metronome/Metronome.inf
MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
- EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
diff --git a/Platform/ARM/JunoPkg/ArmJuno.fdf b/Platform/ARM/JunoPkg/ArmJuno.fdf
index fca5a78cee6c..836d3cde8781 100644
--- a/Platform/ARM/JunoPkg/ArmJuno.fdf
+++ b/Platform/ARM/JunoPkg/ArmJuno.fdf
@@ -96,10 +96,10 @@ [FV.FvMain]
INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
+ INF MdeModulePkg/Universal/Metronome/Metronome.inf
INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
- INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
--
2.30.2
next prev parent reply other threads:[~2022-11-29 13:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-29 13:53 [PATCH edk2-platforms 0/3] Platform/ARM/JunoPkg: Timer fixes Rebecca Cran
2022-11-29 13:53 ` Rebecca Cran [this message]
2022-11-29 13:53 ` [PATCH edk2-platforms 2/3] Platform/ARM/JunoPkg: Override PcdTimerPeriod to be 10000 Rebecca Cran
2022-12-05 9:22 ` [edk2-devel] " PierreGondois
2022-12-05 11:48 ` Rebecca Cran
2022-11-29 13:53 ` [PATCH edk2-platforms 3/3] Platform/ARM/JunoPkg: Set PcdArmArchTimerFreqInHz to 0 to read from CNTFRQ_EL0 Rebecca Cran
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=20221129135358.136555-2-rebecca@quicinc.com \
--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