audk/UefiCpuPkg/Library
Wu, Jiaxin ad0b1cc144 UefiCpuPkg/BaseXApicLib: Fix CPUID_V2_EXTENDED_TOPOLOGY detection
This patch is to complete 170d4ce8, sync the change to BaseXApicLib.

Checking the max cpuid leaf is not enough to figure whenever
CPUID_V2_EXTENDED_TOPOLOGY is supported.  Intel SDM says:

Software must detect the presence of CPUID leaf 1FH by verifying
(a) the highest leaf index supported by CPUID is >= 1FH, and
(b) CPUID.1FH:EBX[15:0] reports a non-zero value.

The same is true for CPUID leaf 0BH.

This patch adds the EBX check to GetProcessorLocation2ByApicId().  The
patch also fixes the existing check in GetProcessorLocationByApicId() to
be in line with the spec by looking at bits 15:0.  The comments are
updated with a quote from the Intel SDM.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Message-Id: <20231115111553.6592-2-jiaxin.wu@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
2023-12-08 13:25:11 +00:00
..
BaseRiscV64CpuExceptionHandlerLib UefiCpuPkg: Update code to be more C11 compliant by using __func__ 2023-04-10 14:19:57 +00:00
BaseRiscV64CpuTimerLib UefiCpuPkg: RISC-V: TimerLib: Fix delay function to use 64-bit 2023-06-15 05:32:51 +00:00
BaseRiscVMmuLib UefiCpuPkg: RISC-V: MMU: Introduce a PCD for SATP mode 2023-10-17 07:44:25 +00:00
BaseXApicLib UefiCpuPkg/BaseXApicLib: Fix CPUID_V2_EXTENDED_TOPOLOGY detection 2023-12-08 13:25:11 +00:00
BaseXApicX2ApicLib UefiCpuPkg/BaseXApicX2ApicLib: fix CPUID_V2_EXTENDED_TOPOLOGY detection 2023-10-25 09:52:06 +00:00
CcExitLibNull OvmfPkg/UefiCpuPkg: Add CcExit prefix to the APIs of CcExitLib 2022-11-14 04:55:34 +00:00
CpuCacheInfoLib UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuCommonFeaturesLib UefiCpuPkg: Update PT code to support enable collect performance 2023-04-26 09:19:51 +00:00
CpuExceptionHandlerLib UefiCpuPkg: Update code to be more C11 compliant by using __func__ 2023-04-10 14:19:57 +00:00
CpuPageTableLib UefiCpuPkg/CpuPageTableLib/TestCase: Refine test case for PAE paging. 2023-12-06 05:30:55 +00:00
CpuTimerLib UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
MicrocodeLib UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
MmSaveStateLib UefiCpuPkg: Uses gMmst in MmSaveStateLib 2023-07-17 09:43:43 +00:00
MpInitLib UefiCpuPkg/MpInitLib: Copy SEV-ES save area pointer during APIC ID sorting 2023-11-28 11:07:59 +00:00
MpInitLibUp UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
MtrrLib UefiCpuPkg/MtrrUnitTest: Add Unit test of setting/getting memory 2023-10-09 08:22:02 +00:00
PlatformSecLibNull UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
RegisterCpuFeaturesLib UefiCpuPkg: Calculate DisplayFamily correctly 2023-03-07 10:42:38 +00:00
SecPeiDxeTimerLibUefiCpu UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmCpuFeaturesLib UefiCpuPkg: Removes SmmCpuFeaturesReadSaveStateRegister 2023-07-03 03:01:10 +00:00
SmmCpuPlatformHookLibNull UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmCpuRendezvousLib UefiCpuPkg: Extend SMM CPU Service with rendezvous support. 2022-03-04 05:44:42 +00:00