]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/MpInitLib: Implementation of MpInitLibWhoAmI()
authorJeff Fan <jeff.fan@intel.com>
Thu, 21 Jul 2016 13:14:00 +0000 (21:14 +0800)
committerJeff Fan <jeff.fan@intel.com>
Wed, 17 Aug 2016 12:02:09 +0000 (20:02 +0800)
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>
UefiCpuPkg/Library/MpInitLib/MpLib.c

index d0473fdb37592da32e54d00cc7ce999fccc0cc6e..5fbcb26ddaf205d397d451afbec5d05db942fb9c 100644 (file)
@@ -1126,7 +1126,15 @@ MpInitLibWhoAmI (
   OUT UINTN                    *ProcessorNumber\r
   )\r
 {\r
-  return EFI_UNSUPPORTED;\r
+  CPU_MP_DATA           *CpuMpData;\r
+\r
+  if (ProcessorNumber == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  CpuMpData = GetCpuMpData ();\r
+\r
+  return GetProcessorNumber (CpuMpData, ProcessorNumber);\r
 }\r
 \r
 /**\r