UefiCpuPkg/MpInitLib: Skip reading PlatformId on AMD processors. edk2-stable202002
authorLeo Duran <leo.duran@amd.com>
Sat, 29 Feb 2020 15:05:45 +0000 (23:05 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 2 Mar 2020 05:47:06 +0000 (05:47 +0000)
commit4c0f6e349d32cf27a7104ddd3e729d6ebc88ea70
treebdf7a7b9ac9652b084c9d3fc2a7cfae9376b005f
parent2be4828af1c92a848af90429a9a0b44544c80553
UefiCpuPkg/MpInitLib: Skip reading PlatformId on AMD processors.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2556

This patch uses CPUID signature check to skip reading the PlatformId MSR,
which is not implemented on AMD processors.

The PlatformId is used for loading microcode patches, which is also not
supported and AMD-based platforms. To mitigate the PlatformId dependency,
PcdCpuMicrocodePatchAddress and PcdCpuMicrodePatchRegionSize must be set
to 0 (default value), in order to bypass microcode loading code paths.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Leo Duran <leo.duran@amd.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
UefiCpuPkg/Library/MpInitLib/MpLib.c
UefiCpuPkg/Library/MpInitLib/MpLib.h [changed mode: 0644->0755]