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>
This commit is contained in:
Tom Lendacky 2020-08-20 09:53:19 -05:00 committed by mergify[bot]
parent ad40eb4e6c
commit 48a83481d2
1 changed files with 1 additions and 3 deletions

View File

@ -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);