]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: key PMBA setup in Platform PEI off of PMREGMISC/PMIOSE, not Xen
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 12 Sep 2012 07:19:28 +0000 (07:19 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 12 Sep 2012 07:19:28 +0000 (07:19 +0000)
This matches the logic in AcpiTimerLib.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13723 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/PlatformPei/Platform.c

index ce149e4f979e2c6589fa383ebc2b4232e9df99dc..e7486b7b7303e54c9f209010b92a45d8e76f0633 100644 (file)
@@ -214,7 +214,7 @@ MemMapInitialization (
 \r
 VOID\r
 MiscInitialization (\r
-  BOOLEAN Xen\r
+  VOID\r
   )\r
 {\r
   //\r
@@ -227,7 +227,12 @@ MiscInitialization (
   //\r
   BuildCpuHob (36, 16);\r
 \r
-  if (!Xen) {\r
+  //\r
+  // If PMREGMISC/PMIOSE is set, assume the ACPI PMBA has been configured (for\r
+  // example by Xen) and skip the setup here. This matches the logic in\r
+  // AcpiTimerLibConstructor ().\r
+  //\r
+  if ((PciRead8 (PCI_LIB_ADDRESS (0, 1, 3, 0x80)) & 0x01) == 0) {\r
     //\r
     // The PEI phase should be exited with fully accessibe PIIX4 IO space:\r
     // 1. set PMBA\r
@@ -331,9 +336,7 @@ InitializePlatform (
   IN CONST EFI_PEI_SERVICES     **PeiServices\r
   )\r
 {\r
-  EFI_STATUS            Status;\r
   EFI_PHYSICAL_ADDRESS  TopOfMemory;\r
-  BOOLEAN               Xen;\r
 \r
   DEBUG ((EFI_D_ERROR, "Platform PEIM Loaded\n"));\r
 \r
@@ -341,8 +344,7 @@ InitializePlatform (
 \r
   TopOfMemory = MemDetect ();\r
 \r
-  Status = InitializeXen ();\r
-  Xen = EFI_ERROR (Status) ? FALSE : TRUE;\r
+  InitializeXen ();\r
 \r
   ReserveEmuVariableNvStore ();\r
 \r
@@ -350,7 +352,7 @@ InitializePlatform (
 \r
   MemMapInitialization (TopOfMemory);\r
 \r
-  MiscInitialization (Xen);\r
+  MiscInitialization ();\r
 \r
   BootModeInitialization ();\r
 \r