From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR02-HE1-obe.outbound.protection.outlook.com (EUR02-HE1-obe.outbound.protection.outlook.com [40.107.1.76]) by mx.groups.io with SMTP id smtpd.web09.13163.1609766558303163044 for ; Mon, 04 Jan 2021 05:22:38 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=4O72/l8u; spf=pass (domain: arm.com, ip: 40.107.1.76, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MsUJNUna4dfMPcc+4ZMGAng467IQ0PSDJar6QnWiDK0=; b=4O72/l8u6u2JMIgXr7KP+c3xzgyA9AFdUg8O16k2w0UM9Ljj7ZIomFbiZ4ug6YYrpk5WX4Y3HcQEIwaHoNt0dJ37IshLo++/Oks+Vos8w+AfOV7M663L9U8KKEYZxcSzNu1uzGMz6sGCiu5zXsXQDnV3lMas7hp9B8mwy/OiJ3E= Received: from DB6PR0201CA0024.eurprd02.prod.outlook.com (2603:10a6:4:3f::34) by AM0PR08MB5298.eurprd08.prod.outlook.com (2603:10a6:208:188::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.19; Mon, 4 Jan 2021 13:22:35 +0000 Received: from DB5EUR03FT015.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:3f:cafe::1c) by DB6PR0201CA0024.outlook.office365.com (2603:10a6:4:3f::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.20 via Frontend Transport; Mon, 4 Jan 2021 13:22:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT015.mail.protection.outlook.com (10.152.20.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.21 via Frontend Transport; Mon, 4 Jan 2021 13:22:34 +0000 Received: ("Tessian outbound fc5cc0046d61:v71"); Mon, 04 Jan 2021 13:22:34 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 3506d545711355bd X-CR-MTA-TID: 64aa7808 Received: from 4a2051f1e07e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A8B0C2F4-5DD6-4180-B6B6-CD2C43685D82.1; Mon, 04 Jan 2021 13:22:29 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 4a2051f1e07e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 04 Jan 2021 13:22:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g02sa1g9NyE4wAmIxVYU2YxfKecJRD26F4+HwGSmS9h2OKFy9mtqn2Ce7IcDhzJm+5QPHDsFNmBJGpMWod81AvBBbVo76FJZqaA08pajB/z17cUjKYm+XvWwZOUkTmYp9Zx84XNj/tSPP9z1zb8xndBXzWubOGX2e08q7DXQEC/2gTu+92puLeG1+/K0bOkD660Ef2bvggCmqGHqNlljrxZpJZba/X7G7t1COk7oEnH4qdbt0wD2mnxv/aZHY8Hn8pDuhPnZkpviKh342CcXkts9cnvSNfarcyxnT71G6zr9KSMHLZ0bNOThWEZd3e7MO6P9rYkjKby30+SIKAc2+A== 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=MsUJNUna4dfMPcc+4ZMGAng467IQ0PSDJar6QnWiDK0=; b=YNhJd1bzl2R6dLgHi7QytBGg+SDNVxW04SPNj1DoMIqjVoQm9/PiPHZZgr3rK+b7f7ZSH2jlanUm0QCZlrz5FOAuNv5VAZ9RC9tYRMxy/MVl0rXaZi1glhbGJLkESqOJsiwErRwNcBz/w1YRagXzJNM2RyNQB6qiViYaDlhAOMnXwoTfs2koKJH7vjFoj7vQk8gcOsbearNH39TlfFZTzJ0BH4a8rA/629nDZUo2kjbJOd01GTTpp7chHqJ5vN07G6+QLHDNUB5KL4QdOKCG0dYx2ygaVT2weMjxyxs02st21WE7ro5m6NLFLIlPQYxQQ6wQSvBiYkt5yX3WaShr7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MsUJNUna4dfMPcc+4ZMGAng467IQ0PSDJar6QnWiDK0=; b=4O72/l8u6u2JMIgXr7KP+c3xzgyA9AFdUg8O16k2w0UM9Ljj7ZIomFbiZ4ug6YYrpk5WX4Y3HcQEIwaHoNt0dJ37IshLo++/Oks+Vos8w+AfOV7M663L9U8KKEYZxcSzNu1uzGMz6sGCiu5zXsXQDnV3lMas7hp9B8mwy/OiJ3E= Received: from DB6P193CA0014.EURP193.PROD.OUTLOOK.COM (2603:10a6:6:29::24) by PA4PR08MB5917.eurprd08.prod.outlook.com (2603:10a6:102:f1::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.20; Mon, 4 Jan 2021 13:22:27 +0000 Received: from DB5EUR03FT011.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:29:cafe::96) by DB6P193CA0014.outlook.office365.com (2603:10a6:6:29::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.19 via Frontend Transport; Mon, 4 Jan 2021 13:22:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT011.mail.protection.outlook.com (10.152.20.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3721.21 via Frontend Transport; Mon, 4 Jan 2021 13:22:27 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Mon, 4 Jan 2021 13:22:21 +0000 Received: from E107187.Arm.com (10.57.38.43) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Mon, 4 Jan 2021 13:22:21 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , Subject: [PATCH v3 09/26] StandaloneMmPkg: Fix ECC error 5007 in StandaloneMmCpu Date: Mon, 4 Jan 2021 13:21:56 +0000 Message-ID: <20210104132213.22376-10-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 In-Reply-To: <20210104132213.22376-1-sami.mujawar@arm.com> References: <20210104132213.22376-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2df18899-7c3c-4a72-1733-08d8b0b3cc67 X-MS-TrafficTypeDiagnostic: PA4PR08MB5917:|AM0PR08MB5298: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:7219;OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: qbu8XrZ9oFM/eVJ3dZRO43s5htYyAS0s3g5Mv4JD2WuUBtmFjgOaDE5kuZHrHAAPqmgcrgRM6Ir9dpQTFbyqVu/UMS6Wu9QBCtVAxGhS1tbaCFER4PlIk38ZwjjMYizWcohl3c9Jmtyn86x1/nGHitlcstc6WShOqbomEL907dvWU1xc/RUA+z4xoa40qLgoCdc3hbgpi/8T5P83sln24WTwwChGJ9qXycxrbTSOJkc1MgkgGMrDIwzV5O+6NQz9m0xCyyK2bwhnBsaQVEFlZdHmP2kBV7rdOHF7/LL3R/pFNQBM5kqPiRnz4Y2ZfY2qMWDDiw0+Oonk/gTGbFh7BtJFGtZ+0PNI7cZAA+ObNU0025hvV+yB0dj/0KomRKRUVid9vSGAj01YXkvWMCAgwVobSm/iSoHnJ1WzvbxiV6q/TQDhaAaKYX2WKCc13Bhwrfmekt9w0VlWmvrfv2jEx/aiYOTlu1kEoLYAUAMgEF3qjOvRDn+e/tuwhKYU/Lxi1MYG0MwPsbfNcLEmZXClsW/H2t6ynZRwq1GxxPFiP3s= X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(6029001)(4636009)(396003)(376002)(346002)(136003)(39860400002)(46966006)(47076005)(2616005)(186003)(8936002)(54906003)(6666004)(316002)(44832011)(26005)(426003)(478600001)(82310400003)(6916009)(8676002)(4326008)(336012)(356005)(5660300002)(1076003)(7696005)(81166007)(70206006)(83380400001)(2906002)(70586007)(86362001)(82740400003)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB5917 Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT015.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: a1b01ab5-9e62-4223-1bf4-08d8b0b3c83f X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zLa/FCFiaJIflo3/XksfP4c79AmgntTGu7ippOh1D5O2WrW33i5WQS5AQJwvjKpiSWuCgInqMVZAqzP4ctpzcDVjMNjveK8iIKHvvtyJCq3hGIBBRuqdGIC9MW+arB8M6kmEoRwNhs9otnzAJCuThQeao43Wi47fV5OrcsCUbM8nu1ZMFQ1QsA+xgfB3fxFqnm+52AcE0zR8wLylaMfCX/JtJO8vTr0lw8FGoS1ITaxXsf5RFCEFdOITHIzhWL96jYeNiUUMZ8lpQdDQ/8yd8NszFE49mJLmKg8jdVigyqBfv12jB43cvjqWmNQnJNh83Do+4pG/UKU7AGkFuZ/CE2uw57mvPwBj5khtifoh0/eYqQo+sglJbBricDsAOqE96KWsaC6zTJugWGBvqUSXW/0BSbnGV1s972bjd5qY56DNh4vTZ410iFlWFhr2nz62h0kuIUJlhSHfIQmZfvMf5J/EmZDuuxep91Lqt6JUedyS3UesfUVBe8laFgRobJSqZ1rlVv4QMYyLuOaNYk9laIrUwiRnzYgFQh7c2BGMQW8= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(6029001)(4636009)(136003)(346002)(396003)(39860400002)(376002)(46966006)(26005)(336012)(82310400003)(186003)(2616005)(82740400003)(5660300002)(426003)(6916009)(7696005)(47076005)(36756003)(44832011)(2906002)(86362001)(4326008)(8676002)(316002)(54906003)(6666004)(8936002)(70586007)(70206006)(478600001)(81166007)(1076003)(83380400001);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2021 13:22:34.7797 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2df18899-7c3c-4a72-1733-08d8b0b3cc67 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT015.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5298 Content-Type: text/plain Bugzilla: 3150 (https://bugzilla.tianocore.org/show_bug.cgi?id=3150) Fix ECC error "[5007] There should be no initialization of a variable as part of its declaration Variable." Signed-off-by: Sami Mujawar Acked-by: Jiewen Yao --- Notes: v3: - No code change. Added bugzilla ID and resending patch [SAMI] with v3 series. v2: - No code change. Resending patch with v2 series. [SAMI] StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c index 9738e8bd60149efb45ef1b66139e0cec38b6c1fe..7620a65c7e3bbd647961942f5b30d3d834107f70 100644 --- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c +++ b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c @@ -65,8 +65,8 @@ PiMmStandaloneArmTfCpuDriverEntry ( IN UINTN NsCommBufferAddr ) { - EFI_MM_COMMUNICATE_HEADER *GuidedEventContext = NULL; - EFI_MM_ENTRY_CONTEXT MmEntryPointContext = {0}; + EFI_MM_COMMUNICATE_HEADER *GuidedEventContext; + EFI_MM_ENTRY_CONTEXT MmEntryPointContext; EFI_STATUS Status; UINTN NsCommBufferSize; @@ -107,6 +107,7 @@ PiMmStandaloneArmTfCpuDriverEntry ( return EFI_ACCESS_DENIED; } + GuidedEventContext = NULL; // Now that the secure world can see the normal world buffer, allocate // memory to copy the communication buffer to the secure world. Status = mMmst->MmAllocatePool ( @@ -127,6 +128,8 @@ PiMmStandaloneArmTfCpuDriverEntry ( // Stash the pointer to the allocated Event Context for this CPU PerCpuGuidedEventContext[CpuNumber] = GuidedEventContext; + ZeroMem (&MmEntryPointContext, sizeof (EFI_MM_ENTRY_CONTEXT)); + MmEntryPointContext.CurrentlyExecutingCpu = CpuNumber; MmEntryPointContext.NumberOfCpus = mMpInformationHobData->NumberOfProcessors; -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'