summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/XenPlatformPei
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2021-05-26 22:14:22 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-06-04 16:01:50 +0000
commite7641171b6c1f858f3d979c0e8f04d6c12870baa (patch)
treeded461276d136e8a596a9b836271f2a3f4d2e3a1 /OvmfPkg/XenPlatformPei
parentd491c88a0c8bec7a0c8b51e0c7d1f8dc102cfa40 (diff)
downloadedk2-e7641171b6c1f858f3d979c0e8f04d6c12870baa.tar.gz
edk2-e7641171b6c1f858f3d979c0e8f04d6c12870baa.tar.bz2
edk2-e7641171b6c1f858f3d979c0e8f04d6c12870baa.zip
OvmfPkg/OvmfXen: make "PcdPciDisableBusEnumeration" Fixed-at-Build
The OvmfXen platform specifies the dynamic access method for "PcdPciDisableBusEnumeration" needlessly. After the DSC file sets the PCD to TRUE by default, the InitializeXen() function in XenPlatformPei superfluously sets the PCD to TRUE again. There are no other writes to the PCD in the platform. Make the PCD Fixed-At-Build, and remove the access (in fact, the whole InitializeXen() function) from XenPlatformPei. Cc: Anthony Perard <anthony.perard@citrix.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Julien Grall <julien@xen.org> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20210526201446.12554-20-lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'OvmfPkg/XenPlatformPei')
-rw-r--r--OvmfPkg/XenPlatformPei/Platform.c1
-rw-r--r--OvmfPkg/XenPlatformPei/Platform.h5
-rw-r--r--OvmfPkg/XenPlatformPei/Xen.c20
-rw-r--r--OvmfPkg/XenPlatformPei/XenPlatformPei.inf1
4 files changed, 0 insertions, 27 deletions
diff --git a/OvmfPkg/XenPlatformPei/Platform.c b/OvmfPkg/XenPlatformPei/Platform.c
index e9511eb40c..a811e72ee3 100644
--- a/OvmfPkg/XenPlatformPei/Platform.c
+++ b/OvmfPkg/XenPlatformPei/Platform.c
@@ -447,7 +447,6 @@ InitializeXenPlatform (
InitializeRamRegions ();
- InitializeXen ();
CalibrateLapicTimer ();
if (mBootMode != BOOT_ON_S3_RESUME) {
diff --git a/OvmfPkg/XenPlatformPei/Platform.h b/OvmfPkg/XenPlatformPei/Platform.h
index 77d88fc159..67887c9c4c 100644
--- a/OvmfPkg/XenPlatformPei/Platform.h
+++ b/OvmfPkg/XenPlatformPei/Platform.h
@@ -91,11 +91,6 @@ XenConnect (
VOID
);
-EFI_STATUS
-InitializeXen (
- VOID
- );
-
BOOLEAN
XenDetect (
VOID
diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c
index cf14ee8eb3..a4e82b3569 100644
--- a/OvmfPkg/XenPlatformPei/Xen.c
+++ b/OvmfPkg/XenPlatformPei/Xen.c
@@ -372,26 +372,6 @@ XenPublishRamRegions (
}
-/**
- Perform Xen PEI initialization.
-
- @return EFI_SUCCESS Xen initialized successfully
- @return EFI_NOT_FOUND Not running under Xen
-
-**/
-EFI_STATUS
-InitializeXen (
- VOID
- )
-{
- RETURN_STATUS PcdStatus;
-
- PcdStatus = PcdSetBoolS (PcdPciDisableBusEnumeration, TRUE);
- ASSERT_RETURN_ERROR (PcdStatus);
-
- return EFI_SUCCESS;
-}
-
EFI_STATUS
PhysicalAddressIdentityMapping (
IN EFI_PHYSICAL_ADDRESS AddressToMap
diff --git a/OvmfPkg/XenPlatformPei/XenPlatformPei.inf b/OvmfPkg/XenPlatformPei/XenPlatformPei.inf
index 87dd4b2467..597cb6fcd7 100644
--- a/OvmfPkg/XenPlatformPei/XenPlatformPei.inf
+++ b/OvmfPkg/XenPlatformPei/XenPlatformPei.inf
@@ -81,7 +81,6 @@
gUefiOvmfPkgTokenSpaceGuid.PcdQ35TsegMbytes
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved
- gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable
gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrMask