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 1A721740037 for ; Thu, 28 Sep 2023 16:12:45 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=WuMu0HM8iLh+I/0aU2qesT0ww8wPbMBKzO9ZG0YAweQ=; 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=1695917564; v=1; b=VrWSWnRGtEqIUQ+EbM/p7vg1EC7S3LSNPTpRP6SLEXyvor7ev0mYtgVj2J1iaVFzQeP6re84 3ACPt8/BebchhnYDSz2mbWrwLwp8vAkwwCRr79LPlqBYdgsgCjcQ+KNXOQxxXHpWveniIEDKcdn irHyHHSQHMDR5BmHyuZHUqNg= X-Received: by 127.0.0.2 with SMTP id WZFyYY7687511xONCUJDRwdp; Thu, 28 Sep 2023 09:12:44 -0700 X-Received: from EUR01-VE1-obe.outbound.protection.outlook.com (EUR01-VE1-obe.outbound.protection.outlook.com [40.107.14.87]) by mx.groups.io with SMTP id smtpd.web11.17459.1695917557965176726 for ; Thu, 28 Sep 2023 09:12:38 -0700 X-Received: from DB9PR02CA0028.eurprd02.prod.outlook.com (2603:10a6:10:1d9::33) by GV1PR08MB7801.eurprd08.prod.outlook.com (2603:10a6:150:58::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Thu, 28 Sep 2023 16:12:33 +0000 X-Received: from DBAEUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:1d9:cafe::ba) by DB9PR02CA0028.outlook.office365.com (2603:10a6:10:1d9::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.22 via Frontend Transport; Thu, 28 Sep 2023 16:12:33 +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 DBAEUR03FT049.mail.protection.outlook.com (100.127.142.192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.25 via Frontend Transport; Thu, 28 Sep 2023 16:12:33 +0000 X-Received: ("Tessian outbound ab4fc72d2cd4:v211"); Thu, 28 Sep 2023 16:12:33 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: f22a1e8c2bbc816e X-CR-MTA-TID: 64aa7808 X-Received: from 7db34eefac8a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C59222EB-6301-415D-99B9-1E7646E6D3F1.1; Thu, 28 Sep 2023 16:12:22 +0000 X-Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 7db34eefac8a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 28 Sep 2023 16:12:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iMGj3253rVxirCpBTzRkCFM5o+suIQ7nwX8sLlTfPi2EEuoISwccsm3001up92XEc1brWyYYwq+eC/hvQZ/ovyTd2+Y1lQHOjy/h6YOjg6O7eK/F0vQlo0HIta41hfy9HscMDcXmdkapsRc9Q9TkheJb3vDPDtnix/rZJavLr8P9/6IWnNsdMdWnpZ/Fvb0Os7CisLMwvrTbl9WKWxNcYA7Cx/0DKDbY+sNi1NfBojC/8Utrb9aqRJV9iht4lfoHMKn6rRNxRjGJnfgxpUq56lbuGEMhgNkZ6I6h5u2KY559/fHx/0lwTlpwVcAEy7/z0eG7iCUBT/9jxP+qDA+MrA== 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=6RFMg/8qKgKkGzKgFkBJndiS0b/KVHTvtdQW75ENo6M=; b=D1+Q+ypniEG3GwOzKpPoLUHXisTmQPd0EKm46E76yIp6bR80D0QnWgwDo6e2kAg4UvADzNgmLRUu51Wfb55p3RWxTfo5P1AjwHbiFsxsDzgb50kWO8/gEUuiTSmOlJkecb7ppaGKUTy+OOlPGYLd1YmEVjIt160Lagy/YDnOB50WlTRG2VfL8hrTcO5QikbO17KpgNFreStbo0NKWykDuhWYj2hWbwU9T0REh/N0J4kJD99iM1NJScchB90XEmN1EHZpzv6WnathIpo2RTf+3hAu+nQWkGZKs4RVyJD8NRVXT4jv9bDvfSSyRDY3foUOVI3tYR2oPe6O1P2MSKwBvg== 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 AM8PR08MB5650.eurprd08.prod.outlook.com (2603:10a6:20b:1d3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21; Thu, 28 Sep 2023 16:12:19 +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.016; Thu, 28 Sep 2023 16:12:19 +0000 Message-ID: Date: Thu, 28 Sep 2023 17:12:18 +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 v2 1/2] StandaloneMmPkg: Make StandaloneMmCpu driver platform independent 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: <20230914231037.23950-1-tphan@ventanamicro.com> <20230914231037.23950-2-tphan@ventanamicro.com> From: "Sami Mujawar" In-Reply-To: <20230914231037.23950-2-tphan@ventanamicro.com> X-ClientProxiedBy: LO4P123CA0581.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:276::11) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6806:EE_|AM8PR08MB5650:EE_|DBAEUR03FT049:EE_|GV1PR08MB7801:EE_ X-MS-Office365-Filtering-Correlation-Id: 89a4faf5-e21e-4859-b169-08dbc03db8ed 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: kPueJ4KdDIqIZUtf/t8GRifWBcDf84bb7FfCPHbhJRo+VIN4cfuEyGVrKskYJA/DCLI2qxv0PkLTdIH2XeqIQT3fjYi7GnZd+A7EBGUkzEPaQyDHCaAFVFuHtNSoIc2Rp204sLqUGuXrVuSzCkrqprhbDlk+pOJ7G06eDHMcHMVKYNnQ7CQbnAUFRmTnqGC634YGE+HJk2By02q/Iom3ctKSEhvx4oTvjfwTYrjQktv7TMKSORxOTw+rL7AlxWkZgrNUEIfIv0MGdbDpCCE50su7hWxJVVYgIMX8FG/XwnfzspLwncULTeRncHVLNFE8f7x6zJ4D/UPE2FxNnOMaBt3dH56YmX5VKTM0m3fqGUYWymCAdUq3qDvMcK2lP/bzafOohfz1PWLsIu+PytiL5POLAlWuLuulNdXNV6cKfaqbxMIxoEq6NMmu2Ya7cRKu/L0qG4pTVKEl8+uQaUHeDx/F56QBhXXI+QyxxURHElWsvfeisPtCheaqCdgJuv+4nhroSAxPhYgH/31/c4aXCwaE9iUXXIpHU/VrAlpS5h1wzn5Ao9Eptg42V1/gb2/0Val2q4g2BSmj8bjC2Dstd0fwWFjK9JY9Bxf4IBwvOCij5uEmPJtPE9YgmKvuEshs7naWsKjn7KEtyvBFXOJ83g== 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)(136003)(376002)(366004)(39860400002)(396003)(346002)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(2616005)(31686004)(2906002)(30864003)(41300700001)(44832011)(5660300002)(4326008)(8676002)(8936002)(316002)(66946007)(66556008)(66476007)(26005)(478600001)(6506007)(53546011)(6486002)(83380400001)(36756003)(6512007)(86362001)(31696002)(38100700002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5650 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: DBAEUR03FT049.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 80927de3-caab-49d4-12c5-08dbc03db0b8 X-Microsoft-Antispam-Message-Info: Ixe9p23iRdGl9wRrihNPXShoSuVExdjocpGc8akhhsHaWtAnSmgVF3ZmAnHn/QCWZzD7xDhmeYmGbZH/M7U98hEmeQh6qwKRwtif+lFfVwnr6zoGKOoHGUrReSWL7LxZT59OL3CFtki+AZK3ETkRaTgQJw5yOX0H4bt028Nk7G1fHs2n4X2nv6sId6WSiRZPi1X/50Kk5vTz8crHAoNtcxxxQ2vs5tLpCYDixJZSVyYThExWIj5vBjW9/j3EHu8mLDmu9EgooZXpwklA3jdldVCP22Xl02/GCsObvd8Ohv+F8iD+DCm6C8fAO7yXy+DoHMdpczPxewrDb4vne/j8JV7F1RRyRNjvnuEvWcC+cQCeDAxZ0PthSfdS5B5R89duramWulMHG+UdIzC9Taz0Vn+8oDq/HQrFJFQzLiOrxz+edoqJ719yPVaxC0tpipZxEwH/U39vmrprF7BY5xR9AXOthLwAE1SSPc9kCHX79UMJ4hUALarC3Q9qQisy6baWb8Q31amOYQWCILWHVQWt9NHp/HyDOL9HJR5lkBc6eTg2DOyz7Vs1IcM6Zl/y5Mf7jFdrp2WSJLdTL1fdKamard4EdZWTeSeFCZikVycLDY0nhZzzs3KHZ2jwsjknYdbktd9EUsluGyb6BWZXrcog/KxEfqOBPAWTVaKHJfC1kaBjAOvXkZW9LrCl/hD0/GlwkSE9jd5lUIeZHoqC2H8YlUJcyrUXcCyM7mt/zJT2XTVQy4lnW6hdtnh5ROO8AFSu5mc0pGUw7wFeL55Rl0dM4A== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2023 16:12:33.1024 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 89a4faf5-e21e-4859-b169-08dbc03db8ed 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: DBAEUR03FT049.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB7801 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: uQeOBBV0M88XKP4f5cwai2LBx7686176AA= 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=VrWSWnRG; 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; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") Hi Tuan, Thank you for this patch. This change looks good to me. Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 15/09/2023 12:10 am, Tuan Phan wrote: > StandaloneMmCpu now can supports more platforms like RISC-V besides > ARM/AARCH64. > > Signed-off-by: Tuan Phan > --- > .../Drivers/StandaloneMmCpu/EventHandle.c | 25 +++-------- > .../Drivers/StandaloneMmCpu/StandaloneMmCpu.c | 42 +++++++++---------- > .../StandaloneMmCpu/StandaloneMmCpu.inf | 9 ++-- > .../StandaloneMmCpu.h | 22 +++++++--- > StandaloneMmPkg/StandaloneMmPkg.dec | 2 +- > 5 files changed, 46 insertions(+), 54 deletions(-) > rename StandaloneMmPkg/{Drivers/StandaloneMmCpu =3D> Include}/Standalon= eMmCpu.h (82%) > > diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/EventHandle.c b/Stan= daloneMmPkg/Drivers/StandaloneMmCpu/EventHandle.c > index 818e147f874c..dc11d4375a02 100644 > --- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/EventHandle.c > +++ b/StandaloneMmPkg/Drivers/StandaloneMmCpu/EventHandle.c > @@ -3,6 +3,7 @@ > Copyright (c) 2016 HP Development Company, L.P. > > Copyright (c) 2016 - 2021, Arm Limited. All rights reserved. > > Copyright (c) 2021, Linaro Limited > > + Copyright (c) 2023, Ventana Micro System Inc. All rights reserved. > > =20 > > SPDX-License-Identifier: BSD-2-Clause-Patent > > =20 > > @@ -11,8 +12,6 @@ > #include > > #include > > =20 > > -#include > > -#include > > #include > > #include > > #include > > @@ -22,10 +21,7 @@ > #include > > #include > > =20 > > -#include > > -#include > > - > > -#include "StandaloneMmCpu.h" > > +#include > > =20 > > EFI_STATUS > > EFIAPI > > @@ -108,7 +104,7 @@ CheckBufferAddr ( > } > > =20 > > /** > > - The PI Standalone MM entry point for the TF-A CPU driver. > > + The PI Standalone MM entry point for the CPU driver. > > =20 > > @param [in] EventId The event Id. > > @param [in] CpuNumber The CPU number. > > @@ -121,7 +117,7 @@ CheckBufferAddr ( > @retval EFI_UNSUPPORTED Operation not supported. > > **/ > > EFI_STATUS > > -PiMmStandaloneArmTfCpuDriverEntry ( > > +PiMmStandaloneMmCpuDriverEntry ( > > IN UINTN EventId, > > IN UINTN CpuNumber, > > IN UINTN NsCommBufferAddr > > @@ -135,17 +131,6 @@ PiMmStandaloneArmTfCpuDriverEntry ( > DEBUG ((DEBUG_INFO, "Received event - 0x%x on cpu %d\n", EventId, Cpu= Number)); > > =20 > > Status =3D EFI_SUCCESS; > > - // > > - // 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 EventId) && > > - (ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ !=3D EventId)) > > - { > > - DEBUG ((DEBUG_ERROR, "UnRecognized Event - 0x%x\n", EventId)); > > - return EFI_INVALID_PARAMETER; > > - } > > =20 > > // Perform parameter validation of NsCommBufferAddr > > if (NsCommBufferAddr =3D=3D (UINTN)NULL) { > > @@ -177,7 +162,7 @@ PiMmStandaloneArmTfCpuDriverEntry ( > } > > =20 > > // X1 contains the VA of the normal world memory accessible from > > - // S-EL0 > > + // secure world. > > CopyMem (GuidedEventContext, (CONST VOID *)NsCommBufferAddr, NsCommBu= fferSize); > > =20 > > // Stash the pointer to the allocated Event Context for this CPU > > diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.c b/= StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.c > index 3d1dc6181bd9..c5ec1a5a80c5 100644 > --- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.c > +++ b/StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.c > @@ -3,6 +3,7 @@ > Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
> > Copyright (c) 2016 HP Development Company, L.P. > > Copyright (c) 2016 - 2021, Arm Limited. All rights reserved. > > + Copyright (c) 2023, Ventana Micro System Inc. All rights reserved. > > =20 > > SPDX-License-Identifier: BSD-2-Clause-Patent > > =20 > > @@ -10,10 +11,7 @@ > =20 > > #include > > #include > > -#include > > #include > > -#include > > -#include > > #include > > #include > > =20 > > @@ -22,7 +20,7 @@ > #include > > #include > > =20 > > -#include "StandaloneMmCpu.h" > > +#include > > =20 > > // GUID to identify HOB with whereabouts of communication buffer with N= ormal > > // World > > @@ -31,7 +29,7 @@ extern EFI_GUID gEfiStandaloneMmNonSecureBufferGuid; > // GUID to identify HOB where the entry point of this CPU driver will b= e > > // populated to allow the entry point driver to invoke it upon receipt = of an > > // event > > -extern EFI_GUID gEfiArmTfCpuDriverEpDescriptorGuid; > > +extern EFI_GUID gEfiMmCpuDriverEpDescriptorGuid; > > =20 > > // > > // Private copy of the MM system table for future use > > @@ -96,17 +94,17 @@ StandaloneMmCpuInitialize ( > IN EFI_MM_SYSTEM_TABLE *SystemTable // not actual systemtable > > ) > > { > > - ARM_TF_CPU_DRIVER_EP_DESCRIPTOR *CpuDriverEntryPointDesc; > > - EFI_CONFIGURATION_TABLE *ConfigurationTable; > > - MP_INFORMATION_HOB_DATA *MpInformationHobData; > > - EFI_MMRAM_DESCRIPTOR *NsCommBufMmramRange; > > - EFI_STATUS Status; > > - EFI_HANDLE DispatchHandle; > > - UINT32 MpInfoSize; > > - UINTN Index; > > - UINTN ArraySize; > > - VOID *HobStart; > > - EFI_MMRAM_HOB_DESCRIPTOR_BLOCK *MmramRangesHob; > > + MM_CPU_DRIVER_EP_DESCRIPTOR *CpuDriverEntryPointDesc; > > + EFI_CONFIGURATION_TABLE *ConfigurationTable; > > + MP_INFORMATION_HOB_DATA *MpInformationHobData; > > + EFI_MMRAM_DESCRIPTOR *NsCommBufMmramRange; > > + EFI_STATUS Status; > > + EFI_HANDLE DispatchHandle; > > + UINT32 MpInfoSize; > > + UINTN Index; > > + UINTN ArraySize; > > + VOID *HobStart; > > + EFI_MMRAM_HOB_DESCRIPTOR_BLOCK *MmramRangesHob; > > =20 > > ASSERT (SystemTable !=3D NULL); > > mMmst =3D SystemTable; > > @@ -133,7 +131,7 @@ StandaloneMmCpuInitialize ( > } > > =20 > > // Retrieve the Hoblist from the MMST to extract the details of the N= S > > - // communication buffer that has been reserved by S-EL1/EL3 > > + // communication buffer that has been reserved for StandaloneMmPkg > > ConfigurationTable =3D mMmst->MmConfigurationTable; > > for (Index =3D 0; Index < mMmst->NumberOfTableEntries; Index++) { > > if (CompareGuid (&gEfiHobListGuid, &(ConfigurationTable[Index].Vend= orGuid))) { > > @@ -154,11 +152,11 @@ StandaloneMmCpuInitialize ( > // > > Status =3D GetGuidedHobData ( > > HobStart, > > - &gEfiArmTfCpuDriverEpDescriptorGuid, > > + &gEfiMmCpuDriverEpDescriptorGuid, > > (VOID **)&CpuDriverEntryPointDesc > > ); > > if (EFI_ERROR (Status)) { > > - DEBUG ((DEBUG_ERROR, "ArmTfCpuDriverEpDesc HOB data extraction faile= d - 0x%x\n", Status)); > > + DEBUG ((DEBUG_ERROR, "MmCpuDriverEpDesc HOB data extraction failed -= 0x%x\n", Status)); > > return Status; > > } > > =20 > > @@ -166,10 +164,10 @@ StandaloneMmCpuInitialize ( > DEBUG (( > > DEBUG_INFO, > > "Sharing Cpu Driver EP *0x%lx =3D 0x%lx\n", > > - (UINTN)CpuDriverEntryPointDesc->ArmTfCpuDriverEpPtr, > > - (UINTN)PiMmStandaloneArmTfCpuDriverEntry > > + (UINTN)CpuDriverEntryPointDesc->MmCpuDriverEpPtr, > > + (UINTN)PiMmStandaloneMmCpuDriverEntry > > )); > > - *(CpuDriverEntryPointDesc->ArmTfCpuDriverEpPtr) =3D PiMmStandaloneArmT= fCpuDriverEntry; > > + *(CpuDriverEntryPointDesc->MmCpuDriverEpPtr) =3D PiMmStandaloneMmCpuDr= iverEntry; > > =20 > > // Find the descriptor that contains the whereabouts of the buffer fo= r > > // communication with the Normal world. > > diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf = b/StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf > index 1fcb17d89d36..486ccbac1b7c 100644 > --- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf > +++ b/StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf > @@ -1,9 +1,10 @@ > ## @file > > -# Standalone MM CPU driver for ARM Standard Platforms > > +# Standalone MM CPU driver > > # > > # Copyright (c) 2009, Apple Inc. All rights reserved.
> > # Copyright (c) 2016 HP Development Company, L.P. > > # Copyright (c) 2017 - 2021, Arm Limited. All rights reserved. > > +# Copyright (c) 2023, Ventana Micro System Inc. All rights reserved. > > # > > # SPDX-License-Identifier: BSD-2-Clause-Patent > > ## > > @@ -19,18 +20,14 @@ > =20 > > [Sources] > > StandaloneMmCpu.c > > - StandaloneMmCpu.h > > EventHandle.c > > =20 > > [Packages] > > - ArmPkg/ArmPkg.dec > > MdePkg/MdePkg.dec > > MdeModulePkg/MdeModulePkg.dec > > StandaloneMmPkg/StandaloneMmPkg.dec > > =20 > > [LibraryClasses] > > - ArmLib > > - ArmSvcLib > > BaseMemoryLib > > DebugLib > > HobLib > > @@ -46,7 +43,7 @@ > gZeroGuid > > gMpInformationHobGuid > > gEfiStandaloneMmNonSecureBufferGuid > > - gEfiArmTfCpuDriverEpDescriptorGuid > > + gEfiMmCpuDriverEpDescriptorGuid > > =20 > > [Depex] > > TRUE > > diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.h b/= StandaloneMmPkg/Include/StandaloneMmCpu.h > similarity index 82% > rename from StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.h > rename to StandaloneMmPkg/Include/StandaloneMmCpu.h > index 3d4698ec1957..1dce7c132ec2 100644 > --- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.h > +++ b/StandaloneMmPkg/Include/StandaloneMmCpu.h > @@ -7,14 +7,26 @@ > =20 > > **/ > > =20 > > -#ifndef _ARM_TF_CPU_DRIVER_H_ > > -#define _ARM_TF_CPU_DRIVER_H_ > > +#ifndef MM_CPU_DRIVER_H_ > > +#define MM_CPU_DRIVER_H_ > > =20 > > #include > > #include > > #include > > #include > > =20 > > +typedef > > +EFI_STATUS > > +(*PI_MM_CPU_DRIVER_ENTRYPOINT) ( > > + IN UINTN EventId, > > + IN UINTN CpuNumber, > > + IN UINTN NsCommBufferAddr > > + ); > > + > > +typedef struct { > > + PI_MM_CPU_DRIVER_ENTRYPOINT *MmCpuDriverEpPtr; > > +} MM_CPU_DRIVER_EP_DESCRIPTOR; > > + > > // > > // CPU driver initialization specific declarations > > // > > @@ -35,7 +47,7 @@ extern MP_INFORMATION_HOB_DATA *mMpInformationHo= bData; > extern EFI_MM_CONFIGURATION_PROTOCOL mMmConfig; > > =20 > > /** > > - The PI Standalone MM entry point for the TF-A CPU driver. > > + The PI Standalone MM entry point for the CPU driver. > > =20 > > @param [in] EventId The event Id. > > @param [in] CpuNumber The CPU number. > > @@ -48,7 +60,7 @@ extern EFI_MM_CONFIGURATION_PROTOCOL mMmConfig; > @retval EFI_UNSUPPORTED Operation not supported. > > **/ > > EFI_STATUS > > -PiMmStandaloneArmTfCpuDriverEntry ( > > +PiMmStandaloneMmCpuDriverEntry ( > > IN UINTN EventId, > > IN UINTN CpuNumber, > > IN UINTN NsCommBufferAddr > > @@ -79,4 +91,4 @@ PiMmCpuTpFwRootMmiHandler ( > IN OUT UINTN *CommBufferSize OPTIONAL > > ); > > =20 > > -#endif > > +#endif /* MM_CPU_DRIVER_H_ */ > > diff --git a/StandaloneMmPkg/StandaloneMmPkg.dec b/StandaloneMmPkg/Standa= loneMmPkg.dec > index 46784d94e421..f7cb9e8e2687 100644 > --- a/StandaloneMmPkg/StandaloneMmPkg.dec > +++ b/StandaloneMmPkg/StandaloneMmPkg.dec > @@ -46,5 +46,5 @@ > gEfiMmPeiMmramMemoryReserveGuid =3D { 0x0703f912, 0xbf8d, 0x= 4e2a, { 0xbe, 0x07, 0xab, 0x27, 0x25, 0x25, 0xc5, 0x92 }} > > =20 > > gEfiStandaloneMmNonSecureBufferGuid =3D { 0xf00497e3, 0xbfa2, 0x= 41a1, { 0x9d, 0x29, 0x54, 0xc2, 0xe9, 0x37, 0x21, 0xc5 }} > > - gEfiArmTfCpuDriverEpDescriptorGuid =3D { 0x6ecbd5a1, 0xc0f8, 0x4= 702, { 0x83, 0x01, 0x4f, 0xc2, 0xc5, 0x47, 0x0a, 0x51 }} > > + gEfiMmCpuDriverEpDescriptorGuid =3D { 0x6ecbd5a1, 0xc0f8, 0x4= 702, { 0x83, 0x01, 0x4f, 0xc2, 0xc5, 0x47, 0x0a, 0x51 }} > > =20 > -=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 (#109164): https://edk2.groups.io/g/devel/message/109164 Mute This Topic: https://groups.io/mt/101369646/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-