diff options
author | Tom Lendacky <thomas.lendacky@amd.com> | 2020-08-20 09:53:19 -0500 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-08-24 19:02:40 +0000 |
commit | 48a83481d2a2df7ec59061ff9ef262109948b724 (patch) | |
tree | d992d155a70819c7670e5fbb3c93df24f182b0f4 | |
parent | ad40eb4e6c9d5576cca24bc934441f5bb0231c04 (diff) | |
download | edk2-48a83481d2a2df7ec59061ff9ef262109948b724.zip edk2-48a83481d2a2df7ec59061ff9ef262109948b724.tar.gz edk2-48a83481d2a2df7ec59061ff9ef262109948b724.tar.bz2 |
UefiCpuPkg/MpInitLib: Always initialize the DoDecrement variable
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2901
The DoDecrement variable in ApWakeupFunction () wasn't always being
initialized. Update the code to always fully initialize it.
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Message-Id: <76a9f18992475b915e5f8457704676067210cacf.1597935198.git.thomas.lendacky@amd.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Tested-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
-rw-r--r-- | UefiCpuPkg/Library/MpInitLib/MpLib.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c index 90416c8..0742627 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -885,9 +885,7 @@ ApWakeupFunction ( UINT64 Status;
BOOLEAN DoDecrement;
- if (CpuMpData->InitFlag == ApInitConfig) {
- DoDecrement = TRUE;
- }
+ DoDecrement = (BOOLEAN) (CpuMpData->InitFlag == ApInitConfig);
while (TRUE) {
Msr.GhcbPhysicalAddress = AsmReadMsr64 (MSR_SEV_ES_GHCB);
|