Revision: 13723
          http://edk2.svn.sourceforge.net/edk2/?rev=13723&view=rev
Author:   jljusten
Date:     2012-09-12 07:19:28 +0000 (Wed, 12 Sep 2012)
Log Message:
-----------
OvmfPkg: key PMBA setup in Platform PEI off of PMREGMISC/PMIOSE, not Xen

This matches the logic in AcpiTimerLib.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>

Modified Paths:
--------------
    trunk/edk2/OvmfPkg/PlatformPei/Platform.c

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

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to