Skip to content

Commit

Permalink
UefiCpuPkg/MpInitLib: Always initialize the DoDecrement variable
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Laszlo Ersek <[email protected]>
Cc: Rahul Kumar <[email protected]>
Signed-off-by: Tom Lendacky <[email protected]>
Message-Id: <76a9f18992475b915e5f8457704676067210cacf.1597935198.git.thomas.lendacky@amd.com>
Reviewed-by: Eric Dong <[email protected]>
Tested-by: Liming Gao <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
  • Loading branch information
tlendacky authored and mergify[bot] committed Aug 24, 2020
1 parent ad40eb4 commit 48a8348
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions UefiCpuPkg/Library/MpInitLib/MpLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 48a8348

Please sign in to comment.