summaryrefslogtreecommitdiff
path: root/OvmfPkg/OvmfXen.dsc
diff options
context:
space:
mode:
authorAnthony PERARD <anthony.perard@citrix.com>2021-04-12 14:30:03 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-04-13 11:54:58 +0000
commit71cdb91f313380152d7bf38cfeebe76f5b2d39ac (patch)
tree551cd8bf2f74054f862e4c26386ff065203f6a4f /OvmfPkg/OvmfXen.dsc
parentc75c6405128e7c3f9cddb05180d55301f4d891a3 (diff)
downloadedk2-71cdb91f313380152d7bf38cfeebe76f5b2d39ac.zip
edk2-71cdb91f313380152d7bf38cfeebe76f5b2d39ac.tar.gz
edk2-71cdb91f313380152d7bf38cfeebe76f5b2d39ac.tar.bz2
OvmfPkg/OvmfXen: Set PcdFSBClock
Update gEfiMdePkgTokenSpaceGuid.PcdFSBClock so it can have the correct value when SecPeiDxeTimerLibCpu start to use it for the APIC timer. Currently, nothing appear to use the value in PcdFSBClock before XenPlatformPei had a chance to set it even though TimerLib is included in modules run before XenPlatformPei. XenPlatformPei doesn't use any of the functions that would use that value. No other modules in the PEI phase seems to use the TimerLib before PcdFSBClock is set. There are currently two other modules in the PEI phase that needs the TimerLib: - S3Resume2Pei, but only because LocalApicLib needs it, but nothing is using the value from PcdFSBClock. - CpuMpPei, but I believe it only runs after XenPlatformPei Before the PEI phase, there's the SEC phase, and SecMain needs TimerLib because of LocalApicLib. And it initialise the APIC timers for the debug agent. But I don't think any of the DebugLib that OvmfXen could use are actually using the *Delay functions in TimerLib, and so would not use the value from PcdFSBClock which would be uninitialised. A simple runtime test showed that TimerLib doesn't use PcdFSBClock value before it is set. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2490 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20210412133003.146438-8-anthony.perard@citrix.com> [lersek@redhat.com: cast Freq to UINT32 for PcdSet32S(), not for ASSERT()]
Diffstat (limited to 'OvmfPkg/OvmfXen.dsc')
-rw-r--r--OvmfPkg/OvmfXen.dsc4
1 files changed, 1 insertions, 3 deletions
diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
index 86abe27..e535503 100644
--- a/OvmfPkg/OvmfXen.dsc
+++ b/OvmfPkg/OvmfXen.dsc
@@ -447,9 +447,6 @@
# Point to the MdeModulePkg/Application/UiApp/UiApp.inf
gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
- ## Xen vlapic's frequence is 100 MHz
- gEfiMdePkgTokenSpaceGuid.PcdFSBClock|100000000
-
# We populate DXE IPL tables with 1G pages preferably on Xen
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE
@@ -476,6 +473,7 @@
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base|0x0
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size|0x800000000
+ gEfiMdePkgTokenSpaceGuid.PcdFSBClock|100000000
gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0
# Set video resolution for text setup.