From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (EUR01-HE1-obe.outbound.protection.outlook.com [40.107.13.47]) by mx.groups.io with SMTP id smtpd.web12.13532.1609766595862698967 for ; Mon, 04 Jan 2021 05:23:16 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=vxhqGC33; spf=pass (domain: arm.com, ip: 40.107.13.47, 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=x63WSuZ7CTfPvqvr+vR1giWbcGfHScDHgh4GEsoHM38=; b=vxhqGC33SSUdgRe4SUQ38Q5PR4bCcgqu2HD8x9N0BGxNu0dS5DVkGSsjqlICzKJxN5J5/Opr5bN01+CNwHV6dPjAjUcX6cNMQ37jwDXYQYvSyC+SOXhOXa5ziMJGJwMM7B5cbHEyAULHftfhF9AxHLU/F/V4O00QZoFF4h3K8N8= Received: from DB8PR06CA0010.eurprd06.prod.outlook.com (2603:10a6:10:100::23) by HE1PR0802MB2490.eurprd08.prod.outlook.com (2603:10a6:3:d9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.21; Mon, 4 Jan 2021 13:23:11 +0000 Received: from DB5EUR03FT047.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:100:cafe::e3) by DB8PR06CA0010.outlook.office365.com (2603:10a6:10:100::23) 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:23:11 +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 DB5EUR03FT047.mail.protection.outlook.com (10.152.21.232) 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:23:10 +0000 Received: ("Tessian outbound 6ec21dac9dd3:v71"); Mon, 04 Jan 2021 13:23:10 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 40cf47c92aaecc7e X-CR-MTA-TID: 64aa7808 Received: from 03aeb9de95a5.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1351361B-FA24-4F6E-B3F9-45CC14DB90D9.1; Mon, 04 Jan 2021 13:22:47 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 03aeb9de95a5.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 04 Jan 2021 13:22:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XKv7wh1DoyotXr9KTsEJPTu1AGAmbLp0CUrdy0k+qr2BdT3cpQe20fxtE3XvthZ9uTBQTD65b+gK3ZYDMGhe+yHqEYMZIGMfJS1luKxpJ8SXDSxo5KjY96mD8swGbx8KUdUrZHbiKXTK4uEU7kATS55aGs+o5r3xjodRzX+0wJp5aw/79unLIYAZT4pFpQOtpxPL+b4KbSgeFDOQFUbvFK9/Iz0KzzkzkYDE+sfcqsincZDww4PH+VzOV/sA6zoW7jcg3TMhkl+1wY/XTFLnmox/YRZOPVeo9LK2JKUL6KdrErOJvDLmV3Xs23V0SuJwZ9VXhHwZC3ZabPVo6+5pOA== 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=x63WSuZ7CTfPvqvr+vR1giWbcGfHScDHgh4GEsoHM38=; b=QyX4fmdFBsEWVPe9zhCv+RvrQn99iZq5XtKNKIHuE4T4Ht2KuL3yVZAWJw833jdq7rzlOdvjt1A9C97pyhQwaE9E1IEDd+lvig8i+jm/8mF+MGhEonGZXbsyBhktSktM4wb5CqSifIY4qYogIA6T9uCtKt6EaQ9vCmpo6LD9I7O49bADn0Bf7tIa7k8KcxyRqDmzEy5bko0JG2/YejBTt0C4pE39h0mg8mAI3ALN/Jadkh2RZy9DFKwnmPJeACZhNXiQL4c9EwV49mK0qFbN5yxoMdXxwFSZNbLwMAHHvoeZ0N9bXr6OxOlyJ2PCh9C7M7VqWPxIkJLmz7D0wJG/gw== 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=x63WSuZ7CTfPvqvr+vR1giWbcGfHScDHgh4GEsoHM38=; b=vxhqGC33SSUdgRe4SUQ38Q5PR4bCcgqu2HD8x9N0BGxNu0dS5DVkGSsjqlICzKJxN5J5/Opr5bN01+CNwHV6dPjAjUcX6cNMQ37jwDXYQYvSyC+SOXhOXa5ziMJGJwMM7B5cbHEyAULHftfhF9AxHLU/F/V4O00QZoFF4h3K8N8= Received: from DB7PR05CA0068.eurprd05.prod.outlook.com (2603:10a6:10:2e::45) by HE1PR0802MB2217.eurprd08.prod.outlook.com (2603:10a6:3:c4::8) 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:45 +0000 Received: from DB5EUR03FT038.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:2e:cafe::2c) by DB7PR05CA0068.outlook.office365.com (2603:10a6:10:2e::45) 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:45 +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 DB5EUR03FT038.mail.protection.outlook.com (10.152.21.84) 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:45 +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:33 +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:32 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , Subject: [PATCH v3 21/26] StandaloneMmPkg: Fix ECC error 4002 in StandaloneMmCpu Date: Mon, 4 Jan 2021 13:22:08 +0000 Message-ID: <20210104132213.22376-22-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: 8dbb6d7e-8c54-456d-5e3f-08d8b0b3e1f2 X-MS-TrafficTypeDiagnostic: HE1PR0802MB2217:|HE1PR0802MB2490: 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: +FtJzOPpvlufXwS+GqLQDBtNnnpLsSMdxvXJTiieEgGXMt5Br8QvxPQu1AINu+FqPbu6jNkjWtLDtVPE1mGLdCPKKUTHFebHJp7pGY9kd0EdjdzdhT2mWMuOnMgFME3wi51qOY3lhdyN8QJQCvgS07BsGGgvgnwbHq0sSfJoSAddmMROB3lx/84V8Ap7asg8eqBla73LJgp0j6MTuufOk9fSV0R6trraq8c1EBE5QUsyEubSNkXRmM4068jr3GUurUakgZbKoUSBZ3ea3b9geF9kicFtc93DnG2FMjdYqBk8yO5UgF508wmNJpJUAKWL/LlbfWeFcw16QK4u1ieOXXM4EDHE9uodsHs09fr0g5mQ3UpgY+AOkRUxDW/YgXguhLYaBf5N1twggtWhU3oP7DDQltFv2XF5tqg4L+ZgEEAYyxYWWNcc8Dqum38n7ylelgZ3KbHEqng+XrJmhN/22iSm/Gqhn3Q2a+Yu5mztqrzXGPGDHi3AWHdCiU0JWSgGCOvn4qM6NKrEyx5AlvxloIFhnSHRj8EV/yZBdjUTG4c= 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)(396003)(346002)(136003)(376002)(46966006)(316002)(2906002)(54906003)(8676002)(6666004)(7696005)(83380400001)(82310400003)(186003)(47076005)(82740400003)(26005)(336012)(81166007)(426003)(6916009)(478600001)(36756003)(70206006)(70586007)(4326008)(8936002)(44832011)(86362001)(5660300002)(1076003)(2616005)(356005);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2217 Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT047.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: e069676f-bfcb-4eb2-06f2-08d8b0b3d2cc X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 82r6pkwLClXyNDJerw6LZwx+vre1X7CMKS6IIXFgdnJAtces9asuktEUMGztr/idMfJAqsl8AObJNZtjvIFcOHJbYYliWbfUqqNXTPtUbMbgqX9908DGH8VQnT4I8tbNKHHPVqPLvKObLQr061v4R98essayURnYWBlg99k/a2hOxZABXFIRxNz8wiDacWjq3TxShHHspuvr5Z6zdnIzclY8oJ/apjIex/efObt2sbTMLNrME1IeBhQnmcWn56S7SNsUs30k0jdmhoSLOH8vQXgr2k+s242NCEW4goIegtH4uLaI+NqM2zRzHmZP3y5tAdcqC2I3lL6cmCyitf1ZGVCGkKHP6rURU6qK0Z7aKW9nunCyjbkyRpGoAFkTES03XEmEyOkGHz62bnhHGvu7EoPYqoJnF/IQPwrh4e54XrD0Tk/MM82cbQfulrh3VvePLNxAxrYFdX8bbWEAKghzrm5syMiVUx/czOH9eOYeGeYuo01nsr+AX97pMh6cCpVg9iP2EZw5NCwFq3OPLdabgtLoqJp/hwj+iJJo94eCw8g= 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)(136003)(396003)(39860400002)(376002)(46966006)(6666004)(86362001)(36756003)(81166007)(8936002)(47076005)(44832011)(7696005)(82740400003)(6916009)(2616005)(70206006)(26005)(82310400003)(186003)(70586007)(1076003)(5660300002)(4326008)(2906002)(426003)(8676002)(336012)(54906003)(316002)(83380400001)(478600001);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2021 13:23:10.9247 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8dbb6d7e-8c54-456d-5e3f-08d8b0b3e1f2 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: DB5EUR03FT047.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2490 Content-Type: text/plain Bugzilla: 3150 (https://bugzilla.tianocore.org/show_bug.cgi?id=3150) Fix the ECC reported error "[4002] Function header doesn't exist". 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 | 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)'