From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (NAM10-BN7-obe.outbound.protection.outlook.com [40.107.92.70]) by mx.groups.io with SMTP id smtpd.web10.112739.1597935210430170061 for ; Thu, 20 Aug 2020 07:53:30 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=e2IzLf8l; spf=none, err=SPF record not found (domain: amd.com, ip: 40.107.92.70, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oLqySlURaf4iT5yMDxE+wKbs5inRLVwKtB6drW8vMrs0sBp7WWDX4+PwNQi+hPJezYNvQ2tZGDPJWb4hbNlDcBJMOAmdrjYl/j4a097jNlqifI5Lg+v5oFnElkVnj6vgfbcAF0b8mvz5ygv6rwrFXQ8eeCnzEo3vfED0clJmFKHo0UyA0ZBQY4JbVbRoiRjXstFuAKekpE/R9ahtEdJeZUNEDqrZmS7fAJksS3/emyh7rQfnyk+DMukV0xIkk8ZCC5kSfqY6GLKzRDr/fTYM1KU3jLjSC08czKVztXNW7LZGwVAuURWRUA6/s0dkDHAZyktatY3KtNLEIS8pLwoV6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xosn7wa8tmCjcHHISVuEEYnjOKQhS6PJecAisC6Wg1A=; b=od1CSqdxjhDtIf+Zbzb8acNrsu/0jT2W7kMTh9Xys0J2try1zql1fFDoYwfnNA40UPFcp/8GlVnFOZyu37BqQWUYqHY5FelCaTqpzrLQ0dapT0mSW4zamQHMRDuJfbtrJ299Q/n/gO28fSn8qaE3gh2m5MdU7/nZapoMcGsD8XTZjf6dcro38LOXm9VXRoOtWALzMQB1KdSc2RAfzM/NWf7/LlIBJWhY4HnkFnhBudV5HB/+OcNaxTYm70KgLk/sw5F7GbYPP+mjEmqfKPmG1HmO/eK0VescYqyUiOMoAT95SNflMuVm/xF3pRvW+rX5hn2Bz+LhaL+q28/TD0yO0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xosn7wa8tmCjcHHISVuEEYnjOKQhS6PJecAisC6Wg1A=; b=e2IzLf8l6rC0zkZDCnKrC6Z096Kcg/LneFjZELLnoejev5vRWKeHPbbZeK9c0ShRrovfqgM8KrUZVqjq5Jps4si3ucu8jNZFdrT76xdrmg/wyAeCzDKFMCWCRoFzCrD4+nYtPhz2qn4hyJdqLNFnfM0NdcsQAlsN0GBsX+m3C9k= Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) by DM5PR1201MB0220.namprd12.prod.outlook.com (2603:10b6:4:4e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.25; Thu, 20 Aug 2020 14:53:28 +0000 Received: from DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::299a:8ed2:23fc:6346]) by DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::299a:8ed2:23fc:6346%3]) with mapi id 15.20.3305.026; Thu, 20 Aug 2020 14:53:28 +0000 From: "Lendacky, Thomas" To: devel@edk2.groups.io CC: Liming Gao , Eric Dong , Ray Ni , Laszlo Ersek , Rahul Kumar Subject: [PATCH v2 1/1] UefiCpuPkg/MpInitLib: Always initialize the DoDecrement variable Date: Thu, 20 Aug 2020 09:53:19 -0500 Message-ID: <76a9f18992475b915e5f8457704676067210cacf.1597935198.git.thomas.lendacky@amd.com> X-Mailer: git-send-email 2.28.0 X-ClientProxiedBy: DM6PR18CA0028.namprd18.prod.outlook.com (2603:10b6:5:15b::41) To DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) Return-Path: thomas.lendacky@amd.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from 255.255.255.255 (255.255.255.255) by DM6PR18CA0028.namprd18.prod.outlook.com (2603:10b6:5:15b::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.24 via Frontend Transport; Thu, 20 Aug 2020 14:53:28 +0000 X-Mailer: git-send-email 2.28.0 X-Originating-IP: [165.204.77.1] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 70e425f3-0e1e-4434-6190-08d84518cc90 X-MS-TrafficTypeDiagnostic: DM5PR1201MB0220: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uBnVhET83h7vBJeewkEngXibn33FlP2+LmSbCV1t4E5gXhTzeAZS80Y76FgN1JFtRaGSxyNSW1qbxLDWk1TlmKJ1qGuJVDntLVQnSnB6FNqqTswb0AeGkL3+WMTkcnesgh0QmVwtJAhrDSnnLJzsJsMJcNLVjH+1vq2DbSCPwqxZdzdKxNqzyZkZq1bVjdH/Z636IClKpi3iy3/so1XhKbTpAOjVQuS0DYnSWwEHxERZv4v+wi2QWr/WxSd57Iq1IPMs9Z2o+Rt/ox93yYMRIYomDL8toQn7yCDbRf1bDti+lMKkqLtTy91s7u2CoYhRJ+RoTwlORp4Aer536Wgopgmc9JEo8df0is+FV8jC2PekwAJni+bdL/HW/d3kxuLBewuUsKMfEtUV4QD3wUwSuRgTROoarDwx2d9pwkCXuUn6ipTZiYarh33RLbPUH1ApeJtZ5vKmaCZ8tZrdQR//R1eYc07SxWL4okouiWcwSWqRhTe6OqLly8ojHOySyKA+ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR12MB1355.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(4636009)(39860400002)(366004)(136003)(396003)(346002)(376002)(478600001)(16576012)(316002)(6486002)(186003)(54906003)(36756003)(86362001)(8936002)(66476007)(5660300002)(66556008)(66946007)(83380400001)(6666004)(956004)(2616005)(966005)(4326008)(8676002)(52116002)(2906002)(6916009)(26005)(110011004)(136400200001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: jgoWch/9dMjFgo4b2eib7EpQDwmYHAM+gYPexx20JNNoFOaHe+FLvUEHrHP4cWxUPsHZEJz1schuYid91Z7f0hRO2gSGMk9CiA+OYrE0QgH6Yo9gyslg13xz1CksO2WHPUtQHIVysxbRU2wi+tUF+VtWhnhipSXxvgRiGI7JXG48lKVX/QDF7Hh+UnhyWI1i93dS+9cuQsNK1ysbe2beXVKv6k7S6vfXu0md5SHJ5UmhDO5bZpnZeHa3qyC0lRWdWOCFKk+eH1v0kLOyIbnhQWIP2T4JCcQBw7xL29guch9cR1ECq7LqziyN4QPgwuEJ6pkwDa+g+wQZUh2Jc+ekOzKLzAL1uM0e4vEY+cZ9R2GHzPN28b5zwhy4f+rabU0r6iA40crDZRLQs80BsB7Rgw5iqDbipWEQHkB/zFy51wpHBwUz00eh7WnmD9R9zoXC1n3D1yw7SfaLjiC1CmBe6R+6xM+yGI3iCMOqM676t51ENtuhKjNVZr85qbs5oYuHDzS8RkWuLH7n6P7S1YAnAJJG7rOfb/NpGlV0OTW9rsEqYC5GREZiHlWEehLGVRgsemg2kjrtLO/rlxvcv7WpM1OMRRL7Xgk7jgDzvUVCLs5kooZfNZek5Grvq36tgH7K1g5Hlzd4tOzhHsllCfNCnQ== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 70e425f3-0e1e-4434-6190-08d84518cc90 X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1355.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Aug 2020 14:53:28.8030 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: RAa7uaHvtfp8jHapjh8QYc4TUnvi8WlS9onNw/jKVk2gVoPvmkWJ0QzapbO49yBmdj0wAnvU587wTAOadh4zeQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0220 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable From: Tom Lendacky REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2901 The DoDecrement variable in ApWakeupFunction () wasn't always being initialized. Update the code to always fully initialize it. Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Cc: Rahul Kumar Signed-off-by: Tom Lendacky --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpIn= itLib/MpLib.c index 90416c81b616..07426274f639 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -885,9 +885,7 @@ ApWakeupFunction ( UINT64 Status; BOOLEAN DoDecrement; =20 - if (CpuMpData->InitFlag =3D=3D ApInitConfig) { - DoDecrement =3D TRUE; - } + DoDecrement =3D (BOOLEAN) (CpuMpData->InitFlag =3D=3D ApInitConf= ig); =20 while (TRUE) { Msr.GhcbPhysicalAddress =3D AsmReadMsr64 (MSR_SEV_ES_GHCB); --=20 2.28.0