diff options
author | Jeff Fan <jeff.fan@intel.com> | 2016-07-21 21:14:00 +0800 |
---|---|---|
committer | Jeff Fan <jeff.fan@intel.com> | 2016-08-17 20:02:09 +0800 |
commit | 5c9e09979778a73a7f0d1759d7795a0dc1671eb3 (patch) | |
tree | fff3a2dae5dba8d4fec5bd6bcdef4a905b4994c6 /UefiCpuPkg | |
parent | ad52f25edff4c6fb8061b97e87cf612020794091 (diff) | |
download | edk2-platforms-5c9e09979778a73a7f0d1759d7795a0dc1671eb3.tar.xz |
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>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/Library/MpInitLib/MpLib.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c index d0473fdb37..5fbcb26dda 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -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);
}
/**
|