From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id B3781D80D0B for ; Wed, 27 Sep 2023 10:11:05 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=QkCBNO6EatSAptAJKy/GZibHqASu+TfXgCsP0shL5pg=; c=relaxed/simple; d=groups.io; h=Received-SPF:ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:Authentication-Results-Original:nodisclaimer:MIME-Version:Original-Authentication-Results:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1695809464; v=1; b=i00ak3X83F3Gjbv9ianGZnEVPAsDruB+w7UbYOCDuiF2OUckO4kk0E2Ifp1+ITcR/NL5+qD9 lZYNlzxENo2bwSur9GWtqPgjVXT/3xzmttSMtpFXhiO+FnZgF4jQWNXDByjeyYOXZ9GY74ZBNRm M0OmVXf7xA7qEMjLxap511Ds= X-Received: by 127.0.0.2 with SMTP id is2EYY7687511x9FAXyJeV7k; Wed, 27 Sep 2023 03:11:04 -0700 X-Received: from EUR02-AM0-obe.outbound.protection.outlook.com (EUR02-AM0-obe.outbound.protection.outlook.com [40.107.247.77]) by mx.groups.io with SMTP id smtpd.web10.13899.1695809462803857288 for ; Wed, 27 Sep 2023 03:11:03 -0700 X-Received: from AS8P250CA0022.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:330::27) by PAVPR08MB9554.eurprd08.prod.outlook.com (2603:10a6:102:313::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Wed, 27 Sep 2023 10:10:58 +0000 X-Received: from AM7EUR03FT012.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:330:cafe::66) by AS8P250CA0022.outlook.office365.com (2603:10a6:20b:330::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21 via Frontend Transport; Wed, 27 Sep 2023 10:10:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;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; pr=C X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT012.mail.protection.outlook.com (100.127.141.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21 via Frontend Transport; Wed, 27 Sep 2023 10:10:57 +0000 X-Received: ("Tessian outbound d084e965c4eb:v175"); Wed, 27 Sep 2023 10:10:57 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b3df354b08c11f22 X-CR-MTA-TID: 64aa7808 X-Received: from 206410829233.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FE95D4D1-A758-4797-9C5F-278A4BDE5CA8.1; Wed, 27 Sep 2023 10:10:51 +0000 X-Received: from EUR02-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 206410829233.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 27 Sep 2023 10:10:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oUqSM27AehHTDo1t4it3RmMHJicQi/4+LQwv5WpYLRm71VCusEw0j3/wRjihyvOhg4ec3+l57R6hepssG8qUDd2Sc4mrAA9SidSlwsooIZeE8RvqQFH7fmkIA3OYbIDABTxAxUHO0I5+IKzzFGaNbT5xSIMnQM1W/iHcB9GErI0y/iKorCyrX0R14xOm7qb9GxQxEJwa2fPbUDvr9p2dpHDTD/hc8ladZcH6oHW6FWCFsBFjSYoA2dxXB5Xc6ZLGJnp2mYBu3sDX8p6NiFjlZUbUMeAyrS8dDCtrGh4s4MXv2uMSJ60d5vUZyPhUs9PUN/me7ISykIkBGSAs07i/OA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=q9gqdD9kdwoUGbUccv1sCcebK8X610v62a873FioyFc=; b=AGzLBN2J4zGvv8qL3em7OL0b0lCLBWu1LoN6xhZKY2kXhNqqQgU9fHBLCx0Eryw93O8qkPGqfafTz60d3xC3bZD2k0U4akAp0vbvDt2C+N7hBVWb1IaPVb6uVIVRWaMkJMkaf1BzkkL8Vw1bBYI7IBgxIw5SNFPgwOdYkZXUwy1zTiOUkMQJ29rcM1zowA9zTCS+4ibhA00jYIHoasJ/Zi0PyA9iwx0J/fmaGdHtQblQIFVgLoE/w+D5PZNSvrlrIAY7PKiJuKMJXhs9JCF+/hETLyTrckMUPuymuwSH9a+am87VQFFbdDlPUEdAH3z6253m2DYsb1BIgoCr50PFOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none X-Received: from AM0PR08MB4289.eurprd08.prod.outlook.com (2603:10a6:208:148::12) by AS8PR08MB7864.eurprd08.prod.outlook.com (2603:10a6:20b:52f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.25; Wed, 27 Sep 2023 10:10:48 +0000 X-Received: from AM0PR08MB4289.eurprd08.prod.outlook.com ([fe80::edbe:a5b0:5fb6:87b5]) by AM0PR08MB4289.eurprd08.prod.outlook.com ([fe80::edbe:a5b0:5fb6:87b5%4]) with mapi id 15.20.6838.016; Wed, 27 Sep 2023 10:10:48 +0000 From: "levi.yun" To: "devel@edk2.groups.io" , "tphan@ventanamicro.com" CC: "ardb+tianocore@kernel.org" , Sami Mujawar , "ray.ni@intel.com" , "huangming@linux.alibaba.com" , "sunilvl@ventanamicro.com" , "yong.li@intel.com" Subject: Re: [edk2-devel] [PATCH v2 2/2] StandaloneMmPkg: Arm: Update to use the new StandaloneMmCpu driver Thread-Topic: [edk2-devel] [PATCH v2 2/2] StandaloneMmPkg: Arm: Update to use the new StandaloneMmCpu driver Thread-Index: AQHZ52DtUUjUk5mVs0OKe0KEXLbGhbAuhvw+ Date: Wed, 27 Sep 2023 10:10:48 +0000 Message-ID: References: <20230914231037.23950-1-tphan@ventanamicro.com> <20230914231037.23950-3-tphan@ventanamicro.com> In-Reply-To: <20230914231037.23950-3-tphan@ventanamicro.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: AM0PR08MB4289:EE_|AS8PR08MB7864:EE_|AM7EUR03FT012:EE_|PAVPR08MB9554:EE_ X-MS-Office365-Filtering-Correlation-Id: 7d3b459f-78a0-4f8b-6195-08dbbf420b21 x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: fktff9rEiZ4abefs5zUFMnBnH4M0dnVTCIrDuI5uPsN5PfFGJcqKSIpsfTWhnCpu3/IiLS6BvSib4mjcyMFl4TYllwIcxvcCp6Ioa9IdC8OlYRDcMy/WyhK0mbkAgpF4o+H2M8pj8OQahGwEKgR12vjb0Num85JMdxcCFFrQHqvRW1sb71kL9ZnCx13lqk/7gIw1qkiWOzvLj6OlB3gFnnin3KWSFSxl8S2UzyB4Ez2ju5JpaPZYQ8+iFv4L3VpgOnAoJBj71+CmRn8gV9wdvwSMR77b8QgyVJ1757NpTnbnzAoPudXesb+GosvHfr4waU6DmXdk2xstManI8lRbUYY1uGeC6KSyUtrIyTG1tYn/+ov1ZBNMS51YOMk3EI1EkA2heLxC2ZV4Amjp6FCnFVbR5SPYa7ChvpmfYqTs82rDuQZ3MgP6uUXaOlEswOlgeWLoN9+pO9//sj1hjdRJWVv3lOSFvq7Gs6ZOQSeC3efysPIc7Hh32xfzHf9SMNZTKXwRKuTawDCGjXSHTKWbOthnRf0uHlrG20LFUFaQmBAGABV8CtZ0TwNAJprWkaux3jGNCBFH8dMCUAiNMq7CB6xC8NGfQzpIHCtuJ2dOyvw= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR08MB4289.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(6029001)(396003)(346002)(136003)(366004)(39860400002)(376002)(230922051799003)(451199024)(1800799009)(186009)(83380400001)(66899024)(5660300002)(41300700001)(55016003)(52536014)(86362001)(91956017)(66556008)(110136005)(76116006)(2906002)(66946007)(478600001)(4326008)(38070700005)(54906003)(38100700002)(71200400001)(316002)(64756008)(66446008)(122000001)(15650500001)(8676002)(8936002)(53546011)(966005)(9686003)(33656002)(66476007)(7696005)(26005)(6506007);DIR:OUT;SFP:1101; MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB7864 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT012.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 24460f1e-97f4-441c-38e4-08dbbf420554 X-Microsoft-Antispam-Message-Info: W36tXd9EYMs6+0EtB9QICl5smtHjzOf9yCNODVhNzp1y/g+b3WYJXmmtyiQ494hg/XcPix2c5ZKS37JWdEbw6FeXOuyntLv/DZCYW8hcPvVL7jaIbsbiHlwd/NtcXf5QjtcQqmOBUH9p85N8RF9sh0oJ4phRUTtSF0avBjehrm+Oxs/YOFX3sICmDepsM+LZBt3/z1pKtIQHijSJw6cNt92fxDRzxD/C6/o1yzpYUXNwqfrHBLQgm3ITqVT9m7fZ7caCEzOVeCrvdpcLiE8tbuF8T8V1oo6HQJyese64OCZHXuQQVv2Py52UrIy+sTIZYMfEoikRaWRMyBs7MXwe7PW4ZE2h1ONNBkwH/dxiexfkNKBJrqMgB1gcALDmK/wUiyecvkSKxEzCI8i1BuNlefoKIJBQ5io96QUL4nW3uV4ldNdszbgE1JlsPK+CL2vrtdNIsT2jCY3MLvbLmCjWMTBrC+8lOAzC+rz0xaC4dzXIwRHxTttLCP1uVo4D53Y3mh95vS59dK5QUEkm+tpuxZYK2afjISwyyKXYNNRP6K93b3fbaXiMOkKrmYVA/bs8Htibc8+D1t/gFZUJyxNzJVRbRynK7f9lbTXnWeeDqFVaNB0u8TjqOIelr0dYDgvvSN1vmoHIIuDu0c3bkQr9LdSH9VyfrotHWee6QnDrwm/brrm3CJf3Yx8WqxglWHMddrj7KEELL7cIli/NONNdTr72JZmiIqKhjsrJ4KhXGME= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2023 10:10:57.7759 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7d3b459f-78a0-4f8b-6195-08dbbf420b21 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: AM7EUR03FT012.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9554 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,yeoreum.yun@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: h45JdMK3CHCex5bt3Rm6lkvwx7686176AA= Content-Language: en-GB Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=i00ak3X8; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") Look good to me. Thanks! Reviewed-by: levi.yun ________________________________________ From: devel@edk2.groups.io on behalf of Tuan Phan vi= a groups.io Sent: 15 September 2023 00:10 To: devel@edk2.groups.io Cc: ardb+tianocore@kernel.org; Sami Mujawar; ray.ni@intel.com; huangming@li= nux.alibaba.com; sunilvl@ventanamicro.com; yong.li@intel.com; Tuan Phan Subject: [edk2-devel] [PATCH v2 2/2] StandaloneMmPkg: Arm: Update to use th= e new StandaloneMmCpu driver Update entry point library for Arm to use the new platform independent StandaloneMmCpu driver. Signed-off-by: Tuan Phan --- .../Library/Arm/StandaloneMmCoreEntryPoint.h | 17 ++------ .../Arm/CreateHobList.c | 43 ++++++++++--------- .../Arm/StandaloneMmCoreEntryPoint.c | 15 ++++++- .../StandaloneMmCoreEntryPoint.inf | 2 +- 4 files changed, 40 insertions(+), 37 deletions(-) diff --git a/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint= .h b/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h index 41bf0f132b4f..dbb81610ff8e 100644 --- a/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h +++ b/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h @@ -10,6 +10,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef __STANDALONEMMCORE_ENTRY_POINT_H__ #define __STANDALONEMMCORE_ENTRY_POINT_H__ +#include #include #include @@ -47,18 +48,6 @@ typedef struct { EFI_SECURE_PARTITION_CPU_INFO *CpuInfo; } EFI_SECURE_PARTITION_BOOT_INFO; -typedef -EFI_STATUS -(*PI_MM_ARM_TF_CPU_DRIVER_ENTRYPOINT) ( - IN UINTN EventId, - IN UINTN CpuNumber, - IN UINTN NsCommBufferAddr - ); - -typedef struct { - PI_MM_ARM_TF_CPU_DRIVER_ENTRYPOINT *ArmTfCpuDriverEpPtr; -} ARM_TF_CPU_DRIVER_EP_DESCRIPTOR; - typedef RETURN_STATUS (*REGION_PERMISSION_UPDATE_FUNC) ( IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length @@ -145,8 +134,8 @@ LocateStandaloneMmCorePeCoffData ( VOID * EFIAPI CreateHobListFromBootInfo ( - IN OUT PI_MM_ARM_TF_CPU_DRIVER_ENTRYPOINT *CpuDriverEntryPoint, - IN EFI_SECURE_PARTITION_BOOT_INFO *PayloadBootInfo + IN OUT PI_MM_CPU_DRIVER_ENTRYPOINT *CpuDriverEntryPoint, + IN EFI_SECURE_PARTITION_BOOT_INFO *PayloadBootInfo ); /** diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateH= obList.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHob= List.c index 2ac2d354f06a..80ed532352af 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHobList.= c +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHobList.= c @@ -13,6 +13,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include +#include #include #include #include @@ -39,7 +40,7 @@ extern EFI_GUID gEfiStandaloneMmNonSecureBufferGuid; // GUID to identify HOB where the entry point of the CPU driver will be // populated to allow this entry point driver to invoke it upon receipt of= an // event -extern EFI_GUID gEfiArmTfCpuDriverEpDescriptorGuid; +extern EFI_GUID gEfiMmCpuDriverEpDescriptorGuid; /** Use the boot information passed by privileged firmware to populate a HOB= list @@ -52,22 +53,22 @@ extern EFI_GUID gEfiArmTfCpuDriverEpDescriptorGuid; **/ VOID * CreateHobListFromBootInfo ( - IN OUT PI_MM_ARM_TF_CPU_DRIVER_ENTRYPOINT *CpuDriverEntryPoint, - IN EFI_SECURE_PARTITION_BOOT_INFO *PayloadBootInfo + IN OUT PI_MM_CPU_DRIVER_ENTRYPOINT *CpuDriverEntryPoint, + IN EFI_SECURE_PARTITION_BOOT_INFO *PayloadBootInfo ) { - EFI_HOB_HANDOFF_INFO_TABLE *HobStart; - EFI_RESOURCE_ATTRIBUTE_TYPE Attributes; - UINT32 Index; - UINT32 BufferSize; - UINT32 Flags; - EFI_MMRAM_HOB_DESCRIPTOR_BLOCK *MmramRangesHob; - EFI_MMRAM_DESCRIPTOR *MmramRanges; - EFI_MMRAM_DESCRIPTOR *NsCommBufMmramRange; - MP_INFORMATION_HOB_DATA *MpInformationHobData; - EFI_PROCESSOR_INFORMATION *ProcInfoBuffer; - EFI_SECURE_PARTITION_CPU_INFO *CpuInfo; - ARM_TF_CPU_DRIVER_EP_DESCRIPTOR *CpuDriverEntryPointDesc; + EFI_HOB_HANDOFF_INFO_TABLE *HobStart; + EFI_RESOURCE_ATTRIBUTE_TYPE Attributes; + UINT32 Index; + UINT32 BufferSize; + UINT32 Flags; + EFI_MMRAM_HOB_DESCRIPTOR_BLOCK *MmramRangesHob; + EFI_MMRAM_DESCRIPTOR *MmramRanges; + EFI_MMRAM_DESCRIPTOR *NsCommBufMmramRange; + MP_INFORMATION_HOB_DATA *MpInformationHobData; + EFI_PROCESSOR_INFORMATION *ProcInfoBuffer; + EFI_SECURE_PARTITION_CPU_INFO *CpuInfo; + MM_CPU_DRIVER_EP_DESCRIPTOR *CpuDriverEntryPointDesc; // Create a hoblist with a PHIT and EOH HobStart =3D HobConstructor ( @@ -144,13 +145,13 @@ CreateHobListFromBootInfo ( // Create a Guided HOB to enable the ARM TF CPU driver to share its entr= y // point and populate it with the address of the shared buffer - CpuDriverEntryPointDesc =3D (ARM_TF_CPU_DRIVER_EP_DESCRIPTOR *)BuildGuid= Hob ( - &gEfiArmT= fCpuDriverEpDescriptorGuid, - sizeof (A= RM_TF_CPU_DRIVER_EP_DESCRIPTOR) - ); + CpuDriverEntryPointDesc =3D (MM_CPU_DRIVER_EP_DESCRIPTOR *)BuildGuidHob = ( + &gEfiMmCpuDri= verEpDescriptorGuid, + sizeof (MM_CP= U_DRIVER_EP_DESCRIPTOR) + ); - *CpuDriverEntryPoint =3D NULL; - CpuDriverEntryPointDesc->ArmTfCpuDriverEpPtr =3D CpuDriverEntryPoint; + *CpuDriverEntryPoint =3D NULL; + CpuDriverEntryPointDesc->MmCpuDriverEpPtr =3D CpuDriverEntryPoint; // Find the size of the GUIDed HOB with SRAM ranges BufferSize =3D sizeof (EFI_MMRAM_HOB_DESCRIPTOR_BLOCK); diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/Standal= oneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/= Arm/StandaloneMmCoreEntryPoint.c index 96de10405af8..900e0252ef9f 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCo= reEntryPoint.c +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCo= reEntryPoint.c @@ -15,6 +15,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include +#include #include #include #include @@ -41,7 +42,7 @@ STATIC CONST UINT32 mSpmMinorVerFfa =3D SPM_MINOR_VERSIO= N_FFA; #define BOOT_PAYLOAD_VERSION 1 -PI_MM_ARM_TF_CPU_DRIVER_ENTRYPOINT CpuDriverEntryPoint =3D NULL; +PI_MM_CPU_DRIVER_ENTRYPOINT CpuDriverEntryPoint =3D NULL; /** Retrieve a pointer to and print the boot information passed by privilege= d @@ -140,6 +141,18 @@ DelegatedEventLoop ( DEBUG ((DEBUG_INFO, "X6 : 0x%x\n", (UINT32)EventCompleteSvcArgs->Arg6= )); DEBUG ((DEBUG_INFO, "X7 : 0x%x\n", (UINT32)EventCompleteSvcArgs->Arg7= )); + // + // ARM TF passes SMC FID of the MM_COMMUNICATE interface as the Event = ID upon + // receipt of a synchronous MM request. Use the Event ID to distinguis= h + // between synchronous and asynchronous events. + // + if ((ARM_SMC_ID_MM_COMMUNICATE !=3D (UINT32)EventCompleteSvcArgs->Arg0= ) && + (ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ !=3D (UINT32)EventCompleteSvcA= rgs->Arg0)) + { + DEBUG ((DEBUG_ERROR, "UnRecognized Event - 0x%x\n", (UINT32)EventCom= pleteSvcArgs->Arg0)); + continue; + } + FfaEnabled =3D FeaturePcdGet (PcdFfaEnable); if (FfaEnabled) { Status =3D CpuDriverEntryPoint ( diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneM= mCoreEntryPoint.inf b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/St= andaloneMmCoreEntryPoint.inf index 75cfb98c0e75..d41d7630b614 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEn= tryPoint.inf +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEn= tryPoint.inf @@ -49,7 +49,7 @@ gMpInformationHobGuid gEfiMmPeiMmramMemoryReserveGuid gEfiStandaloneMmNonSecureBufferGuid - gEfiArmTfCpuDriverEpDescriptorGuid + gEfiMmCpuDriverEpDescriptorGuid [FeaturePcd.ARM, FeaturePcd.AARCH64] gArmTokenSpaceGuid.PcdFfaEnable -- 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108662): https://edk2.groups.io/g/devel/message/108662 Mute This Topic: https://groups.io/mt/101369647/7717249 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [yeoreum.yun@arm.com] -=3D-=3D-=3D-=3D-=3D-=3D IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109117): https://edk2.groups.io/g/devel/message/109117 Mute This Topic: https://groups.io/mt/101369647/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-