]> git.proxmox.com Git - mirror_edk2.git/commit - UefiCpuPkg/Library/MpInitLib/MpLib.h
UefiCpuPkg/MpInitLib: Avoid call PcdGet* in Ap & Bsp.
authorEric Dong <eric.dong@intel.com>
Thu, 19 Oct 2017 02:40:16 +0000 (10:40 +0800)
committerEric Dong <eric.dong@intel.com>
Fri, 20 Oct 2017 02:30:46 +0000 (10:30 +0800)
commit1e3f7a3782f1928a19bba81d9d0dba28d15fdae5
tree198d0a555e0a1dab56f9e344f609d6c2dc2d0776
parent3539e850ebf7f208dd6132a576afc737fbe90d5a
UefiCpuPkg/MpInitLib: Avoid call PcdGet* in Ap & Bsp.

MicrocodeDetect function will run by every threads, and it will
use PcdGet to get PcdCpuMicrocodePatchAddress and
PcdCpuMicrocodePatchRegionSize, if change both PCD default to dynamic,
system will in non-deterministic behavior.

By design, UEFI/PI services are single threaded and not re-entrant
so Multi processor code should not use UEFI/PI services. Here, Pcd
protocol/PPI is used to access dynamic PCDs so it would result in
non-deterministic behavior.

This code get PCD value in BSP and save them in CPU_MP_DATA for Ap.

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

Cc: Crystal Lee <CrystalLee@ami.com.tw>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
UefiCpuPkg/Library/MpInitLib/Microcode.c
UefiCpuPkg/Library/MpInitLib/MpLib.c
UefiCpuPkg/Library/MpInitLib/MpLib.h