UefiCpuPkg/MpInitLib: Implementation of MpInitLibWhoAmI()

v5:
  1. Move checking ProcessNumber before calling GetCpuMpData.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Michael Kinney <michael.d.kinney@intel.com>
This commit is contained in:
Jeff Fan 2016-07-21 21:14:00 +08:00
parent ad52f25edf
commit 5c9e099797
1 changed files with 9 additions and 1 deletions

View File

@ -1126,7 +1126,15 @@ MpInitLibWhoAmI (
OUT UINTN *ProcessorNumber
)
{
return EFI_UNSUPPORTED;
CPU_MP_DATA *CpuMpData;
if (ProcessorNumber == NULL) {
return EFI_INVALID_PARAMETER;
}
CpuMpData = GetCpuMpData ();
return GetProcessorNumber (CpuMpData, ProcessorNumber);
}
/**