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>
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user