diff options
author | Leo Duran <leo.duran@amd.com> | 2016-11-01 03:42:57 +0800 |
---|---|---|
committer | Jeff Fan <jeff.fan@intel.com> | 2016-11-01 09:08:45 +0800 |
commit | 73152f19c0be7f31ee05f32878b515a296c487fa (patch) | |
tree | 4d621f3537167e6cdac8bb275f3e9cbcf5460afe /UefiCpuPkg/Include/Library | |
parent | ac55b925548f3b33f2bc93e603ecffe4a6cb191a (diff) | |
download | edk2-73152f19c0be7f31ee05f32878b515a296c487fa.tar.gz edk2-73152f19c0be7f31ee05f32878b515a296c487fa.tar.bz2 edk2-73152f19c0be7f31ee05f32878b515a296c487fa.zip |
UefiCpuPkg: Move GetProcessorLocation() to LocalApicLib library
1) Remove SmmGetProcessorLocation() from PiSmmCpuDxeSmm driver.
2) Remove ExtractProcessorLocation() from MpInitLib library.
3) Add GetProcessorLocation() to BaseXApicLib and BaseXApicX2ApicLib.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leo Duran <leo.duran@amd.com>
Signed-off-by: Michael Kinney <Michael.d.kinney@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michael Kinney <Michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Diffstat (limited to 'UefiCpuPkg/Include/Library')
-rw-r--r-- | UefiCpuPkg/Include/Library/LocalApicLib.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/UefiCpuPkg/Include/Library/LocalApicLib.h b/UefiCpuPkg/Include/Library/LocalApicLib.h index cd4e613ef5..fae780d583 100644 --- a/UefiCpuPkg/Include/Library/LocalApicLib.h +++ b/UefiCpuPkg/Include/Library/LocalApicLib.h @@ -410,6 +410,26 @@ GetApicMsiValue ( IN BOOLEAN LevelTriggered,
IN BOOLEAN AssertionLevel
);
+
+/**
+ Get Package ID/Core ID/Thread ID of a processor.
+
+ The algorithm assumes the target system has symmetry across physical
+ package boundaries with respect to the number of logical processors
+ per package, number of cores per package.
+
+ @param[in] InitialApicId Initial APIC ID of the target logical processor.
+ @param[out] Package Returns the processor package ID.
+ @param[out] Core Returns the processor core ID.
+ @param[out] Thread Returns the processor thread ID.
+**/
+VOID
+GetProcessorLocation(
+ IN UINT32 InitialApicId,
+ OUT UINT32 *Package OPTIONAL,
+ OUT UINT32 *Core OPTIONAL,
+ OUT UINT32 *Thread OPTIONAL
+ );
#endif
|