[Patch v4 29/46] UefiCpuPkg/MpInitLib: Implementation of MpInitLibWhoAmI()


Jeff Fan <jeff.fan@...>
 

Cc: Michael Kinney <michael.d.kinney@...>
Cc: Feng Tian <feng.tian@...>
Cc: Giri P Mudusuru <giri.p.mudusuru@...>
Cc: Laszlo Ersek <lersek@...>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@...>
---
UefiCpuPkg/Library/MpInitLib/MpLib.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index 58eb392..225f172 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
@@ -1131,7 +1131,15 @@ MpInitLibWhoAmI (
OUT UINTN *ProcessorNumber
)
{
- return EFI_UNSUPPORTED;
+ CPU_MP_DATA *CpuMpData;
+
+ CpuMpData = GetCpuMpData ();
+
+ if (ProcessorNumber == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ return GetProcessorNumber (CpuMpData, ProcessorNumber);
}

/**
--
2.7.4.windows.1

Join devel@edk2.groups.io to automatically receive all group messages.