]> xenbits.xensource.com Git - people/liuw/ovmf.git/commitdiff
OvmfPkg: enable Xen specific path v3
authorWei Liu <wei.liu2@citrix.com>
Tue, 26 Nov 2013 18:25:17 +0000 (18:25 +0000)
committerWei Liu <wei.liu2@citrix.com>
Tue, 26 Nov 2013 19:06:23 +0000 (19:06 +0000)
This patch sets PcdPciDisableBusEnumeration to true then makes use of
PublishPeiMemory and XenMemMapInitialization to construct memory map for
Xen guest.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
OvmfPkg/OvmfPkgIa32.dsc
OvmfPkg/OvmfPkgIa32X64.dsc
OvmfPkg/OvmfPkgX64.dsc
OvmfPkg/PlatformPei/Platform.c
OvmfPkg/PlatformPei/PlatformPei.inf

index 760bd4106947fef83bb22af26d3d262a5ab7ef99..d4851ed5ad64277d84a6c83d0c0dc9eb45d54540 100644 (file)
 !else\r
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
 !endif\r
-  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
+  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf\r
 \r
 [LibraryClasses.common.DXE_DRIVER]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|FALSE\r
 \r
 \r
 ################################################################################\r
   MdeModulePkg/Core/Pei/PeiMain.inf\r
   MdeModulePkg/Universal/PCD/Pei/Pcd.inf  {\r
     <LibraryClasses>\r
-      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
+      PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
   }\r
   IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf\r
   MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf\r
index 268d722fde4f12ce0f96dcc487cabb4e27d75d2e..d9072e71ae4e93014cf6922fac36ce234eb8bf80 100644 (file)
 !else\r
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
 !endif\r
-  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
+  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf\r
 \r
 [LibraryClasses.common.DXE_DRIVER]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|FALSE\r
 \r
 \r
 ################################################################################\r
   MdeModulePkg/Core/Pei/PeiMain.inf\r
   MdeModulePkg/Universal/PCD/Pei/Pcd.inf  {\r
     <LibraryClasses>\r
-      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
+      PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
   }\r
   IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf\r
   MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf\r
index 53945d0bb389fb4677ee28b2374e14643507a7a9..71b178e4cf17e374652f70db6432867edb1a23a8 100644 (file)
 !else\r
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
 !endif\r
-  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
+  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf\r
 \r
 [LibraryClasses.common.DXE_DRIVER]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|FALSE\r
 \r
 \r
 ################################################################################\r
   MdeModulePkg/Core/Pei/PeiMain.inf\r
   MdeModulePkg/Universal/PCD/Pei/Pcd.inf  {\r
     <LibraryClasses>\r
-      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
+      PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
   }\r
   IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf\r
   MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf\r
index c2e7ba99ff16c500502c936f0daf39afc50e6d2e..8daf9f4fbd0228afb8f572b3d4d01b3b53b65821 100644 (file)
@@ -416,7 +416,11 @@ InitializePlatform (
 \r
   XenLeaf = XenDetect ();\r
 \r
-  TopOfMemory = MemDetect ();\r
+  if (XenLeaf != 0) {\r
+    PublishPeiMemory ();\r
+    PcdSetBool (PcdPciDisableBusEnumeration, TRUE);\r
+  } else\r
+    TopOfMemory = MemDetect ();\r
 \r
   if (XenLeaf != 0) {\r
     DEBUG ((EFI_D_INFO, "Xen was detected\n"));\r
@@ -427,7 +431,10 @@ InitializePlatform (
 \r
   PeiFvInitialization ();\r
 \r
-  MemMapInitialization (TopOfMemory);\r
+  if (XenLeaf != 0)\r
+    XenMemMapInitialization ();\r
+  else\r
+    MemMapInitialization (TopOfMemory);\r
 \r
   MiscInitialization ();\r
 \r
index 3d5cbbbc2b59dd1bcd3629ff89e5378d3cb61156..7fe9d471cb8f816be7cd03499ed213215cb4e954 100644 (file)
@@ -65,6 +65,7 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration\r
   gUefiCpuPkgTokenSpaceGuid.PcdCpuLocalApicBaseAddress\r
 \r
 [Ppis]\r