]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/CpuDxe: install Mp Service protocol
authorChen Fan <chen.fan.fnst@cn.fujitsu.com>
Thu, 13 Nov 2014 18:30:18 +0000 (18:30 +0000)
committerjljusten <jljusten@Edk2>
Thu, 13 Nov 2014 18:30:18 +0000 (18:30 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16371 6f19259b-4bc3-4df7-8a09-765794883524

UefiCpuPkg/CpuDxe/CpuMp.c

index 2bc9f70bbbe4e19c06935db06a2972f410304e5e..f864de1f6f4db3eb31d5a5fb472a24826a014ecf 100644 (file)
@@ -20,6 +20,7 @@ UINTN gApStackSize;
 UINTN gPollInterval = 100; // 100 microseconds\r
 \r
 MP_SYSTEM_DATA mMpSystemData;\r
+EFI_HANDLE     mMpServiceHandle = NULL;\r
 \r
 VOID *mCommonStack = 0;\r
 VOID *mTopOfApCommonStack = 0;\r
@@ -1472,6 +1473,8 @@ InitializeMpSupport (
   VOID\r
   )\r
 {\r
+  EFI_STATUS Status;\r
+\r
   gMaxLogicalProcessorNumber = (UINTN) PcdGet32 (PcdCpuMaxLogicalProcessorNumber);\r
   if (gMaxLogicalProcessorNumber < 1) {\r
     DEBUG ((DEBUG_ERROR, "Setting PcdCpuMaxLogicalProcessorNumber should be more than zero.\n"));\r
@@ -1516,6 +1519,13 @@ InitializeMpSupport (
 \r
   mAPsAlreadyInitFinished = TRUE;\r
 \r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
+                  &mMpServiceHandle,\r
+                  &gEfiMpServiceProtocolGuid,  &mMpServicesTemplate,\r
+                  NULL\r
+                  );\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
   if (mMpSystemData.NumberOfProcessors < gMaxLogicalProcessorNumber) {\r
     FreePages (mApStackStart, EFI_SIZE_TO_PAGES (\r
                                 (gMaxLogicalProcessorNumber - mMpSystemData.NumberOfProcessors) *\r