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.49]) by mx.groups.io with SMTP id smtpd.web08.480.1607539673609269338 for ; Wed, 09 Dec 2020 10:47:54 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=8iYKUVYz; spf=pass (domain: arm.com, ip: 40.107.8.49, 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=ER20CpqFbNiTikpBVd0UkA7SHmBMDRtGR/M/AaTZrO4=; b=8iYKUVYzkhSzhHILU0+MUVr4iYrAGx+teSQAIODU+K0Afr3bP2WCHXrAA+oXyAgMKUiaNQzvwRFFDWZa+ncsVTtniRUA31GG1azkaLc06m4fqkr+ynPcRFXjwc/D/OWtqoov/uS9xTlNGtQMQQIcPa5MrfLiI9hO2SkJuk0Xfh0= Received: from AM0PR04CA0035.eurprd04.prod.outlook.com (2603:10a6:208:122::48) by VE1PR08MB5661.eurprd08.prod.outlook.com (2603:10a6:800:1b3::13) 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:49 +0000 Received: from AM5EUR03FT023.eop-EUR03.prod.protection.outlook.com (2603:10a6:208:122:cafe::43) by AM0PR04CA0035.outlook.office365.com (2603:10a6:208:122::48) 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:49 +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 AM5EUR03FT023.mail.protection.outlook.com (10.152.16.169) 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:49 +0000 Received: ("Tessian outbound fc5cc0046d61:v71"); Wed, 09 Dec 2020 18:47:49 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 07251bc0687671b9 X-CR-MTA-TID: 64aa7808 Received: from b2df97c9e928.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id B7FA3FE3-7B51-4117-8DA5-7490FDF3CE32.1; Wed, 09 Dec 2020 18:47:33 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b2df97c9e928.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 09 Dec 2020 18:47:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WXboTuwShApWI6h/Q3BEs03gm2mxRd8t0/JpDe6q7qB/gO4oVvzG9xMPbRvpxWSqNxTRavurBGulA4hkzpQSGP/tF+bY2ix74MQyIrgNsO0i5nm2tpZzTUWVX2vCTibNdHYbQD18Jhol2g/a2HDWLS401S8OlnwWa7/aGzOqzn021FyHdjEb00qnsL3WPbUrjshn0Ra644TKApUNGfL7UL43me+/puL1wXOIDhXQV1e7k86up304fEHdvhOX6ePnflgSKKcvUHUDUfpFze6OKR8MTiUZtt92hHI8xr/Oaa0M3iCz6f2+7N63409zua+IkHu1TK+Q9lQs3sYihiVnng== 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=ER20CpqFbNiTikpBVd0UkA7SHmBMDRtGR/M/AaTZrO4=; b=gbPugXkMncnUKYPARs5s1BQCqxoJTk8DpUwyFLdi+uMG9ePz5ohULBJyWvAX1FfXb4r49IXsz61l5N0wuUVymwszYsDKddo1OvGRW+4qoPc8Y0nT5un9ZTU8MQMxEQX/ruUT/n3ZYmY1Vg9kEj8CCcNKB6filFZo6eoAr6+bQYvXA9oAl0/6YvvKpwNvb+EASQKd1m0BafhYnVvlxFVCA4JJIWgjnB4A6LsUId+SGGr03zD+0VSMwz5LVsYJ77c9148Mi7l9qp8eVqtGVpSSlyrfbBZu0bSZPls9oVIBwJit4BftzQI6lS4IAZpZhcoAxg5pp07Huw1JKMZbR0Ck0g== 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=ER20CpqFbNiTikpBVd0UkA7SHmBMDRtGR/M/AaTZrO4=; b=8iYKUVYzkhSzhHILU0+MUVr4iYrAGx+teSQAIODU+K0Afr3bP2WCHXrAA+oXyAgMKUiaNQzvwRFFDWZa+ncsVTtniRUA31GG1azkaLc06m4fqkr+ynPcRFXjwc/D/OWtqoov/uS9xTlNGtQMQQIcPa5MrfLiI9hO2SkJuk0Xfh0= Received: from DB9PR05CA0009.eurprd05.prod.outlook.com (2603:10a6:10:1da::14) by AM6PR08MB4708.eurprd08.prod.outlook.com (2603:10a6:20b:ce::13) 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:31 +0000 Received: from DB5EUR03FT060.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:1da:cafe::e4) by DB9PR05CA0009.outlook.office365.com (2603:10a6:10:1da::14) 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:30 +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 DB5EUR03FT060.mail.protection.outlook.com (10.152.21.231) 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:30 +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; Wed, 9 Dec 2020 18:47:24 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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; Wed, 9 Dec 2020 18:47:23 +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:23 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [PATCH v1 21/25] StandaloneMmPkg: Fix ECC error 4002 in StandaloneMmCpu Date: Wed, 9 Dec 2020 18:47:06 +0000 Message-ID: <20201209184710.20912-22-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: 46f678e0-a2f7-4c87-5993-08d89c72ed55 X-MS-TrafficTypeDiagnostic: AM6PR08MB4708:|VE1PR08MB5661: 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: EKCaT5Npbn2JydTj9rhgl6x8HDvsNu8vYrtKbqS7N31zckL4pZzM8ortMnydpUha3SPYDWnQ3AN9Rv5xTAILUmsdOJtVvQ/pxrN5jF0NC04+3XhKLh0LJiPWzV/5Xp8sddH4jxImhz3ImigqWltBmT0PknaSsGiQc5rKXk4QwNqHJ6ZZ2oifpjuqNMbAdilavvMbUmhbkh6gYXfxlx1yBLaXYmXH7A73XLeDa8N+JrscFsjZdsbjM6B7gzyujWAh1BPtqRYFIKC0TapUIRNU7zmFOy/N/wCTSABzX0JM5hjaX6o3uJUryqabijC15gSnHbr7t6GLNOZzoIZSY5+nxaYXq4Lz8Doisfwt7oi4lQNJdsSH11Wgl7Uo4y5QxWacYXEhe2qwPUu8Szt0ckX6Zg== 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)(376002)(396003)(46966005)(1076003)(36756003)(186003)(6666004)(4326008)(5660300002)(316002)(86362001)(54906003)(82310400003)(47076004)(356005)(2616005)(83380400001)(6916009)(82740400003)(7696005)(70206006)(2906002)(26005)(70586007)(478600001)(81166007)(8936002)(426003)(44832011)(8676002)(336012);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4708 Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: f1eebd4c-1b7b-4a65-2f7f-08d89c72e209 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Owl6pGNnkJ3wrM7/k1DFC1moNoZkEt62pfS/4J59YCsSrwPMPEWXW2iuPYJt94TaL+rTfJhfXwqMNppWbAOU2JpAlFw2uHpfiyVPdXQ/AFHtZxjw8kdo0QPUORX4bgKYifPbJgAwa/u8sVUiHzrzDU2l4O6OnSzLydaIILEE+1TAa9ZWWiiASsd8b7Qt0jQW6FhgloXPw0rsFGVnTin6C2fD9EQ2nBLdnkcZHjmxDR/9yErRx0K3APXBmvhEweYR/du0E/dJukz2A8LbsUWtzjksGRzzj0lmXEbXaUbFauP6f8d+kR9hBkm7xUiSYwSFzrKquNeoYFoYeY4XdKe2US0Yxry2TeNywiUaJdSMGbX3caPD7C1G9TsEJXZWmr2A2zBw6Q+7t+3t73vv768RnA== 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)(376002)(46966005)(6666004)(6916009)(81166007)(5660300002)(36756003)(1076003)(86362001)(47076004)(8676002)(36906005)(2616005)(2906002)(8936002)(426003)(54906003)(508600001)(7696005)(4326008)(336012)(82310400003)(26005)(44832011)(70206006)(70586007)(83380400001)(186003);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2020 18:47:49.4313 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 46f678e0-a2f7-4c87-5993-08d89c72ed55 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: AM5EUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5661 Content-Type: text/plain Fix the ECC reported error "[4002] Function header doesn't exist". Signed-off-by: Sami Mujawar --- 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)'