]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: include UefiCpuPkg/CpuMpPei
authorLaszlo Ersek <lersek@redhat.com>
Wed, 6 Jul 2016 16:09:16 +0000 (18:09 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Fri, 15 Jul 2016 05:38:55 +0000 (07:38 +0200)
In the next patch we're going to put EFI_PEI_MP_SERVICES_PPI to use.

CpuMpPei uses the following PCDs from gUefiCpuPkgTokenSpaceGuid, beyond
those already used by CpuDxe:

- PcdCpuMicrocodePatchAddress and PcdCpuMicrocodePatchRegionSize: these
  control whether CpuMpPei performs microcode update. If the region size
  is zero, then the microcode update is skipped. UefiCpuPkg.dec sets the
  region size to zero by default, which is appropriate for OVMF.

- PcdCpuApLoopMode and PcdCpuApTargetCstate: the former controls how
  CpuMpPei puts the APs to sleep: 1 -- HLT, 2 -- MWAIT, 3 -- busy wait
  (with PAUSE). The latter PCD is only relevant if the former PCD is 2
  (MWAIT). In order to be consistent with SeaBIOS and with CpuDxe itself,
  we choose HLT. That's the default set by UefiCpuPkg.dec.

Furthermore, although CpuMpPei could consume SecPeiCpuExceptionHandlerLib
technically, it is supposed to consume PeiCpuExceptionHandlerLib. See:

- http://thread.gmane.org/gmane.comp.bios.edk2.devel/12703

- git commit a81abf161666 ("UefiCpuPkg/ExceptionLib: Import
  PeiCpuExceptionHandlerLib module"), part of the series linked above.

Jeff recommended to resolve CpuExceptionHandlerLib to
PeiCpuExceptionHandlerLib for all PEIMs:

- http://thread.gmane.org/gmane.comp.bios.edk2.devel/14471/focus=14477

Since at the moment we have no resolution in place that would cover this
for PEIMs (from either [LibraryClasses] or [LibraryClasses.common.PEIM]),
it's easy to do.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
OvmfPkg/OvmfPkgIa32.dsc
OvmfPkg/OvmfPkgIa32.fdf
OvmfPkg/OvmfPkgIa32X64.dsc
OvmfPkg/OvmfPkgIa32X64.fdf
OvmfPkg/OvmfPkgX64.dsc
OvmfPkg/OvmfPkgX64.fdf

index 805650059e968cb0ab1c7380c61146aa0586727a..8af326778205ea48df6aea0185a52a332bb6becc 100644 (file)
 !ifdef $(SOURCE_DEBUG_ENABLE)\r
   DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf\r
 !endif\r
+  CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf\r
 \r
 [LibraryClasses.common.DXE_CORE]\r
   HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf\r
       PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
   }\r
 !endif\r
+  UefiCpuPkg/CpuMpPei/CpuMpPei.inf {\r
+    <LibraryClasses>\r
+      PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
+  }\r
 \r
   #\r
   # DXE Phase modules\r
index ccc3e1461d55d59b7110bae264e564bd28c345ac..136973443755896e53d2615903d5c3ec88aa2d8a 100644 (file)
@@ -161,6 +161,7 @@ INF  UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
 !if $(SMM_REQUIRE) == TRUE\r
 INF  OvmfPkg/SmmAccess/SmmAccessPei.inf\r
 !endif\r
+INF  UefiCpuPkg/CpuMpPei/CpuMpPei.inf\r
 \r
 ################################################################################\r
 \r
index 7615ee96dff2f2b8fb4078f2e835a046e369c947..4bb38d0f7b3c6e90b79dc2641595052f4ec6cdf6 100644 (file)
 !ifdef $(SOURCE_DEBUG_ENABLE)\r
   DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf\r
 !endif\r
+  CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf\r
 \r
 [LibraryClasses.common.DXE_CORE]\r
   HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf\r
       PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
   }\r
 !endif\r
+  UefiCpuPkg/CpuMpPei/CpuMpPei.inf {\r
+    <LibraryClasses>\r
+      PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
+  }\r
 \r
 [Components.X64]\r
   #\r
index 3e368b42999f93f5942375cfadbb7bb4c8c5ecfa..34f8938adf82e1c6738d1317ac1fe4f3267fefea 100644 (file)
@@ -161,6 +161,7 @@ INF  UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
 !if $(SMM_REQUIRE) == TRUE\r
 INF  OvmfPkg/SmmAccess/SmmAccessPei.inf\r
 !endif\r
+INF  UefiCpuPkg/CpuMpPei/CpuMpPei.inf\r
 \r
 ################################################################################\r
 \r
index 7f8a5c25a5c04cb6968b2e6193e694da5de44293..be3aa1fc6c43d0c56e461adad98c234497f87b6c 100644 (file)
 !ifdef $(SOURCE_DEBUG_ENABLE)\r
   DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf\r
 !endif\r
+  CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf\r
 \r
 [LibraryClasses.common.DXE_CORE]\r
   HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf\r
       PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
   }\r
 !endif\r
+  UefiCpuPkg/CpuMpPei/CpuMpPei.inf {\r
+    <LibraryClasses>\r
+      PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
+  }\r
 \r
   #\r
   # DXE Phase modules\r
index f31afdb6735966945581e1a4f1071dea74c35513..630c2959ffbc1b888510bbd6137a877ad6e3d645 100644 (file)
@@ -161,6 +161,7 @@ INF  UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
 !if $(SMM_REQUIRE) == TRUE\r
 INF  OvmfPkg/SmmAccess/SmmAccessPei.inf\r
 !endif\r
+INF  UefiCpuPkg/CpuMpPei/CpuMpPei.inf\r
 \r
 ################################################################################\r
 \r