diff options
author | Jeff Fan <jeff.fan@intel.com> | 2015-07-15 03:43:12 +0000 |
---|---|---|
committer | vanjeff <vanjeff@Edk2> | 2015-07-15 03:43:12 +0000 |
commit | 60ca9e8c185b0711895665113493a531ca645b69 (patch) | |
tree | d1c48a22e59ef16ff0e114e9e0947c0cdebde31f /UefiCpuPkg/CpuMpPei/CpuMpPei.c | |
parent | bf55f5b2749d575ea54a02d08cad4abf39abbbb8 (diff) | |
download | edk2-platforms-60ca9e8c185b0711895665113493a531ca645b69.tar.xz |
UefiCpuPkg/CpuMpPei: Implementation of PeiStartupAllAPs ()
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@18008 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg/CpuMpPei/CpuMpPei.c')
-rw-r--r-- | UefiCpuPkg/CpuMpPei/CpuMpPei.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.c b/UefiCpuPkg/CpuMpPei/CpuMpPei.c index d218313b0d..bfcf816829 100644 --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.c +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.c @@ -133,6 +133,8 @@ ApCFunction ( ) { PEI_CPU_MP_DATA *PeiCpuMpData; + UINTN ProcessorNumber; + EFI_AP_PROCEDURE Procedure; UINTN BistData; PeiCpuMpData = ExchangeInfo->PeiCpuMpData; @@ -148,6 +150,18 @@ ApCFunction ( // MtrrSetAllMtrrs (&PeiCpuMpData->MtrrTable); MicrocodeDetect (); + } else { + // + // Execute AP function if AP is not disabled + // + GetProcessorNumber (PeiCpuMpData, &ProcessorNumber); + if ((PeiCpuMpData->CpuData[ProcessorNumber].State != CpuStateDisabled) && + (PeiCpuMpData->ApFunction != 0)) { + PeiCpuMpData->CpuData[ProcessorNumber].State = CpuStateBusy; + Procedure = (EFI_AP_PROCEDURE)(UINTN)PeiCpuMpData->ApFunction; + Procedure ((VOID *)(UINTN)PeiCpuMpData->ApFunctionArgument); + PeiCpuMpData->CpuData[ProcessorNumber].State = CpuStateIdle; + } } // |