From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.44]) by mx.groups.io with SMTP id smtpd.web10.7645.1608210342338575813 for ; Thu, 17 Dec 2020 05:05:42 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=psCyVBya; spf=pass (domain: arm.com, ip: 40.107.8.44, 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=KabFIPXG8OaizOuEpQhmuLkoBXZTon1pwF0ROVH7jU0=; b=psCyVByaT1KGgCt4bakomJx1aGuaN6wFrjG7O2jrXj2EUs9Jm1Dk5wzORPRAQIcbM8FfsKPWq/ockusJqSPpwdVu+7WOb0HxOj4qKQ/pfKYsMWrRt4D6nwBilsyFxSV3IfIoSTwqMjDkSI95i2b1uttpMskCBj2NWQ91fyJZp+8= Received: from DB6PR07CA0012.eurprd07.prod.outlook.com (2603:10a6:6:2d::22) by VI1PR08MB3421.eurprd08.prod.outlook.com (2603:10a6:803:80::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.14; Thu, 17 Dec 2020 13:05:39 +0000 Received: from DB5EUR03FT020.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:2d:cafe::34) by DB6PR07CA0012.outlook.office365.com (2603:10a6:6:2d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.9 via Frontend Transport; Thu, 17 Dec 2020 13:05:39 +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 DB5EUR03FT020.mail.protection.outlook.com (10.152.20.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.22 via Frontend Transport; Thu, 17 Dec 2020 13:05:38 +0000 Received: ("Tessian outbound 8b6e0bb22f1c:v71"); Thu, 17 Dec 2020 13:05:38 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: f74f5fee9b0deef5 X-CR-MTA-TID: 64aa7808 Received: from d3ff16d16ffa.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 495A0325-2034-4073-9DF1-A27ED0559EC0.1; Thu, 17 Dec 2020 13:05:33 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d3ff16d16ffa.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 17 Dec 2020 13:05:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Up/TRnjc0KAB51s0Kd9SRxIfg1E6KYLy8hEix2IbRN6Ypc78yCv+Mjvu1liLJs46iA0/AntqcbFqWwq7cSxfkUbD6WwKfEc2V5bS0w6RHACPBmU5GKLSjbwXrJ5DXhxgiP72RkLuJAqZELDUiKVH5T6owq7u/u1VWQaTduI9Qe2kHxC6+88I9jDkAtTV0nqXlwsPZef5ep9RMDX/GjHffOMnHN7bUOI5UkE2kjWfMtv892MBO8ZS70qRt2mOEy5yid5iveZHog/M4zOKOTCpWbjoNWWgTR2i7YQooiR/G9Oe+VJ/Rxga/qS4uyjTclG1+bTVXj+Wvn54izHne3Q1HQ== 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=KabFIPXG8OaizOuEpQhmuLkoBXZTon1pwF0ROVH7jU0=; b=lVuICkMXM65edpIEMSkjBORXBBij/NQAUUhkjSqvqh2FGAb7PQ5D5FDuAzpDWPMUUGklqEV+2XAOMbhHmLvs9n3QmWBZ1MOPxLBGUXbGU5+kaizvO3AMz2z9qPTkJrh/ae720y55AikpksAMdltwp+VsqXy9NhPfCnDTdw0Ip6eoQK7d7RiA4jY8haAPm0W0xzv+jVvWB5uFbL+zfXmjROnRE1UJpvAIlpjdzjY25XQjOYyfnk/Lfvg/B+a0cchpvYQTlFgoO85HYBw+QTUGHTZBwcDKRzx7kNn0pZBrednTMQOkIZObTTpFvy9eyxg69DFA3GNHedJpaZSbxtn8mg== 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=KabFIPXG8OaizOuEpQhmuLkoBXZTon1pwF0ROVH7jU0=; b=psCyVByaT1KGgCt4bakomJx1aGuaN6wFrjG7O2jrXj2EUs9Jm1Dk5wzORPRAQIcbM8FfsKPWq/ockusJqSPpwdVu+7WOb0HxOj4qKQ/pfKYsMWrRt4D6nwBilsyFxSV3IfIoSTwqMjDkSI95i2b1uttpMskCBj2NWQ91fyJZp+8= Received: from DB9PR01CA0013.eurprd01.prod.exchangelabs.com (2603:10a6:10:1d8::18) by PA4PR08MB6253.eurprd08.prod.outlook.com (2603:10a6:102:e4::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.24; Thu, 17 Dec 2020 13:05:31 +0000 Received: from DB5EUR03FT061.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:1d8:cafe::3c) by DB9PR01CA0013.outlook.office365.com (2603:10a6:10:1d8::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.17 via Frontend Transport; Thu, 17 Dec 2020 13:05:31 +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 DB5EUR03FT061.mail.protection.outlook.com (10.152.21.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3676.22 via Frontend Transport; Thu, 17 Dec 2020 13:05:31 +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; Thu, 17 Dec 2020 13:05:16 +0000 Received: from E107187.Arm.com (10.57.33.43) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Thu, 17 Dec 2020 13:05:16 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , Subject: [PATCH v2 09/26] StandaloneMmPkg: Fix ECC error 5007 in StandaloneMmCpu Date: Thu, 17 Dec 2020 13:04:52 +0000 Message-ID: <20201217130509.12568-10-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 In-Reply-To: <20201217130509.12568-1-sami.mujawar@arm.com> References: <20201217130509.12568-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: d44e0ed7-da9c-42da-32ce-08d8a28c737e X-MS-TrafficTypeDiagnostic: PA4PR08MB6253:|VI1PR08MB3421: 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: 1/jP5f0gWS0bLtQvOeNe2eR8m1M59JFPoVrLafSo/f7TW99UsDJGzh6sllfx3W4yWzvxzUqEr59i/9c6+FaB9fREqO4rNOPFG0IpJpwHs3/b78DXkZr3SQwHpwp6DanLrinG4CPzbRYch7+LB5gXgah127INOa13o+iuJx24FkSnTH1kHCOv43NHr6RD1NG+frdUtybrI6MRYMhWhrKE2RzsfJkMtepV/VpYhqS9wTWjGX+FM8ttnkwaE1iOReU2BgZMGluyylWLh0KW0XmkRPYQP0DebTQg+bcKkaA23eXsGKlzZg2XKgwhWqVchYro6DLrXU0dtf6HOEeIN4vmf2SbrvW4EvBSE/PtranwExBvcG1XcAdBxlIQMIe7iUo8RHJb8A14ZButtTDDv2Fz4Q== 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)(346002)(39860400002)(376002)(396003)(136003)(46966005)(81166007)(4326008)(70206006)(5660300002)(336012)(70586007)(356005)(2616005)(2906002)(26005)(44832011)(82310400003)(478600001)(8676002)(426003)(186003)(7696005)(86362001)(1076003)(82740400003)(6666004)(8936002)(47076004)(6916009)(316002)(36756003)(83380400001)(54906003);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6253 Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 726c23eb-dd46-4c79-cd5a-08d8a28c6ed4 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TfbB+Kcg6gmcXAFMZlvHJ89+saqw21tvFfSoE+MG84PgwQEq0qdZhx1VK5mbQ8oiLWCrZsuh2CclGOSz6lazDZgJ9TbThqDFk6txngByZVLq520MqxedWDBDHCh33hbXyqNXRZRMOVjNK0fR2uebecv8oqVoyVz9Mk9gs6E9t0opEsFk4M+Ckd0Z4xHFpcZP4gtQSepkyS1xSavdHAcx1PEsPBKpd1saqmyqpeC88cXuO54g1bUqcIyzbx0cTmSk6jsT+V3hS6h1LT7ypQSTH3yInaU99YHTJtf/xNT7KhQ4Ohp81HYxIAt8/iczBKHnTbXBgafrg1jBNs41cQ3W7A7iq/cAE9tOyYDGTVhwd9nGBIDnB28yef9y/8uGY4/cDMjwWfmeeC7smd0EIlEWkg== 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)(396003)(136003)(376002)(39850400004)(346002)(46966005)(1076003)(7696005)(2906002)(47076004)(5660300002)(2616005)(54906003)(8676002)(4326008)(44832011)(82310400003)(186003)(316002)(8936002)(70206006)(6666004)(70586007)(36756003)(83380400001)(81166007)(478600001)(426003)(86362001)(26005)(6916009)(82740400003)(336012);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2020 13:05:38.9636 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d44e0ed7-da9c-42da-32ce-08d8a28c737e 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: DB5EUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3421 Content-Type: text/plain 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: 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)'