UefiCpuPkg/CpuMpPei: Install PI CPU MP PPI

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18012 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Jeff Fan 2015-07-15 03:45:11 +00:00 committed by vanjeff
parent 53d3f06fd7
commit e35d034736
4 changed files with 28 additions and 2 deletions

View File

@ -436,7 +436,7 @@ CpuMpPeimInit (
IN CONST EFI_PEI_SERVICES **PeiServices
)
{
EFI_STATUS Status;
PEI_CPU_MP_DATA *PeiCpuMpData;
UINT32 ProcessorCount;
@ -464,6 +464,11 @@ CpuMpPeimInit (
// Update and publish CPU BIST information
//
CollectBistDataFromPpi (PeiServices, PeiCpuMpData);
//
// Install CPU MP PPI
//
Status = PeiServicesInstallPpi(&mPeiCpuMpPpiDesc);
ASSERT_EFI_ERROR (Status);
return EFI_SUCCESS;
return Status;
}

View File

@ -140,6 +140,8 @@ struct _PEI_CPU_MP_DATA {
PEI_CPU_DATA *CpuData;
volatile MP_CPU_EXCHANGE_INFO *MpCpuExchangeInfo;
};
extern EFI_PEI_PPI_DESCRIPTOR mPeiCpuMpPpiDesc;
/**
Assembly code to get starting address and size of the rendezvous entry for APs.

View File

@ -68,6 +68,7 @@
UefiCpuLib
[Ppis]
gEfiPeiMpServicesPpiGuid ## PRODUCES
gEfiSecPlatformInformationPpiGuid ## SOMETIMES_CONSUMES
## SOMETIMES_CONSUMES
## SOMETIMES_PRODUCES

View File

@ -14,6 +14,24 @@
#include "PeiMpServices.h"
//
// CPU MP PPI to be installed
//
EFI_PEI_MP_SERVICES_PPI mMpServicesPpi = {
PeiGetNumberOfProcessors,
PeiGetProcessorInfo,
PeiStartupAllAPs,
PeiStartupThisAP,
PeiSwitchBSP,
PeiEnableDisableAP,
PeiWhoAmI,
};
EFI_PEI_PPI_DESCRIPTOR mPeiCpuMpPpiDesc = {
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
&gEfiPeiMpServicesPpiGuid,
&mMpServicesPpi
};
/**
Get CPU Package/Core/Thread location information.