Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Laszlo Ersek 4af3ae1463 UefiCpuPkg/LocalApicLib: fix feature test for Extended Topology CPUID leaf
According to the Intel SDM (325462-060US / September 2016),

> INPUT EAX = 0BH: Returns Extended Topology Information
>
> [...] Software must detect the presence of CPUID leaf 0BH by verifying
> (a) the highest leaf index supported by CPUID is >= 0BH, and
> (b) CPUID.0BH:EBX[15:0] reports a non-zero value. [...]

The LocalApicLib instances in UefiCpuPkg do not perform check (b).

This causes an actual bug in the following OVMF setup:

- Intel W3550 host processor <http://ark.intel.com/products/39720/>,

- the QEMU/KVM guest's VCPU model is set to "host", that is, "the CPU
  visible to the guest should be exactly the same as the host CPU".

In the GetInitialApicId() function, check (a) passes: the CPUID level of
the W3550 is exactly 11 decimal. However, leaf 11 itself is not supported,
therefore EDX is set to zero:

> If a value entered for CPUID.EAX is less than or equal to the maximum
> input value and the leaf is not supported on that processor then 0 is
> returned in all the registers.

Because we don't check (b), we return 0 as initial APIC ID on the BSP and
on all of the APs as well.

Add the missing check.

Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-11-23 21:41:05 +01:00
AppPkg AppPkg: Update email and URL. 2016-10-26 09:34:34 -07:00
ArmPkg ArmPkg/Library/ArmDmaLib: Deallocate Map buffer in case of error 2016-11-15 13:24:40 +00:00
ArmPlatformPkg ArmPlatformPkg/ArmVExpressFastBootDxe: eliminate deprecated string functions 2016-10-28 16:26:50 +01:00
ArmVirtPkg ArmVirtPkg DxeHobLib: Update func header description of BuildFv(2)Hob() 2016-11-17 09:27:14 +08:00
BaseTools BaseTools: report error for same Guid's Private definition conflict 2016-11-23 11:19:12 +08:00
BeagleBoardPkg BeagleBoardPkg: enable -DDISABLE_NEW_DEPRECATED_INTERFACES 2016-10-28 15:55:53 +01:00
Conf
CorebootModulePkg CorebootPayloadPkg/CbSupportPei: Fix the memory map issue 2016-11-17 14:49:11 -08:00
CorebootPayloadPkg CorebootPayloadPkg: Allow PciLib instance selection 2016-11-17 10:21:52 -08:00
CryptoPkg CryptoPkg/BaseCryptLib: Make comments consistent with the function 2016-11-11 13:46:04 +08:00
DuetPkg DuetPkg: Fix typos in comments 2016-11-15 11:05:33 +08:00
EdkCompatibilityPkg EdkCompatibilityPkg/PrintLite: Fix ErrorPrint() wrong NULL char check 2016-11-03 10:28:47 +08:00
EdkShellBinPkg
EdkShellPkg
EmbeddedPkg EmbeddedPkg: MmcDxe: add SPEC_VERS field in CSD structure 2016-11-14 15:45:49 +00:00
EmulatorPkg EmulatorPkg: Fix typos in comments and variables 2016-10-19 13:32:20 -07:00
FatBinPkg FatBinPkg: Change to 2-clause BSD license 2016-04-22 00:55:21 -07:00
FatPkg FatPkg/EnhancedFatDxe: rebase to ARRAY_SIZE() 2016-10-27 11:10:54 +02:00
IntelFrameworkModulePkg IntelFrameworkModulePkg/LegacyBios: Fix legacy serial redirection bug 2016-11-10 10:19:54 +08:00
IntelFrameworkPkg IntelFrameworkPkg PeiHobLib: Check FV alignment when building FV HOB 2016-11-17 09:27:13 +08:00
IntelFsp2Pkg IntelFsp2Pkg: Support to return error status from FSP API done 2016-11-14 12:11:05 +08:00
IntelFsp2WrapperPkg IntelFsp2WrapperPkg: Add a PCD to control if signaling PciEnumerationComplete. 2016-10-28 07:46:42 +08:00
IntelFspPkg IntelFspPkg: Fix typos in comments 2016-10-24 09:26:28 +08:00
IntelFspWrapperPkg IntelFspWrapperPkg: Fix typos in comments 2016-10-24 09:26:30 +08:00
IntelSiliconPkg IntelSiliconPkg: Add DxeSmbiosDataHobLib 2016-11-17 17:35:02 -08:00
MdeModulePkg MdeModulePkg/DxeNetLib: Allow the IPv4/prefix case when AsciiStrToIp4 2016-11-23 14:01:52 +08:00
MdePkg MdeModulePkg/EbcDxe: reorganize EBC header definitions 2016-11-23 10:20:28 +08:00
NetworkPkg NetworkPkg: Check for the max DHCP packet length before use it. 2016-11-18 16:30:50 +08:00
Nt32Pkg Nt32Pkg: Fix typos in comments and variables 2016-11-15 11:05:33 +08:00
Omap35xxPkg EmbeddedPkg: remove unused PrePiHobListPointerLib 2016-10-28 13:51:35 +01:00
OptionRomPkg OptionRomPkg: Fix typos in comments 2016-11-15 11:05:34 +08:00
OvmfPkg OvmfPkg: Add 4K PE alignment to enable SMM page level protection. 2016-11-18 10:57:21 +08:00
PcAtChipsetPkg PcAtChipsetPkg/PcRtc: Handle NULL table entry in RSDT/XSDT 2016-11-18 10:38:39 +08:00
PerformancePkg PerformancePkg/Dp_App: rebase to ARRAY_SIZE() 2016-10-27 11:10:59 +02:00
QuarkPlatformPkg QuarkPlatformPkg/dsc: enable Smm paging protection. 2016-11-17 16:30:08 +08:00
QuarkSocPkg QuarkSocPkg/Library: Remove extra UefiBaseType.h includes 2016-10-27 21:32:46 -07:00
SecurityPkg SecurityPkg DxeTcg2PPLib: Lock Tcg2PhysicalPresenceFlags variable on S4 2016-11-23 16:56:18 +08:00
ShellBinPkg ShellBinPkg Arm/AArch64 Shell binary update 2016-08-02 12:25:13 +02:00
ShellPkg ShellPkg: update ping6 to use timer service instead of timer arch protocol . 2016-11-23 14:01:32 +08:00
SignedCapsulePkg SignedCapsulePkg Universal: Init local variables before using them 2016-11-18 08:46:37 +08:00
SourceLevelDebugPkg SourceLevelDebugPkg: Fix typos in comments 2016-10-24 09:10:15 +08:00
StdLib StdLib/LibC ARM AARCH64: do not redefine compiler intrinsics 2016-08-09 10:10:12 +02:00
StdLibPrivateInternalFiles
UefiCpuPkg UefiCpuPkg/LocalApicLib: fix feature test for Extended Topology CPUID leaf 2016-11-23 21:41:05 +01:00
UnixPkg
Vlv2DeviceRefCodePkg Vlv2DeviceRefCodePkg/ValleyView2Soc: Remove the unused code 2016-08-03 11:02:19 +08:00
Vlv2TbltDevicePkg Vlv2TbltDevicePkg/Build: Add capsule/recovery in help info. 2016-11-08 22:49:57 +08:00
.gitignore
BuildNotes2.txt BaseTools: Updated BuildNotes URLs 2016-03-25 09:46:44 +08:00
Edk2Setup.bat Edk2Setup.bat: Fix build errors from VS tools PREFIX ENV missing 2016-11-05 09:10:58 +08:00
Maintainers.txt Maintainers.txt: Change maintainer of VLV2 packages. 2016-10-27 21:08:23 +08:00
edksetup.bat edksetup.bat: make sure BASE_TOOLS_PATH be set correctly 2016-10-26 13:45:45 +08:00
edksetup.sh edksetup.sh, BaseTools/BuildEnv: add --reconfig support 2016-10-24 13:53:16 +01:00