From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.59]) by mx.groups.io with SMTP id smtpd.web11.448.1607539660822676023 for ; Wed, 09 Dec 2020 10:47:41 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=8Fx+RixH; spf=pass (domain: arm.com, ip: 40.107.22.59, 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=tfAvlnxSByS8i1s8s2e2Ws77DqK7Sf1aDTMjkyyin3Y=; b=8Fx+RixHDRTZVkfmSjINBK8bSB86PZuFiBRxgKB3mz+HydFehrMT5qSjVkfm3Mqlmx6cfu2m6ZcZFVNn+ueZXO9VGzoVYaimEHB6Xv7broCzxzRYSsHsDIGUgJP9ADbb/cKuuMuEfelKNMV4BGB4EWzkcs1vSYHYFZXv7KvgxvA= Received: from MR2P264CA0024.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:1::36) by DB7PR08MB3017.eurprd08.prod.outlook.com (2603:10a6:5:1f::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17; Wed, 9 Dec 2020 18:47:38 +0000 Received: from VE1EUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:1:cafe::a4) by MR2P264CA0024.outlook.office365.com (2603:10a6:500:1::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.21 via Frontend Transport; Wed, 9 Dec 2020 18:47:38 +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 VE1EUR03FT049.mail.protection.outlook.com (10.152.19.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12 via Frontend Transport; Wed, 9 Dec 2020 18:47:38 +0000 Received: ("Tessian outbound 6af064f543d4:v71"); Wed, 09 Dec 2020 18:47:37 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2245f9a8aa46f1d9 X-CR-MTA-TID: 64aa7808 Received: from addda86b27d5.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8E773986-CE07-43EE-96E6-6AE811B09A27.1; Wed, 09 Dec 2020 18:47:20 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id addda86b27d5.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 09 Dec 2020 18:47:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mAbI5kn1i8CgLdzZl1Ditnr0aB7k9Boc4rE/mq3QQUctz/yPlbCj+e+W+JG1FV5w+jrHjJPpsn0pPK8NKCO4LSO37jxOX+2BSMfVadJ0NjyRKhstYee76+aXoGbO3cMtBQ02gGtZXV/Pz+m5/nixuVzTFxV1um/Tfu/WshaxotXRkEAX0cnDQ9/gY0MK7VJ5y6qh9ULqezUDmuB7XapP6vrJvFMGj5nyECqbzYcoaslTn5u6glR8NUbEkJ+a3BXOnEUVlZT5KLjhtc3CqfCSYq2dxdX/CDR7NTLCIFCvng1LBJZS4wbYW9ejH9fh7aNlyIkVRVK2ZTTt8Pgd0Fhvvg== 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=tfAvlnxSByS8i1s8s2e2Ws77DqK7Sf1aDTMjkyyin3Y=; b=VnJEgSMeZusIC6/aFQ+MUyNnxgEmvrnODLhQWcm5mIGY/2F2H6+XvsckcAC8cPz52AhMUWdQl1WbcGsv0uJv5huUj/tetZ8cadLFd5ExMVhOZJ6Bhjd9kC7MaHHC0nFsNjoF/V5KnPhWInsGcIUrcQKx18gBfcxGLl68ER66Tl5qmPqjc9JFfT4gTCBGumE5L1aBsnavQtGNML8vFRi9hSHh8Bp7Sdn90xGwrtgHvyCF6LCt1nqHBVISL3rgYUot0cBKzqIym5YpmSLspQSyJzvkqhQfYCNjWDeM8v5V1mX+zQfBZtRQUOecQwhuPGSaoNkamZwxwHf8yzSI+6IiIw== 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=tfAvlnxSByS8i1s8s2e2Ws77DqK7Sf1aDTMjkyyin3Y=; b=8Fx+RixHDRTZVkfmSjINBK8bSB86PZuFiBRxgKB3mz+HydFehrMT5qSjVkfm3Mqlmx6cfu2m6ZcZFVNn+ueZXO9VGzoVYaimEHB6Xv7broCzxzRYSsHsDIGUgJP9ADbb/cKuuMuEfelKNMV4BGB4EWzkcs1vSYHYFZXv7KvgxvA= Received: from DB6PR0501CA0013.eurprd05.prod.outlook.com (2603:10a6:4:8f::23) by PA4PR08MB6109.eurprd08.prod.outlook.com (2603:10a6:102:e2::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.19; Wed, 9 Dec 2020 18:47:19 +0000 Received: from DB5EUR03FT062.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:8f:cafe::e4) by DB6PR0501CA0013.outlook.office365.com (2603:10a6:4:8f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12 via Frontend Transport; Wed, 9 Dec 2020 18:47:19 +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 DB5EUR03FT062.mail.protection.outlook.com (10.152.20.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3654.12 via Frontend Transport; Wed, 9 Dec 2020 18:47:19 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Wed, 9 Dec 2020 18:47:17 +0000 Received: from E107187.Arm.com (10.57.26.36) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Wed, 9 Dec 2020 18:47:16 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [PATCH v1 09/25] StandaloneMmPkg: Fix ECC error 5007 in StandaloneMmCpu Date: Wed, 9 Dec 2020 18:46:54 +0000 Message-ID: <20201209184710.20912-10-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 In-Reply-To: <20201209184710.20912-1-sami.mujawar@arm.com> References: <20201209184710.20912-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: c78a8379-0dce-4199-1e54-08d89c72e698 X-MS-TrafficTypeDiagnostic: PA4PR08MB6109:|DB7PR08MB3017: 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: ay7kYZ4MiyZFMYVH7/PlMkV5XXIduli0pXlpm8uxdlGyMdyjAkyzK0VizoyPJGjsix8kCXxYtn8m1y6tJvChBtee3HfsZXNZci1FGDmfU4ojY0rmCW1y/b98dRNWV4KtpAR/DEaqaBIycU3QB9u28sSyML68n8adPGbuzN1F5gPxBf8O1RSkIx83M+XJONTHpKIZXoxGRbtY8pNqt82K3CvCYDzRUl3JipI9r5u5zQO3DlXRCL5ciOIvR/JNEjE24Ac1angYYE6xflhGTpoZLs8mNNTML5gQSejM5mg5uZbZPlSte5e44lanCCl6936urfE4GUvSTtDER3bTSePNZnztL/CPrW4w5w4bXYn39117cBYnlMLgDoD9zYQxU+u99CEDzqMIOmcRnwy2ShOSag== 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)(39860400002)(346002)(136003)(396003)(376002)(46966005)(426003)(47076004)(36756003)(8936002)(70586007)(8676002)(70206006)(478600001)(86362001)(2616005)(2906002)(6666004)(44832011)(26005)(4326008)(1076003)(336012)(7696005)(316002)(186003)(82310400003)(5660300002)(356005)(82740400003)(6916009)(83380400001)(81166007)(54906003);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6109 Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT049.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 240be0b6-1607-4daa-abda-08d89c72db34 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1Jr6mGgkiYiX51/OHdyDWqUiFJdvQLy5+zqLdI7uPQLPF1DDdLjIiQssozbRBZc4QWptQpGnzHjxzoALGQIhdNMSDaetB1tP4+dMFLjKzFgRzCGlNF8sb+dXWTIBoYrffD505DcO00Vz1shG8zO1GlzU5BmS7AXOOlb+0vSu8J3uis1wsuUuuYnSkDPyxfYi9toNCwBg0a5QOENnJOHxA4UC0lhEhM7yatJhJSXyHPxcVfLk8Gd+aseqoWfXRx+4PwESRafCpZcuv7n465CuM6c9zjUc4oNs7Gps3pv+5jqtJsW6DtdgODKK8tthrCiOqpYOyA6v0euu0/extcM2YWfEj65cm/X0qxe+qy482BbSHp+Tq1Lng/hqk2NlKGMQDMVP8DCnX/tX4bMfEledQQ== 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)(346002)(396003)(39860400002)(136003)(376002)(46966005)(36756003)(426003)(82310400003)(26005)(1076003)(86362001)(70586007)(44832011)(2616005)(83380400001)(82740400003)(70206006)(5660300002)(4326008)(6916009)(8676002)(6666004)(47076004)(336012)(316002)(7696005)(81166007)(186003)(8936002)(54906003)(478600001)(2906002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2020 18:47:38.0529 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c78a8379-0dce-4199-1e54-08d89c72e698 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: VE1EUR03FT049.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3017 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 --- 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)'