From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (EUR01-DB5-obe.outbound.protection.outlook.com [40.107.15.79]) by mx.groups.io with SMTP id smtpd.web10.7680.1608210395956192792 for ; Thu, 17 Dec 2020 05:06:37 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=JbttaLBT; spf=pass (domain: arm.com, ip: 40.107.15.79, 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=ABybEIQR3GqYLb5Br0bYaX23rZLY7QOF6AiBCPOg3P8=; b=JbttaLBTQ4SXcWppG8FS6ecXKROrJ+B8cVWCyln8gCFpK1hAKk9w+2qbM4GRVfelydgZgX6dBT0Q1MqLNHi5Z8+fKt4qV71a2vlxvtNbYEAxH931un9BHSFBnMpCrplc5aL6n8vsRtOUA8m4KplO/PK3ifBybaREO+H1xNTrQgM= Received: from AM5PR0201CA0014.eurprd02.prod.outlook.com (2603:10a6:203:3d::24) by VE1PR08MB5566.eurprd08.prod.outlook.com (2603:10a6:800:1a9::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12; Thu, 17 Dec 2020 13:06:32 +0000 Received: from AM5EUR03FT048.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:3d:cafe::51) by AM5PR0201CA0014.outlook.office365.com (2603:10a6:203:3d::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12 via Frontend Transport; Thu, 17 Dec 2020 13:06:32 +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 AM5EUR03FT048.mail.protection.outlook.com (10.152.17.177) 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:06:31 +0000 Received: ("Tessian outbound fc5cc0046d61:v71"); Thu, 17 Dec 2020 13:06:30 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: bb18121763117bf9 X-CR-MTA-TID: 64aa7808 Received: from 1fcb0ebb5125.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D5523D5F-7405-4513-B855-7424FDCF0378.1; Thu, 17 Dec 2020 13:05:53 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1fcb0ebb5125.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 17 Dec 2020 13:05:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kqr1EZ5xvF70xg/cGZp5oLCeg25S8KFzt3XT7auGjBEn6N14JC25DTwT3xLAblkzdVnweKVhsQx+MGG8bop+mfgtX3IDTK73QOk/n2n/WSzaa9cYVJoki2f6zr6vv7/1gsKq+T/UCi/6ivlujMo6ab22ijV+QFBOg+m5CiYZLioWmaP/HZMf6qOz2l6+WXGxSPugA7KDW8RHd3is3+eMNhXZ9st55vitvJXmTqv/K4Fi+Y5OlsvjIGsf2RzvftVpgeZC3O9bNJZqoaAWPB7ZkcW9DMsr3vQWEXEPuWHShi1H3d0BEUyk+kWEpPi9P758kT3o7qlRdMv9341zaj1bsg== 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=ABybEIQR3GqYLb5Br0bYaX23rZLY7QOF6AiBCPOg3P8=; b=J6GYkbXI/RoDl32K3Deb/oE1CPB0eO0U6hoUyL7DbRZwlNc42/VSZHVSb+ihNug9jmcCkepgAlHQi3jHQVhPXRyB1q8ViXb3pnihnkUuBcPPYyOkQI5cLD3ma5d5TGFIy63dT31j/WA1eJUjam12hGUKyT3Yt54quurLzpybvvsXxlRwvG62ePEeoi9m+qEvX2zwtjdNCeUsZLhCwf53g4cxcYr/yCk53FXJEzRSeDVXuzez5OTAyzYoPmqFZKK5t0JleTsXTkm40+BCw4aa3I/pUxH/CyxdMwtWmRtjJeQDlB3xXPfpSMC9ugCCSx/YZHzALMC1EOCpOAKaDHQTeA== 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=ABybEIQR3GqYLb5Br0bYaX23rZLY7QOF6AiBCPOg3P8=; b=JbttaLBTQ4SXcWppG8FS6ecXKROrJ+B8cVWCyln8gCFpK1hAKk9w+2qbM4GRVfelydgZgX6dBT0Q1MqLNHi5Z8+fKt4qV71a2vlxvtNbYEAxH931un9BHSFBnMpCrplc5aL6n8vsRtOUA8m4KplO/PK3ifBybaREO+H1xNTrQgM= Received: from DB6PR0301CA0030.eurprd03.prod.outlook.com (2603:10a6:4:3e::40) by AS8PR08MB6296.eurprd08.prod.outlook.com (2603:10a6:20b:29d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.21; Thu, 17 Dec 2020 13:05:52 +0000 Received: from DB5EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:3e:cafe::9e) by DB6PR0301CA0030.outlook.office365.com (2603:10a6:4:3e::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12 via Frontend Transport; Thu, 17 Dec 2020 13:05:52 +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 DB5EUR03FT037.mail.protection.outlook.com (10.152.20.215) 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:52 +0000 Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2044.4; Thu, 17 Dec 2020 13:05:24 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1779.2; Thu, 17 Dec 2020 13:05:23 +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:23 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , Subject: [PATCH v2 21/26] StandaloneMmPkg: Fix ECC error 4002 in StandaloneMmCpu Date: Thu, 17 Dec 2020 13:05:04 +0000 Message-ID: <20201217130509.12568-22-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: 9676c7d4-577a-4b4f-c2cd-08d8a28c930a X-MS-TrafficTypeDiagnostic: AS8PR08MB6296:|VE1PR08MB5566: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:5516;OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: mEW33pno1ADQEp4b26ycXS7Zn6a3ToHMz27SCR8Nu/Mj7R4/aGf1JjpbxIUCO5/IZztJoAN3Ge1kHP0Z15R4Sk4qWxMBkur8MP6mymFz9OIjyYRVnrf9zdqekkJlZP36+SBAHVnSTClWffAFym+nktevtTKaod+51K0ev/uXTxwdEGYPceN3s0TCafJfLnjzuriGaKf4lozONl+R8fBhwsRxucLKA7o5Es/9pxLnKc4GQWnBiqUaZg1SASM60ppYGzz/A9IJNa8DgvsytQmkdILf2i7KmA7v1T/UZ54b14WBTqFBNR065RIV6akjR2w8V8LEnJMWHy1+iA2CIOUrouDInuDDB7QObFm+dLJK7WVbvGxBBx9o6bzFe+waxWc3BO4YZ8hKS8sBtT70gaKiQg== 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)(136003)(39850400004)(376002)(396003)(346002)(46966005)(8936002)(5660300002)(82310400003)(44832011)(1076003)(478600001)(6666004)(4326008)(7696005)(81166007)(8676002)(316002)(26005)(186003)(70206006)(86362001)(82740400003)(70586007)(47076004)(2906002)(6916009)(2616005)(426003)(356005)(83380400001)(336012)(54906003)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6296 Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: ede9fd31-5d2a-4701-54ab-08d8a28c7b48 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CwsTSefwUGL7lEgGGwToOXm2giUtO1/VPfHxTJyNlz2/dHnzTq4LAWgVoIh/aRK+TrejOaVVzrgP2a4pGEM6OBAlckvfUjUolRh3gdbaZEVE9gFHHOQuK9V5sUGVK1F2BoRvEnzt6DtJvojOucjeHubozE3PAKeV/QI9EN8Ff9TZMJ3wTRv7KvGv0lXQvwGffidkzuhgWRSWnNWeCMa8rBCwf188v3/3xD0Bct1wxKc6+bj4El4IypjBKkGR5qDrpl84bd1ZUVQtJzJFgSI9Mfw4rSGNmIz3kAXQmhwhmBCLO66FTBB4F+rCEsB2iQLNSK4KJ/6OUrASjQNh27BifoJgi8uPP4lcb3gVXj0PHsmRyu+NsfIMGH33KzOIw9QV0SbDI/GCE2MbDj1ifm4soA== 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)(39850400004)(346002)(396003)(376002)(136003)(46966005)(81166007)(82310400003)(44832011)(1076003)(7696005)(2616005)(6916009)(186003)(82740400003)(4326008)(336012)(316002)(6666004)(36756003)(83380400001)(26005)(2906002)(5660300002)(8936002)(70206006)(47076004)(478600001)(426003)(86362001)(54906003)(8676002)(70586007);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2020 13:06:31.8252 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9676c7d4-577a-4b4f-c2cd-08d8a28c930a 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: AM5EUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5566 Content-Type: text/plain Fix the ECC reported error "[4002] Function header doesn't exist". 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 | 9 ++++-- StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.c | 23 ++++++++++++++- StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.h | 31 +++++++++++++++++++- 3 files changed, 58 insertions(+), 5 deletions(-) diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c index 006f95989124ee0151e3cdf42b4dd4a5be80a6aa..7fe912b0c9411819e81c668ffd92a70c2cac84bb 100644 --- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c +++ b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c @@ -196,10 +196,13 @@ MmFoundationEntryRegister ( This function is the main entry point for an MM handler dispatch or communicate-based callback. - @param DispatchHandle The unique handle assigned to this handler by MmiHandlerRegister(). - @param Context Points to an optional handler context which was specified when the handler was registered. + @param DispatchHandle The unique handle assigned to this handler by + MmiHandlerRegister(). + @param Context Points to an optional handler context which was + specified when the handler was registered. @param CommBuffer A pointer to a collection of data in memory that will - be conveyed from a non-MM environment into an MM environment. + be conveyed from a non-MM environment into an + MM environment. @param CommBufferSize The size of the CommBuffer. @return Status Code diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.c b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.c index 7c004c8013460bb7f1690351aa64eeaa9eab91dc..11c97fd8b62d6c49743422d5e0e2da46ac64327e 100644 --- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.c +++ b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.c @@ -44,6 +44,16 @@ EFI_MM_SYSTEM_TABLE *mMmst = NULL; // STATIC EFI_HANDLE mMmCpuHandle = NULL; +/** Returns the HOB data for the matching HOB GUID. + + @param [in] HobList Pointer to the HOB list. + @param [in] HobGuid The GUID for the HOB. + @param [out] HobData Pointer to the HOB data. + + @retval EFI_SUCCESS The function completed successfully. + @retval EFI_INVALID_PARAMETER Invalid parameter. + @retval EFI_NOT_FOUND Could not find HOB with matching GUID. +**/ EFI_STATUS GetGuidedHobData ( IN VOID *HobList, @@ -70,9 +80,20 @@ GetGuidedHobData ( return EFI_SUCCESS; } +/** Entry point for the Standalone MM CPU driver. + + @param [in] ImageHandle Unused. Not actual image handle. + @param [in] SystemTable Pointer to MM System table. + + @retval EFI_SUCCESS The function completed successfully. + @retval EFI_INVALID_PARAMETER Invalid parameter. + @retval EFI_OUT_OF_RESOURCES Out of resources. + @retval EFI_NOT_FOUND Failed to find the HOB for the CPU + driver endpoint descriptor. +**/ EFI_STATUS StandaloneMmCpuInitialize ( - IN EFI_HANDLE ImageHandle, // not actual imagehandle + IN EFI_HANDLE ImageHandle, // not actual imagehandle IN EFI_MM_SYSTEM_TABLE *SystemTable // not actual systemtable ) { diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.h b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.h index 47a020c27b9591436d0559f34e0dcd0e7443aa93..23b60a2c991840a6b422e198f136947399074870 100644 --- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.h +++ b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.h @@ -2,7 +2,7 @@ Private header with declarations and definitions specific to the MM Standalone CPU driver - Copyright (c) 2017 - 2018, ARM Limited. All rights reserved. + Copyright (c) 2017 - 2020, Arm Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -33,6 +33,19 @@ extern EFI_MMRAM_DESCRIPTOR mNsCommBuffer; extern MP_INFORMATION_HOB_DATA *mMpInformationHobData; extern EFI_MM_CONFIGURATION_PROTOCOL mMmConfig; +/** + The PI Standalone MM entry point for the TF-A CPU driver. + + @param [in] EventId The event Id. + @param [in] CpuNumber The CPU number. + @param [in] NsCommBufferAddr Address of the NS common buffer. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter was invalid. + @retval EFI_ACCESS_DENIED Access not permitted. + @retval EFI_OUT_OF_RESOURCES Out of resources. + @retval EFI_UNSUPPORTED Operation not supported. +**/ EFI_STATUS PiMmStandaloneArmTfCpuDriverEntry ( IN UINTN EventId, @@ -40,6 +53,22 @@ PiMmStandaloneArmTfCpuDriverEntry ( IN UINTN NsCommBufferAddr ); +/** + This function is the main entry point for an MM handler dispatch + or communicate-based callback. + + @param DispatchHandle The unique handle assigned to this handler by + MmiHandlerRegister(). + @param Context Points to an optional handler context which was + specified when the handler was registered. + @param CommBuffer A pointer to a collection of data in memory that will + be conveyed from a non-MM environment into an + MM environment. + @param CommBufferSize The size of the CommBuffer. + + @return Status Code + +**/ EFI_STATUS EFIAPI PiMmCpuTpFwRootMmiHandler ( -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'