[edk2-devel] [PATCH 1/1] UefiCpuPkg/MpInitLib: Always initialize the DoDecrement variable
Liming Gao
liming.gao at intel.com
Wed Aug 19 07:08:13 UTC 2020
Tested-by: Liming Gao <liming.gao at intel.com>
Reviewed-by: Liming Gao <liming.gao at intel.com>
-----Original Message-----
From: Tom Lendacky <thomas.lendacky at amd.com>
Sent: 2020年8月18日 21:10
To: devel at edk2.groups.io
Cc: Gao, Liming <liming.gao at intel.com>; Dong, Eric <eric.dong at intel.com>; Ni, Ray <ray.ni at intel.com>; Laszlo Ersek <lersek at redhat.com>; Kumar, Rahul1 <rahul1.kumar at intel.com>
Subject: [PATCH 1/1] UefiCpuPkg/MpInitLib: Always initialize the DoDecrement variable
From: Tom Lendacky <thomas.lendacky at amd.com>
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 at intel.com>
Cc: Ray Ni <ray.ni at intel.com>
Cc: Laszlo Ersek <lersek at redhat.com>
Cc: Rahul Kumar <rahul1.kumar at intel.com>
Signed-off-by: Tom Lendacky <thomas.lendacky at amd.com>
---
UefiCpuPkg/Library/MpInitLib/MpLib.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index 90416c81b616..e24bdc64f930 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 = (CpuMpData->InitFlag == ApInitConfig) ? TRUE :
+ FALSE;
while (TRUE) {
Msr.GhcbPhysicalAddress = AsmReadMsr64 (MSR_SEV_ES_GHCB);
--
2.28.0
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#64418): https://edk2.groups.io/g/devel/message/64418
Mute This Topic: https://groups.io/mt/76264245/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list