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 0831AAC1217 for ; Thu, 5 Oct 2023 11:12:16 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=/A2XVALQR+kiU2yvkFbJFcTKH69qrlKMjta0kp3eafA=; c=relaxed/simple; d=groups.io; h=Received-SPF:ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Authentication-Results-Original:Message-ID:Date:User-Agent:Subject:To:Cc:References:From:In-Reply-To:MIME-Version:NoDisclaimer:Original-Authentication-Results:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1696504335; v=1; b=xUEN/alfkMs6nL1FyE5vLIpXjRVcqRIBD22L53GgAsOZ72uF64DYd8XgSxT3lfdbPhemua6h Rsp/jA9rl9HzfqmY0vLyirMHtLx7qJL++AwxAlbPj1rFUccXdzu+xWK/GBylUL3R6bxYlmSfZw3 n/tmdN5+ZxWe0QNOY+L2BOKU= X-Received: by 127.0.0.2 with SMTP id wvYIYY7687511xIjqYNxP5IC; Thu, 05 Oct 2023 04:12:15 -0700 X-Received: from EUR03-DBA-obe.outbound.protection.outlook.com (EUR03-DBA-obe.outbound.protection.outlook.com [40.107.104.43]) by mx.groups.io with SMTP id smtpd.web10.12640.1696504329481814666 for ; Thu, 05 Oct 2023 04:12:09 -0700 X-Received: from DB7PR02CA0003.eurprd02.prod.outlook.com (2603:10a6:10:52::16) by DB9PR08MB7512.eurprd08.prod.outlook.com (2603:10a6:10:303::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.28; Thu, 5 Oct 2023 11:12:06 +0000 X-Received: from DBAEUR03FT038.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:52:cafe::79) by DB7PR02CA0003.outlook.office365.com (2603:10a6:10:52::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.26 via Frontend Transport; Thu, 5 Oct 2023 11:12:06 +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 DBAEUR03FT038.mail.protection.outlook.com (100.127.143.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.28 via Frontend Transport; Thu, 5 Oct 2023 11:12:05 +0000 X-Received: ("Tessian outbound fdf44c93bd44:v211"); Thu, 05 Oct 2023 11:12:05 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 1e7e6bb817320a8d X-CR-MTA-TID: 64aa7808 X-Received: from 67340cb5ac0e.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E6B1A10C-9B50-4BCE-ACFC-F564A1032BFB.1; Thu, 05 Oct 2023 11:11:59 +0000 X-Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 67340cb5ac0e.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 05 Oct 2023 11:11:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AmXpxMS8PPbPig/b7sZYpCVQnRFPbUUHTQ0O1T2ua/GsKcsDr9Tz6MR+DS6mVpIrXKtags+6tVhaaDlgjWbNxXb25iecakEDMhRMYOCwh8AB8o+xZRY0vrmKZdccGWIufUWbdXH/QTAxNcAj2XXOHci/n0Jfu3IvSoCOcNMXA4Uj9j5/NmmxfJrvryd+alUf4EChqmKFs6a2diUOjwhyYSZ+0KhrF9YthqIUEd/VGWiTD2KaP9xa3frnriZAukFGx24/vW0awh8JJ2OArbWcI0FNEKYPGyY5JbkrpkBkOXwbzsUIEwATxXsa6VzyLHK0msj/srTLkYkDkrHfKUm5Rg== 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=yrKgImk6aTJSvZfWztHSo5/5z7eL7XiZVNPhaxa94ZY=; b=NWpP0am1vkrExSSlyRHMGgtYUVN1j+Sotz+S37hALsbSbkhrIVDuQhLZeX122Fb9hmX1R74gGaMS1reZG48aLy9brMfmNjY3KDdYnDWuAO0mk9IP1pRsaijphfAIVXtnlhyHKcPCM5Z1jUZs+wfmdTR5KnvYvX+OTOQK3vZ/VSHtd3U9Ci6tjxmQmvG8y5PS2KZUaglWdotMmtDCA2+XXgQAbbFKFh5ncQFU5M13M0i4JzC6pGKxYZc3t8xUZq/TABYABGgEz5vWm/ko8gOBd0DhCXMOSaFySotkE5GxNlokL10DG8sUFPogeQsFVMvqCqjGLIwzq2oodmuClUR0yA== 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 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by GV2PR08MB9951.eurprd08.prod.outlook.com (2603:10a6:150:b8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.29; Thu, 5 Oct 2023 11:11:56 +0000 X-Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::ac37:4594:ab86:59ce]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::ac37:4594:ab86:59ce%4]) with mapi id 15.20.6838.033; Thu, 5 Oct 2023 11:11:56 +0000 Message-ID: <8d8857ee-5a0e-6a1d-3ede-564e3c49092c@arm.com> Date: Thu, 5 Oct 2023 12:11:54 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [edk2-devel] [PATCH v3 2/2] StandaloneMmPkg: Arm: Update to use the new StandaloneMmCpu driver To: Tuan Phan , devel@edk2.groups.io Cc: ardb+tianocore@kernel.org, ray.ni@intel.com, huangming@linux.alibaba.com, sunilvl@ventanamicro.com, yong.li@intel.com, yeoreum.yun@arm.com, "nd@arm.com" References: <20230928211404.27533-1-tphan@ventanamicro.com> <20230928211404.27533-3-tphan@ventanamicro.com> From: "Sami Mujawar" In-Reply-To: <20230928211404.27533-3-tphan@ventanamicro.com> X-ClientProxiedBy: LO4P123CA0277.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:195::12) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6806:EE_|GV2PR08MB9951:EE_|DBAEUR03FT038:EE_|DB9PR08MB7512:EE_ X-MS-Office365-Filtering-Correlation-Id: d009e392-0ab9-48a3-a3df-08dbc593e8c3 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: 7cPWvSqHa6SSG7dSC/mlnOdNG1psL66AfC1quMD9mVLlaBwhniW4RrtCrWP40ukrlUOhhUqZS0nXo8sPMh2Ce/8xbia/xKv0nOQzoHsvhSKI4HrXuuL0ilU+h+XvAzbMpflT0XhowV6hFHkWL2barhI2m6DKWfNciZ7Nuj14jB73ExGe5VdBay07RbeBaVB1O02TRN2ltp259d298mn3nrmK2pjqvomYlLnpO5vYqp8TWaIcvlHvzt4Dla1Rmc8ksKiCOyUpc/wCsLTevXQaXlaQVmbd/PnG+QHu93J9ie5Hp9zJOWZOeLsCrs2d3MPsskPgy6Enwfs22ignb004r6/NFHpoYO35eeSMPTdsEodliKyhQFG1GVTZFNHK9QLIQpo6Kl3tYyXAyrdp8NG/fmxHkSlLR/GzJGBQtl84xZp9WfUSyABr5tTXLLa59yOCvtefO/z6kV6ctndCzIVxT00XS4dlNEBQ2qsO90xjBEeEDNM3lx4mBzU3MU82MTmKqrQ9c7k5yWN715P9YTK6N816JpDTHryZInuHyn2PSVrt9+PAN8AB5P07w/2hWTDBMffRwH6F1VjlhLVaX+wqWXj2qXMV7Q0FgBCcm3mMwV2zJcvU86GFBNFQqFybls/+Kp1iHzJHP89eRlm9dTqvIA== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(6029001)(376002)(366004)(396003)(39860400002)(136003)(346002)(230922051799003)(64100799003)(186009)(451199024)(1800799009)(6486002)(6506007)(2616005)(53546011)(6512007)(478600001)(66476007)(66556008)(316002)(66946007)(26005)(83380400001)(41300700001)(31686004)(8936002)(4326008)(44832011)(2906002)(8676002)(15650500001)(38100700002)(5660300002)(86362001)(36756003)(31696002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB9951 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: DBAEUR03FT038.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 0d86b9b1-4978-47c8-0153-08dbc593e2c6 X-Microsoft-Antispam-Message-Info: 9QajGll8C07wgSaq+C8BH8HKGVp+JwLIErOW6tnuiXdYRxwT50WjpMwkDjM+UEdh/K9HjdXC+/MHo1M/WZV6phQnlfMwJTaYl6rdRulTX5BmwL7GnB9mjNrk59GWiApTc0g8CbggpU+xKP/tCAUWuwU4X5NGlukgGzIS6VLt+ST89mldeQLjyjB4uHMBadGMHr5bxXo3FIl5nob+KgjjkjMPQ5E82Fydh5nmfIutXZQmZ7/MGgaHFl61vhaRCxaINfcrsGTT4qmI2KDeEOco2jVQUkVKrnVgykjDVHiWywdO61LiwfoHbAC/CUfcYDvZAazJ2n0+0+Fk2pmZCYQ31dO0AhkPCOtOU+u+EWn4vDprB3LgXzK7Fnh83HcQxh87EPO9DFiHcWMk5onIKs+yugdmEVkPUEaakWHn2zeiH5HKjGixM1RYgLbjeogwwmGQpBTHiRFWiLR+0vSHRHbOywRaxsGoS/e5xUVjdXiGf5B5TUXRpb/WsIoUaF2bXU/UUr/B6Bi3sL74ihUqbzi+1yXjJYKwqvkRj+eZbstzfINNHSlnMGwaGMtPNFgiovwK3+yNiHfyHmCs0W+08AC7BTncLLH9zgLQXGFduHe02z4pcy1l5P1VHTxJmTq9Bm9mOrIJTI1Cq4NLIiIKQYol6WZJmjTNgEryZlHiUv6HmnRTZfQihrtSQLxk6fXJrAi+AxblNtzq/aT/W9JRhl7ZZbma3pqtUy2+7bBRIMHKu7Ko1IQA/bf5XlKtSP75t3Dd/38eioaX6mdYq3kzc21a5w== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2023 11:12:05.7650 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d009e392-0ab9-48a3-a3df-08dbc593e8c3 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: DBAEUR03FT038.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB7512 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,sami.mujawar@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: MzwMOegxmLzeyEUOqewOuH1Kx7686176AA= Content-Type: text/plain; charset=UTF-8; format=flowed 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="xUEN/alf"; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Hi Tuan, Thank you for this patch. These changes look good to me. Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 28/09/2023 10:14 pm, Tuan Phan wrote: > Update entry point library for Arm to use the new architecture independen= t > StandaloneMmCpu driver. > > Signed-off-by: Tuan Phan > Reviewed-by: levi.yun > --- > .../Library/Arm/StandaloneMmCoreEntryPoint.h | 17 +---- > .../Arm/CreateHobList.c | 43 ++++++------ > .../Arm/StandaloneMmCoreEntryPoint.c | 69 +++++++++++-------- > .../StandaloneMmCoreEntryPoint.inf | 2 +- > 4 files changed, 67 insertions(+), 64 deletions(-) > > diff --git a/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoi= nt.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__ > > =20 > > +#include > > #include > > #include > > =20 > > @@ -47,18 +48,6 @@ typedef struct { > EFI_SECURE_PARTITION_CPU_INFO *CpuInfo; > > } EFI_SECURE_PARTITION_BOOT_INFO; > > =20 > > -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 > > ); > > =20 > > /** > > diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/Creat= eHobList.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateH= obList.c > index 2ac2d354f06a..80ed532352af 100644 > --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHobLis= t.c > +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHobLis= t.c > @@ -13,6 +13,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #include > > #include > > =20 > > +#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; > > =20 > > /** > > 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; > > =20 > > // Create a hoblist with a PHIT and EOH > > HobStart =3D HobConstructor ( > > @@ -144,13 +145,13 @@ CreateHobListFromBootInfo ( > =20 > > // Create a Guided HOB to enable the ARM TF CPU driver to share its e= ntry > > // point and populate it with the address of the shared buffer > > - CpuDriverEntryPointDesc =3D (ARM_TF_CPU_DRIVER_EP_DESCRIPTOR *)BuildGu= idHob ( > > - &gEfiAr= mTfCpuDriverEpDescriptorGuid, > > - sizeof = (ARM_TF_CPU_DRIVER_EP_DESCRIPTOR) > > - ); > > + CpuDriverEntryPointDesc =3D (MM_CPU_DRIVER_EP_DESCRIPTOR *)BuildGuidHo= b ( > > + &gEfiMmCpuD= riverEpDescriptorGuid, > > + sizeof (MM_= CPU_DRIVER_EP_DESCRIPTOR) > > + ); > > =20 > > - *CpuDriverEntryPoint =3D NULL; > > - CpuDriverEntryPointDesc->ArmTfCpuDriverEpPtr =3D CpuDriverEntryPoint; > > + *CpuDriverEntryPoint =3D NULL; > > + CpuDriverEntryPointDesc->MmCpuDriverEpPtr =3D CpuDriverEntryPoint; > > =20 > > // 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/Stand= aloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoin= t/Arm/StandaloneMmCoreEntryPoint.c > index 96de10405af8..70306be2495e 100644 > --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMm= CoreEntryPoint.c > +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMm= CoreEntryPoint.c > @@ -15,6 +15,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #include > > #include > > =20 > > +#include > > #include > > #include > > #include > > @@ -41,7 +42,7 @@ STATIC CONST UINT32 mSpmMinorVerFfa =3D SPM_MINOR_VERS= ION_FFA; > =20 > > #define BOOT_PAYLOAD_VERSION 1 > > =20 > > -PI_MM_ARM_TF_CPU_DRIVER_ENTRYPOINT CpuDriverEntryPoint =3D NULL; > > +PI_MM_CPU_DRIVER_ENTRYPOINT CpuDriverEntryPoint =3D NULL; > > =20 > > /** > > Retrieve a pointer to and print the boot information passed by privil= eged > > @@ -140,34 +141,46 @@ DelegatedEventLoop ( > DEBUG ((DEBUG_INFO, "X6 : 0x%x\n", (UINT32)EventCompleteSvcArgs->A= rg6)); > > DEBUG ((DEBUG_INFO, "X7 : 0x%x\n", (UINT32)EventCompleteSvcArgs->A= rg7)); > > =20 > > - FfaEnabled =3D FeaturePcdGet (PcdFfaEnable); > > - if (FfaEnabled) { > > - Status =3D CpuDriverEntryPoint ( > > - EventCompleteSvcArgs->Arg0, > > - EventCompleteSvcArgs->Arg6, > > - EventCompleteSvcArgs->Arg3 > > - ); > > - if (EFI_ERROR (Status)) { > > - DEBUG (( > > - DEBUG_ERROR, > > - "Failed delegated event 0x%x, Status 0x%x\n", > > - EventCompleteSvcArgs->Arg3, > > - Status > > - )); > > - } > > + // > > + // ARM TF passes SMC FID of the MM_COMMUNICATE interface as the Even= t ID upon > > + // receipt of a synchronous MM request. Use the Event ID to distingu= ish > > + // between synchronous and asynchronous events. > > + // > > + if ((ARM_SMC_ID_MM_COMMUNICATE !=3D (UINT32)EventCompleteSvcArgs->Ar= g0) && > > + (ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ !=3D (UINT32)EventCompleteSv= cArgs->Arg0)) > > + { > > + DEBUG ((DEBUG_ERROR, "UnRecognized Event - 0x%x\n", (UINT32)EventC= ompleteSvcArgs->Arg0)); > > + Status =3D EFI_INVALID_PARAMETER; > > } else { > > - Status =3D CpuDriverEntryPoint ( > > - EventCompleteSvcArgs->Arg0, > > - EventCompleteSvcArgs->Arg3, > > - EventCompleteSvcArgs->Arg1 > > - ); > > - if (EFI_ERROR (Status)) { > > - DEBUG (( > > - DEBUG_ERROR, > > - "Failed delegated event 0x%x, Status 0x%x\n", > > - EventCompleteSvcArgs->Arg0, > > - Status > > - )); > > + FfaEnabled =3D FeaturePcdGet (PcdFfaEnable); > > + if (FfaEnabled) { > > + Status =3D CpuDriverEntryPoint ( > > + EventCompleteSvcArgs->Arg0, > > + EventCompleteSvcArgs->Arg6, > > + EventCompleteSvcArgs->Arg3 > > + ); > > + if (EFI_ERROR (Status)) { > > + DEBUG (( > > + DEBUG_ERROR, > > + "Failed delegated event 0x%x, Status 0x%x\n", > > + EventCompleteSvcArgs->Arg3, > > + Status > > + )); > > + } > > + } else { > > + Status =3D CpuDriverEntryPoint ( > > + EventCompleteSvcArgs->Arg0, > > + EventCompleteSvcArgs->Arg3, > > + EventCompleteSvcArgs->Arg1 > > + ); > > + if (EFI_ERROR (Status)) { > > + DEBUG (( > > + DEBUG_ERROR, > > + "Failed delegated event 0x%x, Status 0x%x\n", > > + EventCompleteSvcArgs->Arg0, > > + Status > > + )); > > + } > > } > > } > > =20 > > diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Standalon= eMmCoreEntryPoint.inf b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/= StandaloneMmCoreEntryPoint.inf > index 75cfb98c0e75..d41d7630b614 100644 > --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCore= EntryPoint.inf > +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCore= EntryPoint.inf > @@ -49,7 +49,7 @@ > gMpInformationHobGuid > > gEfiMmPeiMmramMemoryReserveGuid > > gEfiStandaloneMmNonSecureBufferGuid > > - gEfiArmTfCpuDriverEpDescriptorGuid > > + gEfiMmCpuDriverEpDescriptorGuid > > =20 > > [FeaturePcd.ARM, FeaturePcd.AARCH64] > > gArmTokenSpaceGuid.PcdFfaEnable > -=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 (#109351): https://edk2.groups.io/g/devel/message/109351 Mute This Topic: https://groups.io/mt/101646679/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-