]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/OvmfXen: make "PcdPciDisableBusEnumeration" Fixed-at-Build
authorLaszlo Ersek <lersek@redhat.com>
Wed, 26 May 2021 20:14:22 +0000 (22:14 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 4 Jun 2021 16:01:50 +0000 (16:01 +0000)
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>
OvmfPkg/OvmfXen.dsc
OvmfPkg/XenPlatformPei/Platform.c
OvmfPkg/XenPlatformPei/Platform.h
OvmfPkg/XenPlatformPei/Xen.c
OvmfPkg/XenPlatformPei/XenPlatformPei.inf

index bcf64242d05c884efb5c9e29ec95dc167b38185a..779bcc3f8b9a91042d7c7d727ca53023a77ac382 100644 (file)
 !endif\r
 \r
 [PcdsFixedAtBuild]\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE\r
   gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable|FALSE\r
index e9511eb40c62cc9161f9ea6f71413df2d46b7a5e..a811e72ee3018d26f0794838149de8d8cbdc7afd 100644 (file)
@@ -447,7 +447,6 @@ InitializeXenPlatform (
 \r
   InitializeRamRegions ();\r
 \r
-  InitializeXen ();\r
   CalibrateLapicTimer ();\r
 \r
   if (mBootMode != BOOT_ON_S3_RESUME) {\r
index 77d88fc159d7f0824f09b169838853b4ac529c7b..67887c9c4cd90fc4e30374b8915a7d07fd5c07fb 100644 (file)
@@ -91,11 +91,6 @@ XenConnect (
   VOID\r
   );\r
 \r
-EFI_STATUS\r
-InitializeXen (\r
-  VOID\r
-  );\r
-\r
 BOOLEAN\r
 XenDetect (\r
   VOID\r
index cf14ee8eb3a05cc3cde37004e22ef5f871f47692..a4e82b356936e83de96c1ec580288d2ce1b864a2 100644 (file)
@@ -372,26 +372,6 @@ XenPublishRamRegions (
 }\r
 \r
 \r
-/**\r
-  Perform Xen PEI initialization.\r
-\r
-  @return EFI_SUCCESS     Xen initialized successfully\r
-  @return EFI_NOT_FOUND   Not running under Xen\r
-\r
-**/\r
-EFI_STATUS\r
-InitializeXen (\r
-  VOID\r
-  )\r
-{\r
-  RETURN_STATUS PcdStatus;\r
-\r
-  PcdStatus = PcdSetBoolS (PcdPciDisableBusEnumeration, TRUE);\r
-  ASSERT_RETURN_ERROR (PcdStatus);\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
 EFI_STATUS\r
 PhysicalAddressIdentityMapping (\r
   IN EFI_PHYSICAL_ADDRESS   AddressToMap\r
index 87dd4b24679a48249abe0aacc0f48a67e01fed17..597cb6fcd7ff91fe516301e0e55dacf5e3bebc1c 100644 (file)
@@ -81,7 +81,6 @@
   gUefiOvmfPkgTokenSpaceGuid.PcdQ35TsegMbytes\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrMask\r