From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR02-AM5-obe.outbound.protection.outlook.com (EUR02-AM5-obe.outbound.protection.outlook.com [40.107.0.47]) by mx.groups.io with SMTP id smtpd.web08.6876.1621335923146601495 for ; Tue, 18 May 2021 04:05:23 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=W6iKEv4T; spf=pass (domain: arm.com, ip: 40.107.0.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=SagfHCoaG0ckAdlHi1s7/bNsZjweXPY6DFMtMXPfGO0=; b=W6iKEv4TC0AT7PAf5Fa9ueoJ1i3CsKE6GhNfFefabNk+zHeLYf0KZMrSF4A4HpW8Zsj2uwUc1DXv7q3msmhUeIevm16TxdpoZ7JMXeFtVcfO0D+A0S2s0Kb+1mYqSBD7mmz/9FiPQDYZZ9N31i7R1hC47IbhQ1cBX/5Dg2+T8Qs= Received: from MRXP264CA0012.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:15::24) by AM0PR08MB4305.eurprd08.prod.outlook.com (2603:10a6:208:140::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Tue, 18 May 2021 11:05:19 +0000 Received: from VE1EUR03FT055.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:15:cafe::be) by MRXP264CA0012.outlook.office365.com (2603:10a6:500:15::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.30 via Frontend Transport; Tue, 18 May 2021 11:05:19 +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 VE1EUR03FT055.mail.protection.outlook.com (10.152.19.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Tue, 18 May 2021 11:05:19 +0000 Received: ("Tessian outbound 0f1e4509c199:v92"); Tue, 18 May 2021 11:05:18 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a4346a2cc93c7bc9 X-CR-MTA-TID: 64aa7808 Received: from c5c11384829f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id AF063C8C-D302-41C7-80CB-691782A585A8.1; Tue, 18 May 2021 11:05:12 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c5c11384829f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 18 May 2021 11:05:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KW5otSz521Pt8n+elAMK45tNSDbFDZtq5AOpJJ8mxdp9MdCj2zkKlrHIvT7cC9lhd8ZIRUXyg72GZn/iT2VrzY74/Kdobr7NP23dTNFVfJiUtYkNArXo3VYpazxe2M1Ip7rGkAaDQxVRRRPE5v4AmRzVRodIb1YEOHAOrzj/9R8cU5KssrS1ocSCQPD+H8Ija86WgNqZ9eNbt+eZp8Cgrh7WTT626eVhinx/2MRWEFmD1/Xx01S2+dDlznW7a6DSSTiTJnF8Z5s+55jHqMbJuRckbyqu9lyfg5fDKNZmwY98yaYmFRjAjmCbRvqfqxudetYPrSeDrIizUjZjfA//SQ== 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=SagfHCoaG0ckAdlHi1s7/bNsZjweXPY6DFMtMXPfGO0=; b=dHrIZTVcv4v6pXfnxozuE6VTCU6vaORvRvSxYEeJpLz/bBPcoUoD9u9zPhfVTENSPauFD8kLC+8+xhJtUXvgXhNgsYnCVT44eNf6/lwzM7jlUtvXDJlcTD0Ut3R3nmrpV9/e7zI5bHqIW14GgScUm/fBIOZY6QWByPSDwFbrYH5Y3Blq6f4JTAc7qXBo2l5eDjnXjaA+SswJRxugHpPsIqiYnYCxp5IlF5flhQyuMJPV7L70wOGuYnUq1JdAXlygh64JQhjyuzQJCj3gaJGr9XCZDZSH4V7eUTXftHRXPrn1/1GRVg9Aw2J+HGSLEk5nlHg/ZORaVw21PxkuBA1M+Q== 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 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=SagfHCoaG0ckAdlHi1s7/bNsZjweXPY6DFMtMXPfGO0=; b=W6iKEv4TC0AT7PAf5Fa9ueoJ1i3CsKE6GhNfFefabNk+zHeLYf0KZMrSF4A4HpW8Zsj2uwUc1DXv7q3msmhUeIevm16TxdpoZ7JMXeFtVcfO0D+A0S2s0Kb+1mYqSBD7mmz/9FiPQDYZZ9N31i7R1hC47IbhQ1cBX/5Dg2+T8Qs= Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by AM6PR08MB4022.eurprd08.prod.outlook.com (2603:10a6:20b:b0::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Tue, 18 May 2021 11:05:11 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::80cb:878d:c8f1:2688]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::80cb:878d:c8f1:2688%7]) with mapi id 15.20.4129.031; Tue, 18 May 2021 11:05:11 +0000 Subject: Re: [PATCH v3 2/5] ArmPkg: prepare 32bit ARM build of StandaloneMmPkg To: Etienne Carriere , devel@edk2.groups.io Cc: Achin Gupta , Ard Biesheuvel , Jiewen Yao , Leif Lindholm , Sughosh Ganu , nd@arm.com References: <20210517074054.30281-1-etienne.carriere@linaro.org> <20210517074054.30281-2-etienne.carriere@linaro.org> From: "Sami Mujawar" Message-ID: Date: Tue, 18 May 2021 12:05:09 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 In-Reply-To: <20210517074054.30281-2-etienne.carriere@linaro.org> X-Originating-IP: [217.140.106.52] X-ClientProxiedBy: LO4P123CA0423.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18b::14) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.1.196.43] (217.140.106.52) by LO4P123CA0423.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.32 via Frontend Transport; Tue, 18 May 2021 11:05:10 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7f9da248-4a15-4fe8-06a8-08d919ecd302 X-MS-TrafficTypeDiagnostic: AM6PR08MB4022:|AM0PR08MB4305: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:2331;OLM:2331; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 8/hLRf2egKsITinarEWOK3F1Qk4cErmW+s+1ZGXsKZKnm7zQij3gUYeJKDfWpQWSFVIW1qCAx9m7KzlQmdAk5xcomi7W9Z1EStBBiblP5DXuy5mh2mxgDQVEmrL5DVk4L/VFNoz121JhS2VlcUJTtUA6COQLFhYQHDYDvMYzFqlQMczCjsXDt2nGo/ftkp1JWsoUWnpXNsyBihPC9F0OBLG2haxzX++y/EFmNPNiWrsUbYU3HyG8YlJr2Dyvv9k5dbnwH/3ukZ7Fkfkf6+juoWge1/3piphFOSmrtdes6BwfCtjnm6+lQnvac+8We6RBhpBIMGmivzp9sra8zQS0SxkIrnTWQladwbDFnAobN/sZ3PtMtL5rkQqhZIAJ+VUF8V+8UOgjqAzH+92HFUgF97tExxB7L4qsN/gO2Ok1bauGVjR8u0YY7r8o4FGogwZ8ZARRUq5A8QC/ajk8GTAh29Nbrw8tRkFBjAMHXtbPckzzvZU3JOBXTmV+YjTuT029OMevFGsDcENLne1dsA5NAvyAQMXNdGL7u8x0tNKCON5qIVAs1G+Nz19VmfaxvVasTW62n6kxRnW+Si3l1/PSJI++ETWqX/ygLgxCjIi3z+5A0MCUW8S1oVEXroKGXPV6pulRGr4sSAJpWm/uwA3lLkDxkZxxuW/2XdWJZ0KBMt1JdxUZmu18Lr3bwgjX7COLpILUNacX4dj+g7G8QZp1I2fWo7VdI90XmPAdP53k7Rc= 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:(6029001)(4636009)(346002)(136003)(39850400004)(366004)(376002)(396003)(19627235002)(30864003)(86362001)(956004)(31686004)(478600001)(53546011)(2616005)(4326008)(66946007)(44832011)(66476007)(66556008)(26005)(16526019)(33964004)(31696002)(186003)(8936002)(5660300002)(83380400001)(8676002)(52116002)(2906002)(6486002)(54906003)(38350700002)(38100700002)(16576012)(316002)(36756003)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?UDNUN2w1YWpQZWhyYnBHQnpSNlc1TDZSbXlSdFc0cEp0eXYvbThzeUR3cGR2?= =?utf-8?B?WFdZOGNtWVFxTFZBaTlRZDZVbThxYmRZbnptY1MyUysvMlYrYUVmUGZDNm5H?= =?utf-8?B?M0huN3JHQlNFdE5PZTRHRnJ4aGVvM1pXNnhtWGNQYVhUcmo5M2ljcW5WbWFq?= =?utf-8?B?U3E1Qi9TckZSSGh6VmVzNVFCWVFiaXRHcHlKMzlTMjVFMmcyRytrck40UE05?= =?utf-8?B?SGI3QjcvY3o4WEYzaFBPekVQdDdoeWRRaWcweU5YRElmaUZjS1VIUCtiQjEw?= =?utf-8?B?MWlRVVhqLzdWL0tYS1ovbmxUMG5GMXlmbTZ4Y0hkQTdaaG5LOGQzL3U5c1lW?= =?utf-8?B?NUc2MXJpeFlwUFJJekNVUXNqcXhGc2NzWnVQZm12WndHVXFrSS9SN2d0aWNP?= =?utf-8?B?MytFc2hqUmlNcnpqamQ0WkhGOGhhN1hQU1M1WnV4aHJCUno2OHhkQms2Mmho?= =?utf-8?B?WWJaUGZ0aENSdnUzeDgzTDZmb0pYRURKVEpkY3ZBQndSb2lvQkVZbmVlNXhX?= =?utf-8?B?SEd1Mk80UUFka2lBUWVnYktYTnFhUzR5N0RwVnhUR3N4SUVCN1dTS25DVlQ4?= =?utf-8?B?cjhySnNGMlRSYmV1Z20yMDJjRWJwZlRmQWdPU0htdEFmVVFQdEJTbFRkUk1T?= =?utf-8?B?SDJaaEF5KytqbXB6NU1JOEovZ05aR1FnZ2lXcEo1a2lJdTMxSUVNRXFLNVNT?= =?utf-8?B?dzZNQjAzR0dVQTVoR2NKTTZtRTZaQVN4M3ZtaTFWRkIrTzUvYWJXLzVPUWdZ?= =?utf-8?B?RWdHQUd4RjNja0xPWmdjamxBY1k5b3BXaGJWNjJQclBZNW5OU1lLdTdqS1VM?= =?utf-8?B?UlRiTlY3cGE0MU10cWpEaTJyU2UrY1I1SEhDa1VRM0xPdzZDMitvZ2NmNTdS?= =?utf-8?B?Vkt6YUpQc3VudDRSb05vK2dFV3VMR0V3ZCthL2UrQXRGaUFQWTdSK1A1Tlpj?= =?utf-8?B?Z3gwMVpiVXR0ZDVWbUJjTUsvbzllVmMwdk9ZODNhZDNzWDQwNTcyK1F2OWhY?= =?utf-8?B?UDZpS0RUelBnRWRhREJ4ZXFxYjlaN2V4UEhRc1BLQlkxcWhnWktxZ2ozNm9o?= =?utf-8?B?dEYrckRTOXh2SXoxcldvNTdLS2pnRS9rZENMMVRZd01uNkhHVHdkblNLNm9o?= =?utf-8?B?bE9xS2U5NzgxeTJCeUgxQjF2akZqc1dKNjlqWVZwSGt1S3k1NXhWT1pkN3lj?= =?utf-8?B?TENuNHhBdmd1U2crRjlacy9uSTY0TUk2dG9Pd0k1SjZRUzR5SGVqazJMdThi?= =?utf-8?B?VWJlNWw2TEIvMTdDRG9iaHBESmx1ZitmQlpyTmFYUW9lSk8zclZTZTJnQlpC?= =?utf-8?B?b3lROWNxT2xER0ZCZ3RobHF2SGxVZ3MvbEFzSVZBZEJwMDhtTk1QcHBoOGZH?= =?utf-8?B?REpocWRTR0x0a3NIQm1Namt3NXRjVzErb2J0K2ZUOTlZTGM0WlVhUGpaTmxa?= =?utf-8?B?NnhHclJ0bFBuZmRJdlBRUUVWUERhbFNKYWZVdldOajlJU3hac1lxWVJOVHBz?= =?utf-8?B?OFAySWVqVURHL1lyaEc2NG5WOUJSdFpJaW0yYWF3QmdscXNiOFJpT1Bpd3A2?= =?utf-8?B?bmlJam53S0VuRDBaL2poVUNHc0U2em90bVpYSTAwM2xmeGxzVzZOSnFPVFdY?= =?utf-8?B?eEk1c053N2F5cHlMSHNWczJvTDBsK2xQVG11SG84MG1LdnZXVkVPQWZrbkd0?= =?utf-8?B?QnpILzdxUmtoeHJkaFJYcGNtSnZTVTZKTVVYN0Z5UXdsQ2EzQ3JVMTFBcEZG?= =?utf-8?Q?s8JgJwkQuDsFoC1ULvNzTaxWnG0ihQTKEGwgFJo?= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4022 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: dee5b7a4-90b1-438a-b917-08d919eccdc0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F1n3JKdX+Dg0FXK+g/x5wkCl8qJJze9nxXloh7S3lAUnh979yX6KlPVFbnDRrNW6iByp/yikIY+thxsqRj3aNNWZqoPcSfmecqnwa/pdSzJ+soXkTS3JPQM6W7wPlARSMgCeRgTct06EwhnyfZQdRFujkTHW8gFJc2lRjaHtTNfrYKNz0n109u/Izhv4NgM/7SOhl7CkgZXB7xbGOiHcDzfUng1WxxbIdcmu56UAyJrTTGMGn2bmfcHxyp9i6tiyu0i7cVrsH3MdImcWqcgH6h57zUVFLkw5y+e05abj9mVlXyQkpP3W9545WjW3jjkJt9/emO8+yqzqsD46+kFE3VC1gpdNRlQaa7/ajJvsDWN8qW61io5EJjdVEQfyQ4HkuRrpmtrWPt7Uuoi7tkNNrYo6LXvm5bmzXjwCtlzS2rDXGN9/A+BRNXvOSatbco1bRVlSnFZYShMVPBNAXU3oQbOgXJQtD3lTqyczzQZ+E7bcruCPq83ACS7rdD7IAbpk4VYkDnRmL0P6ydzyHKGOSvxAHMgIH5z26Nyb53Bh0XWn0fjlGTC+zhXXM87uvW3neC675Rw4Xm598dYU0y+BwIzWTJg5I83MhatmY1UlkaoOEMKc35kwFOo9ndZwSmpynniRZ+DlArdHtDxUEgkg49d0FMwBSNnBC7FgIIRlVHmMufMVqAUtmq2bbUy73HEx 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)(396003)(39850400004)(346002)(376002)(36840700001)(46966006)(5660300002)(186003)(81166007)(16576012)(316002)(16526019)(33964004)(82310400003)(2906002)(30864003)(54906003)(6486002)(26005)(47076005)(4326008)(8676002)(83380400001)(70206006)(31696002)(336012)(36860700001)(2616005)(70586007)(956004)(36756003)(478600001)(53546011)(356005)(82740400003)(86362001)(44832011)(8936002)(31686004)(19627235002)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2021 11:05:19.0985 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7f9da248-4a15-4fe8-06a8-08d919ecd302 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: VE1EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4305 Content-Type: multipart/alternative; boundary="------------EE670E8D462AEDA44360EC49" Content-Language: en-GB --------------EE670E8D462AEDA44360EC49 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi Etienne, This patch looks good to me. Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 17/05/2021 08:40 AM, Etienne Carriere wrote: > Changes in ArmPkg to prepare building StandaloneMm firmware for > 32bit Arm architectures. > > Adds MmCommunicationDxe driver and ArmMmuPeiLib and > ArmmmuStandaloneMmLib libraries to the list of the standard > components build for ArmPkg on when ARM architectures. > > Changes path of source file AArch64/ArmMmuStandaloneMmLib.c > and compile it for both 32bit and 64bit architectures. > > Cc: Achin Gupta > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Cc: Sughosh Ganu > Signed-off-by: Etienne Carriere > --- > No change since v2 > No change since v1 > --- > ArmPkg/ArmPkg.dec | 2 +- > ArmPkg/ArmPkg.dsc | 2 +- > ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c | 2 +- > ArmPkg/Library/StandaloneMmMmuLib/{AArch64 => }/ArmMmuStandaloneMmLib.c | 15 ++++++++------- > ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf | 6 +++--- > 5 files changed, 14 insertions(+), 13 deletions(-) > > diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec > index 214b2f5892..6ed51edd03 100644 > --- a/ArmPkg/ArmPkg.dec > +++ b/ArmPkg/ArmPkg.dec > @@ -137,7 +137,7 @@ > # hardware coherency (i.e., no virtualization or cache coherent DMA) > gArmTokenSpaceGuid.PcdNormalMemoryNonshareableOverride|FALSE|BOOLEAN|0x00000043 > > -[PcdsFeatureFlag.AARCH64] > +[PcdsFeatureFlag.AARCH64, PcdsFeatureFlag.ARM] > ## Used to select method for requesting services from S-EL1.

> # TRUE - Selects FF-A calls for communication between S-EL0 and SPMC.
> # FALSE - Selects SVC calls for communication between S-EL0 and SPMC.
> diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc > index 926986cf7f..4c79dadf9e 100644 > --- a/ArmPkg/ArmPkg.dsc > +++ b/ArmPkg/ArmPkg.dsc > @@ -158,7 +158,7 @@ > ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf > ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLibNull.inf > > -[Components.AARCH64] > +[Components.AARCH64, Components.ARM] > ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf > ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf > ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf > diff --git a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c b/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c > index b1e3095809..4ae38a9f22 100644 > --- a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c > +++ b/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c > @@ -125,7 +125,7 @@ MmCommunication2Communicate ( > } > > // SMC Function ID > - CommunicateSmcArgs.Arg0 = ARM_SMC_ID_MM_COMMUNICATE_AARCH64; > + CommunicateSmcArgs.Arg0 = ARM_SMC_ID_MM_COMMUNICATE; > > // Cookie > CommunicateSmcArgs.Arg1 = 0; > diff --git a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c > similarity index 92% > rename from ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c > rename to ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c > index dd014beec8..20f873e680 100644 > --- a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c > +++ b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c > @@ -2,6 +2,7 @@ > File managing the MMU for ARMv8 architecture in S-EL0 > > Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.
> + Copyright (c) 2021, Linaro Limited > SPDX-License-Identifier: BSD-2-Clause-Patent > > @par Reference(s): > @@ -62,7 +63,7 @@ SendMemoryPermissionRequest ( > // for other Direct Request calls which are not atomic > // We therefore check only for Direct Response by the > // callee. > - if (SvcArgs->Arg0 == ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP_AARCH64) { > + if (SvcArgs->Arg0 == ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP) { > // A Direct Response means FF-A success > // Now check the payload for errors > // The callee sends back the return value > @@ -164,13 +165,13 @@ GetMemoryPermissions ( > ZeroMem (&SvcArgs, sizeof (ARM_SVC_ARGS)); > if (FeaturePcdGet (PcdFfaEnable)) { > // See [2], Section 10.2 FFA_MSG_SEND_DIRECT_REQ. > - SvcArgs.Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64; > + SvcArgs.Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ; > SvcArgs.Arg1 = ARM_FFA_DESTINATION_ENDPOINT_ID; > SvcArgs.Arg2 = 0; > - SvcArgs.Arg3 = ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AARCH64; > + SvcArgs.Arg3 = ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES; > SvcArgs.Arg4 = BaseAddress; > } else { > - SvcArgs.Arg0 = ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AARCH64; > + SvcArgs.Arg0 = ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES; > SvcArgs.Arg1 = BaseAddress; > SvcArgs.Arg2 = 0; > SvcArgs.Arg3 = 0; > @@ -219,15 +220,15 @@ RequestMemoryPermissionChange ( > ZeroMem (&SvcArgs, sizeof (ARM_SVC_ARGS)); > if (FeaturePcdGet (PcdFfaEnable)) { > // See [2], Section 10.2 FFA_MSG_SEND_DIRECT_REQ. > - SvcArgs.Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64; > + SvcArgs.Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ; > SvcArgs.Arg1 = ARM_FFA_DESTINATION_ENDPOINT_ID; > SvcArgs.Arg2 = 0; > - SvcArgs.Arg3 = ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES_AARCH64; > + SvcArgs.Arg3 = ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES; > SvcArgs.Arg4 = BaseAddress; > SvcArgs.Arg5 = EFI_SIZE_TO_PAGES (Length); > SvcArgs.Arg6 = Permissions; > } else { > - SvcArgs.Arg0 = ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES_AARCH64; > + SvcArgs.Arg0 = ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES; > SvcArgs.Arg1 = BaseAddress; > SvcArgs.Arg2 = EFI_SIZE_TO_PAGES (Length); > SvcArgs.Arg3 = Permissions; > diff --git a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf > index 6c71fe0023..ff20e58980 100644 > --- a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf > +++ b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf > @@ -16,14 +16,14 @@ > LIBRARY_CLASS = StandaloneMmMmuLib > PI_SPECIFICATION_VERSION = 0x00010032 > > -[Sources.AARCH64] > - AArch64/ArmMmuStandaloneMmLib.c > +[Sources] > + ArmMmuStandaloneMmLib.c > > [Packages] > ArmPkg/ArmPkg.dec > MdePkg/MdePkg.dec > > -[FeaturePcd.AARCH64] > +[FeaturePcd.ARM, FeaturePcd.AARCH64] > gArmTokenSpaceGuid.PcdFfaEnable > > [LibraryClasses] --------------EE670E8D462AEDA44360EC49 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit

Hi Etienne,

This patch looks good to me.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar


On 17/05/2021 08:40 AM, Etienne Carriere wrote:
Changes in ArmPkg to prepare building StandaloneMm firmware for
32bit Arm architectures.

Adds MmCommunicationDxe driver and ArmMmuPeiLib and
ArmmmuStandaloneMmLib libraries to the list of the standard
components build for ArmPkg on when ARM architectures.

Changes path of source file AArch64/ArmMmuStandaloneMmLib.c
and compile it for both 32bit and 64bit architectures.

Cc: Achin Gupta <achin.gupta@arm.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Sughosh Ganu <sughosh.ganu@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
---
No change since v2
No change since v1
---
 ArmPkg/ArmPkg.dec                                                       |  2 +-
 ArmPkg/ArmPkg.dsc                                                       |  2 +-
 ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c                     |  2 +-
 ArmPkg/Library/StandaloneMmMmuLib/{AArch64 => }/ArmMmuStandaloneMmLib.c | 15 ++++++++-------
 ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf             |  6 +++---
 5 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec
index 214b2f5892..6ed51edd03 100644
--- a/ArmPkg/ArmPkg.dec
+++ b/ArmPkg/ArmPkg.dec
@@ -137,7 +137,7 @@
   # hardware coherency (i.e., no virtualization or cache coherent DMA)
   gArmTokenSpaceGuid.PcdNormalMemoryNonshareableOverride|FALSE|BOOLEAN|0x00000043
 
-[PcdsFeatureFlag.AARCH64]
+[PcdsFeatureFlag.AARCH64, PcdsFeatureFlag.ARM]
   ## Used to select method for requesting services from S-EL1.<BR><BR>
   #   TRUE  - Selects FF-A calls for communication between S-EL0 and SPMC.<BR>
   #   FALSE - Selects SVC calls for communication between S-EL0 and SPMC.<BR>
diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc
index 926986cf7f..4c79dadf9e 100644
--- a/ArmPkg/ArmPkg.dsc
+++ b/ArmPkg/ArmPkg.dsc
@@ -158,7 +158,7 @@
   ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf
   ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLibNull.inf
 
-[Components.AARCH64]
+[Components.AARCH64, Components.ARM]
   ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf
   ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf
   ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf
diff --git a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c b/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c
index b1e3095809..4ae38a9f22 100644
--- a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c
+++ b/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c
@@ -125,7 +125,7 @@ MmCommunication2Communicate (
   }
 
   // SMC Function ID
-  CommunicateSmcArgs.Arg0 = ARM_SMC_ID_MM_COMMUNICATE_AARCH64;
+  CommunicateSmcArgs.Arg0 = ARM_SMC_ID_MM_COMMUNICATE;
 
   // Cookie
   CommunicateSmcArgs.Arg1 = 0;
diff --git a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c
similarity index 92%
rename from ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
rename to ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c
index dd014beec8..20f873e680 100644
--- a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
+++ b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c
@@ -2,6 +2,7 @@
   File managing the MMU for ARMv8 architecture in S-EL0
 
   Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.<BR>
+  Copyright (c) 2021, Linaro Limited
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
   @par Reference(s):
@@ -62,7 +63,7 @@ SendMemoryPermissionRequest (
     // for other Direct Request calls which are not atomic
     // We therefore check only for Direct Response by the
     // callee.
-    if (SvcArgs->Arg0 == ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP_AARCH64) {
+    if (SvcArgs->Arg0 == ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP) {
       // A Direct Response means FF-A success
       // Now check the payload for errors
       // The callee sends back the return value
@@ -164,13 +165,13 @@ GetMemoryPermissions (
   ZeroMem (&SvcArgs, sizeof (ARM_SVC_ARGS));
   if (FeaturePcdGet (PcdFfaEnable)) {
     // See [2], Section 10.2 FFA_MSG_SEND_DIRECT_REQ.
-    SvcArgs.Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64;
+    SvcArgs.Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ;
     SvcArgs.Arg1 = ARM_FFA_DESTINATION_ENDPOINT_ID;
     SvcArgs.Arg2 = 0;
-    SvcArgs.Arg3 = ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AARCH64;
+    SvcArgs.Arg3 = ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES;
     SvcArgs.Arg4 = BaseAddress;
   } else {
-    SvcArgs.Arg0 = ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AARCH64;
+    SvcArgs.Arg0 = ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES;
     SvcArgs.Arg1 = BaseAddress;
     SvcArgs.Arg2 = 0;
     SvcArgs.Arg3 = 0;
@@ -219,15 +220,15 @@ RequestMemoryPermissionChange (
   ZeroMem (&SvcArgs, sizeof (ARM_SVC_ARGS));
   if (FeaturePcdGet (PcdFfaEnable)) {
     // See [2], Section 10.2 FFA_MSG_SEND_DIRECT_REQ.
-    SvcArgs.Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64;
+    SvcArgs.Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ;
     SvcArgs.Arg1 = ARM_FFA_DESTINATION_ENDPOINT_ID;
     SvcArgs.Arg2 = 0;
-    SvcArgs.Arg3 = ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES_AARCH64;
+    SvcArgs.Arg3 = ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES;
     SvcArgs.Arg4 = BaseAddress;
     SvcArgs.Arg5 = EFI_SIZE_TO_PAGES (Length);
     SvcArgs.Arg6 = Permissions;
   } else {
-    SvcArgs.Arg0 = ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES_AARCH64;
+    SvcArgs.Arg0 = ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES;
     SvcArgs.Arg1 = BaseAddress;
     SvcArgs.Arg2 = EFI_SIZE_TO_PAGES (Length);
     SvcArgs.Arg3 = Permissions;
diff --git a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf
index 6c71fe0023..ff20e58980 100644
--- a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf
+++ b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf
@@ -16,14 +16,14 @@
   LIBRARY_CLASS                  = StandaloneMmMmuLib
   PI_SPECIFICATION_VERSION       = 0x00010032
 
-[Sources.AARCH64]
-  AArch64/ArmMmuStandaloneMmLib.c
+[Sources]
+  ArmMmuStandaloneMmLib.c
 
 [Packages]
   ArmPkg/ArmPkg.dec
   MdePkg/MdePkg.dec
 
-[FeaturePcd.AARCH64]
+[FeaturePcd.ARM, FeaturePcd.AARCH64]
   gArmTokenSpaceGuid.PcdFfaEnable
 
 [LibraryClasses]

--------------EE670E8D462AEDA44360EC49--