From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (EUR01-VE1-obe.outbound.protection.outlook.com [40.107.14.43]) by mx.groups.io with SMTP id smtpd.web10.6914.1621336050464556463 for ; Tue, 18 May 2021 04:07:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=Tl1PifNF; spf=pass (domain: arm.com, ip: 40.107.14.43, 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=7XEQYEh7UCP1i/c8AsCcppBdQlglh5ove5W5ap+wT4o=; b=Tl1PifNFx7TYAPNg38naVEUVOVeCoahUdPmmbh8IA92jIoMZNnPOleMzFk69hfEtbDxn+C3GnDqp5oaTuseCH2L/wdEfU32Cg6GZ/ItPHci+9nk7OR6iEul4i53vnb+xztRsEJILsCel4NmSnWnENUbzf8IZq1JtQsLnZ2cD9tE= Received: from DB6PR0202CA0045.eurprd02.prod.outlook.com (2603:10a6:4:a5::31) by VI1PR08MB3389.eurprd08.prod.outlook.com (2603:10a6:803:87::26) 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:07:26 +0000 Received: from DB5EUR03FT054.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:a5:cafe::cf) by DB6PR0202CA0045.outlook.office365.com (2603:10a6:4:a5::31) 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:07:26 +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 DB5EUR03FT054.mail.protection.outlook.com (10.152.20.248) 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:07:26 +0000 Received: ("Tessian outbound 3050e7a5b95d:v92"); Tue, 18 May 2021 11:07:26 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7432667cf7df05d7 X-CR-MTA-TID: 64aa7808 Received: from 2a4afbf93d28.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id CBC57DAB-278A-4C46-910D-D70EA74CA493.1; Tue, 18 May 2021 11:07:15 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 2a4afbf93d28.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 18 May 2021 11:07:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ltvYXyVP8MG6+UOmBBk/VD5eDxCet62p1pVWqYde3G64LxUvFLc95aUQN3643e/LpbTriawh3OHozWHPl5liqcmB3nuK5Q+rm7KBlhZlln5q24cZSHPTyLjoQhhdtsPsLSaM846R/HzLFUzc9czNvBMbwAFKVbOyDdql6UoXK8Cl6k+wClsFWiWmvLWPk4Gz51E65p8mcnGtra8Yo8A08TdYojNcxouwiO2pDGPbfk2d907Mlci+Z2na+Wp8q91nC+p6wLv635bWzlwUa+1YQksJMhFvrJRtAVPt9ui+hjRuvBf174pPYcPR7t+P4H2FtHPHk9pKu5uNYJXRxn7veQ== 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=7XEQYEh7UCP1i/c8AsCcppBdQlglh5ove5W5ap+wT4o=; b=n/xKWmgQ4ne1rH1buEiq0aMPEhTokWFqL3vGWhUDI/535CS/mvWqiqpSt3RDeoyJrCLO3G/M3YuDhv7va/ndaDnVKwsLYa73EEaWNMAsRLqJBs2udkIE/bJLxvzZvZPQHUEffLnFVpXsbWVTqVad4pi+37q1BBx6EBqddBgoZDp2KtnbDrB/bUa8mjvsebvmis+09Fxb0tsfpWyx+2c6qblDGUeY0gavFnN6bhg/MqXyc0wkFkhexqdQwS/QXEJihO6cLniaBSSZvv9j0I0P7jHp8uVDseObCSOLRhKhRmtY5qVsCq0ECDrdK9IEeIMmokm1OP7faYBpwrUHsQBoaw== 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=7XEQYEh7UCP1i/c8AsCcppBdQlglh5ove5W5ap+wT4o=; b=Tl1PifNFx7TYAPNg38naVEUVOVeCoahUdPmmbh8IA92jIoMZNnPOleMzFk69hfEtbDxn+C3GnDqp5oaTuseCH2L/wdEfU32Cg6GZ/ItPHci+9nk7OR6iEul4i53vnb+xztRsEJILsCel4NmSnWnENUbzf8IZq1JtQsLnZ2cD9tE= 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 AM5PR0801MB1714.eurprd08.prod.outlook.com (2603:10a6:203:3a::20) 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:07:12 +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:07:12 +0000 Subject: Re: [PATCH v3 5/5] StandaloneMmPkg: build for 32bit arm machines 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-5-etienne.carriere@linaro.org> From: "Sami Mujawar" Message-ID: Date: Tue, 18 May 2021 12:07:11 +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-5-etienne.carriere@linaro.org> X-Originating-IP: [217.140.106.52] X-ClientProxiedBy: LO2P265CA0474.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a2::30) 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 LO2P265CA0474.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a2::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Tue, 18 May 2021 11:07:12 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 08760c50-4aa4-4195-9b2c-08d919ed1ea3 X-MS-TrafficTypeDiagnostic: AM5PR0801MB1714:|VI1PR08MB3389: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: MW5Hws1BbUJQITkja2d3JSm9v8IeRDFzuPfAHW3Czvkdoo8JkQs8IRAmXN1OX7qb6BRXWv/FaKrrU3MFTxPOVfMsnR0wJVAEI8n03PkIrGL3Bn04pxDy+Fiprw1CRTITsj7SaDPzbNebsBhxYUTNIphiTnhWhTN9HFzBzN8ric8tPJmhXM+PR2kFco6GQ8d2mrNnU2Rw6Ssz2BuFQGY6IgqTptP1LEZufB0wDwVCMZA8YpryZWSaoG5Jxh6prTA//PvNXXEq8fcRaf5LNSbHU4awfY5yocvm3dKsm26RM08Z8re8eFurx8F/f3Scb5fNx+EWxdGFCKnwyR+VXEU77ne7NuDQ3NWD2iOBouLCyNXEFTmTmdSrE1sdHDpcGhqLV7hU0xJ4cGG1oeKXpNzxWcF2aIkjUc1OKamY2eSmAPfCQ352joZNeme9g1NsCqWDhfIdoqA5OyQ9cwsNt7Kf0NP5Ax5cYEmJBfE/TppfXiCLPfvulraRhxeVsAcfVF6gYkdnsWVrSpc3eVZlBw74aM2HnfrJXz/NNHoXew7DpFw9eWansyQXmqXyX1x9ggBEAX/N4rIuR0bq7siCPjjEEFpemJIBSUTfxD6lgimhQr7jwEg5oohB0c+Anl75XDylEDFLlohVZwEPXUmKgVHk5lrokYMUidI5fRlOsgul0rAlzZy8nYPATv2Io2BLCYft6iMi68+b32PoEu70K8Dz1BEu97HCUDENhby5csr6CBA= 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)(39850400004)(136003)(366004)(396003)(376002)(2906002)(16526019)(52116002)(31686004)(30864003)(19627235002)(66946007)(186003)(26005)(44832011)(5660300002)(66556008)(66476007)(4326008)(38100700002)(54906003)(8936002)(2616005)(956004)(83380400001)(38350700002)(6486002)(478600001)(8676002)(86362001)(36756003)(16576012)(31696002)(53546011)(316002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?a2lhbmQxek82QVZOYVBhbHR2TnFqSUN5WTRjSG5GdkFBZXFRVm1wK3QxbEds?= =?utf-8?B?ZTJVSExhQU5jMm00ZWkzdzZXYjREOVhZRTFnYStCTG5ha0NsQXBFQ3JycVJ5?= =?utf-8?B?Z2wzOFIvMjZzaDFhd3IwMUs5NUhiajZ2dkFGWmdJZmg4eUZvZ1k2cjBaMjlm?= =?utf-8?B?dnhVY3ZOcE5wdTBMck9SUHovY0JyNlFZT0VNazBsTDhaQTZRcWJBWWtBU2tZ?= =?utf-8?B?djJHVFhOeTYzZmErWlYzR1hXR3ZyWVFqUlpvRFp6Z3FmMUE1Z0QyajNidE1F?= =?utf-8?B?TWJkSVhzM0hTMGdnUUQyc3p3ajdOWWhaUTc4MWpvNXJ1YjdpRm91ZlQydm5Q?= =?utf-8?B?MXkrZWxOMVQwb1UzVnVZQXNYRmZ3ZjF4TWtUNi80bzhGNGkrWkJRN05Sa1N0?= =?utf-8?B?NnM0VDZQdkwvWW0zOFdnWElNb0w0UVE0UWwweTdtS3lrTDRFNmN5aDhmNS9p?= =?utf-8?B?SWRRMlliR28rUGRpZVRFVFgwM1o2TmNmZXcrSTJGSnBFYW14UUloVjlYZkxj?= =?utf-8?B?TUZ2bkxQclAwQ2hrYkJQUFlZUkNIclZMKzFDSUhpOHNpR1Y2RlpRSnI4dDJi?= =?utf-8?B?NE8yeUs2MERWV29QRWFjcmU1S1Z4SzlaVzFFMU10VEV0QkxGZWxQV0JQNUpi?= =?utf-8?B?OFVtREdicmlJTVR2MlFtOTNYajEzdG5kaGsxaUltcnUxUTE2S2N2eU5wL2dX?= =?utf-8?B?b09uZnZtSVRyU1ZDK0Y1TGR2eHVmTXVHZXdKKzFTdVYybm1OM3BhQkkwN3Bn?= =?utf-8?B?MFB2WEh2dTNQNXNqTmE0SStzOGVsZzVTNlFPcTMzNEk3TXJrNS9PTTlkYjZT?= =?utf-8?B?U1dNaVJVb1pmQmtqSW1VOXVkY2ZObDQwTXhtWTVVTHVjV1pqa3pHOCtTMkha?= =?utf-8?B?U0xnZzVML3F2Y1JHaHlaelhlWS9XNnBLREVESG1vQWtHeDY5L0ZkcHkxc3R5?= =?utf-8?B?ZmYybUw5U1RPcndnWkRXbDBvVHM4SWRaSGd4Z3BIb09ZVWFnRVhZbkw1TTFV?= =?utf-8?B?Snlvc002UlJ5WHZFVnRRR3Bxbms4SFNhc3g4R2M0aWhzbjBuR3J6WWdxVTlp?= =?utf-8?B?ODRsbjJ4c3hVbXNGYjhWbk54bVpwcmtEV29nRTZKazBYKzcvWXV0Y2srTVp2?= =?utf-8?B?eHh0MHdtRkhBTXFQejlmVDlyZktiT3ZkbU1lQ2d4eHAyclhZME1NM29Rc3lu?= =?utf-8?B?T1VQV29yRWZOMU9sM3RCV0ZOeSt5c2xHcWhMR2tLbjdDWThSclpKeWlqU0Jm?= =?utf-8?B?TzN1Yncyc1hCNHl5R3huTXo0SG5nYnRQcng3cmlJL05XUmpibDhmcGtiZGt2?= =?utf-8?B?MkZNY3JRTS9hT21sNGUxYXJtUmo2bytSVmdZaGQrOC9FaEgwWUhMZ0V6ZkJ4?= =?utf-8?B?OWE2OWxtZ3pvekNSa2d0WWFoQjhMMWtkd3g5MzJMRVdLREJpUURkYzJ6cndH?= =?utf-8?B?YUpKSFFkTkQrY3JlaVNRTURycVh5YnI0UHhNaTAwa3pqem9JK05XWXVIQVJG?= =?utf-8?B?dWdRM3RnZElFZ1Y4S3FaM0ttN2NKbXg3MkRMWUs5S0wzMHpjTEVWcUNuMW5T?= =?utf-8?B?M3BBUWdxUmVQeTh3eDhLL290bCtIdExkYURmdTFkU3QvbkUzUzl0QjhpZUVo?= =?utf-8?B?OXVVaCtrRTQxTDFrUXlIQng0dzlKL2t1MHE3Z0d3MEk0TFhBdG9YMFN6NjRF?= =?utf-8?B?V0FFTDMwSndRRkpPajVUUHVjSHhsMUJNQ1NzeFZPcVJCMjcrVTNGZFBuTzFp?= =?utf-8?Q?iJb2cb0wSdyFR4obq3NBl8qsc4x4XwRgRlZ+LXz?= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1714 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: DB5EUR03FT054.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 9d57702c-ff86-49ee-4309-08d919ed164b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iNLtXMOiE7BGsVFIbP9KGMF7jtleojnxKUN81/5ebOKOA73RkXgELnMj6PPmA6TNpvFnJgCUyPRCvsQgxZfZKROqxFDJ9HsV1nrqZinuW+uLzhsL3Gr06Xj0FCQgHAXJu7GMhvxdDcJqh5klbGnLzb7aMTkaYd0gc+mAgFYcf0oNSkiPxgCvtAJTsq8pseSMZJjJsvcJO+mmgQOMtOpJnFyTNjosIqCM6pR5RrKXnV4lXQeMTaij93ExcgI+HpMxb37C9TZCAptMcuutN8aOH8ovvvjjY9FF55OafX/aQ+e7SDLfqtU3OAWdOInM1YlQJ0NiHtwbTZjBLlFXdjh88Nkadc48LuYtK4awXBBZqtu5ORJWH2W1vGChGSULeEdpMgAUTLFfay9BQ7GQxAyZQ1cztFXEl8OHW80djY0lyZxL8UNHSUe8VhPqCsooHJ32rDjpoHMU5/gAk8ObGGN0Jnlka/VY7KlcycyVRQf5LFk2HojuhJBD3xH1WMNZnW//f5MZMZzIu7DjgnmY+JVOQ4crd7NAcOqx3DBDvLl0HjU8wtdtfmrgpJ+zZZUI/YqJXh4iggPSet8spHrDFepJYicyLv4JRqEit412Ji4drSGKnSsrWwUHXAkdEkWCdjkdWMrtFBE46wL/HUOyX6Lh6QzB0itZACktyX6MIXJlfNB3TUl5EchSqMhJsRJZXCGi 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)(39850400004)(396003)(36840700001)(46966006)(54906003)(336012)(19627235002)(2616005)(82310400003)(31696002)(81166007)(70586007)(36756003)(47076005)(44832011)(30864003)(6486002)(16526019)(31686004)(83380400001)(8676002)(356005)(956004)(316002)(186003)(70206006)(16576012)(36860700001)(53546011)(26005)(82740400003)(478600001)(4326008)(5660300002)(86362001)(8936002)(2906002)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2021 11:07:26.1538 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 08760c50-4aa4-4195-9b2c-08d919ed1ea3 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: DB5EUR03FT054.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3389 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Hi Etienne, Please find my response inline marked [SAMI]. Regards, Sami Mujawar On 17/05/2021 08:40 AM, Etienne Carriere wrote: > This change allows to build StandaloneMmPkg components for 32bit Arm > StandaloneMm firmware. > > This change mainly moves AArch64/ source files to Arm/ side directory > for several components: StandaloneMmCpu, StandaloneMmCoreEntryPoint > and StandaloneMmMemLib. The source file is built for both 32b and 64b > Arm targets. > > Cc: Achin Gupta > Cc: Ard Biesheuvel > Cc: Jiewen Yao > Cc: Leif Lindholm > Cc: Sami Mujawar > Cc: Sughosh Ganu > Signed-off-by: Etienne Carriere > --- > No change since v2 > > Changes since v1: > - ARM_SMC_ID_MM_COMMUNICATE 32b/64b agnostic helper ID is defined > in ArmStdSmc.h (see 1st commit in this series) instead of being > local to EventHandle.c. > - Fix void occurrence to VOID. > - Fix path in StandaloneMmPkg/StandaloneMmPkg.dsc > --- > StandaloneMmPkg/Core/StandaloneMmCore.inf | 2 +- > StandaloneMmPkg/Drivers/StandaloneMmCpu/{AArch64 => }/EventHandle.c | 5 +++-- > StandaloneMmPkg/Drivers/StandaloneMmCpu/{AArch64 => }/StandaloneMmCpu.c | 2 +- > StandaloneMmPkg/Drivers/StandaloneMmCpu/{AArch64 => }/StandaloneMmCpu.h | 0 > StandaloneMmPkg/Drivers/StandaloneMmCpu/{AArch64 => }/StandaloneMmCpu.inf | 0 > StandaloneMmPkg/Include/Library/{AArch64 => Arm}/StandaloneMmCoreEntryPoint.h | 0 > StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/{AArch64 => Arm}/CreateHobList.c | 2 +- > StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/{AArch64 => Arm}/SetPermissions.c | 2 +- > StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/{AArch64 => Arm}/StandaloneMmCoreEntryPoint.c | 16 ++++++++-------- > StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf | 14 +++++++------- > StandaloneMmPkg/Library/StandaloneMmCoreHobLib/{AArch64 => Arm}/StandaloneMmCoreHobLib.c | 0 > StandaloneMmPkg/Library/StandaloneMmCoreHobLib/{AArch64 => Arm}/StandaloneMmCoreHobLibInternal.c | 0 > StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf | 8 ++++---- > StandaloneMmPkg/Library/StandaloneMmMemLib/{AArch64/StandaloneMmMemLibInternal.c => ArmStandaloneMmMemLibInternal.c} | 9 ++++++++- > StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf | 6 +++--- > StandaloneMmPkg/Library/VariableMmDependency/VariableMmDependency.inf | 2 +- > StandaloneMmPkg/StandaloneMmPkg.dsc | 10 +++++----- > 17 files changed, 43 insertions(+), 35 deletions(-) > > diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.inf b/StandaloneMmPkg/Core/StandaloneMmCore.inf > index 87bf6e9440..56042b7b39 100644 > --- a/StandaloneMmPkg/Core/StandaloneMmCore.inf > +++ b/StandaloneMmPkg/Core/StandaloneMmCore.inf > @@ -17,7 +17,7 @@ > PI_SPECIFICATION_VERSION = 0x00010032 > ENTRY_POINT = StandaloneMmMain > > -# VALID_ARCHITECTURES = IA32 X64 AARCH64 > +# VALID_ARCHITECTURES = IA32 X64 AARCH64 ARM > > [Sources] > StandaloneMmCore.c > diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c b/StandaloneMmPkg/Drivers/StandaloneMmCpu/EventHandle.c > similarity index 95% > rename from StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c > rename to StandaloneMmPkg/Drivers/StandaloneMmCpu/EventHandle.c > index 63fbe26642..165d696f99 100644 > --- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c > +++ b/StandaloneMmPkg/Drivers/StandaloneMmCpu/EventHandle.c > @@ -2,6 +2,7 @@ > > Copyright (c) 2016 HP Development Company, L.P. > Copyright (c) 2016 - 2021, Arm Limited. All rights reserved. > + Copyright (c) 2021, Linaro Limited > > SPDX-License-Identifier: BSD-2-Clause-Patent > > @@ -92,8 +93,8 @@ PiMmStandaloneArmTfCpuDriverEntry ( > // receipt of a synchronous MM request. Use the Event ID to distinguish > // between synchronous and asynchronous events. > // > - if ((ARM_SMC_ID_MM_COMMUNICATE_AARCH64 != EventId) && > - (ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64 != EventId)) { > + if ((ARM_SMC_ID_MM_COMMUNICATE != EventId) && > + (ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ != EventId)) { > DEBUG ((DEBUG_INFO, "UnRecognized Event - 0x%x\n", EventId)); > return EFI_INVALID_PARAMETER; > } > diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.c b/StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.c > similarity index 96% > rename from StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.c > rename to StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.c > index d4590bcd19..10097f792f 100644 > --- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.c > +++ b/StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.c > @@ -10,7 +10,7 @@ > > #include > #include > -#include > +#include > #include > #include > #include > diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.h b/StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.h > similarity index 100% > rename from StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.h > rename to StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.h > diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.inf b/StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf > similarity index 100% > rename from StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.inf > rename to StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf > diff --git a/StandaloneMmPkg/Include/Library/AArch64/StandaloneMmCoreEntryPoint.h b/StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h > similarity index 100% > rename from StandaloneMmPkg/Include/Library/AArch64/StandaloneMmCoreEntryPoint.h > rename to StandaloneMmPkg/Include/Library/Arm/StandaloneMmCoreEntryPoint.h > diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/CreateHobList.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHobList.c > similarity index 97% > rename from StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/CreateHobList.c > rename to StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHobList.c > index 4d4cf3d5ff..85f8194687 100644 > --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/CreateHobList.c > +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHobList.c > @@ -14,7 +14,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #include > #include > > -#include > +#include > #include > #include > #include > diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/SetPermissions.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/SetPermissions.c > similarity index 96% > rename from StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/SetPermissions.c > rename to StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/SetPermissions.c > index 4a380df4a6..cd4b90823e 100644 > --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/SetPermissions.c > +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/SetPermissions.c > @@ -14,7 +14,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #include > #include > > -#include > +#include > #include > #include > #include > diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c > similarity index 94% > rename from StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c > rename to StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c > index b445d6942e..49cf51a789 100644 > --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c > +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c > @@ -10,7 +10,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > > #include > > -#include > +#include > > #include > #include > @@ -182,13 +182,13 @@ DelegatedEventLoop ( > } > > if (FfaEnabled) { > - EventCompleteSvcArgs->Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP_AARCH64; > + EventCompleteSvcArgs->Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP; > EventCompleteSvcArgs->Arg1 = 0; > EventCompleteSvcArgs->Arg2 = 0; > - EventCompleteSvcArgs->Arg3 = ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64; > + EventCompleteSvcArgs->Arg3 = ARM_SVC_ID_SP_EVENT_COMPLETE; > EventCompleteSvcArgs->Arg4 = SvcStatus; > } else { > - EventCompleteSvcArgs->Arg0 = ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64; > + EventCompleteSvcArgs->Arg0 = ARM_SVC_ID_SP_EVENT_COMPLETE; > EventCompleteSvcArgs->Arg1 = SvcStatus; > } > } > @@ -273,13 +273,13 @@ InitArmSvcArgs ( > ) > { > if (FeaturePcdGet (PcdFfaEnable)) { > - InitMmFoundationSvcArgs->Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP_AARCH64; > + InitMmFoundationSvcArgs->Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP; > InitMmFoundationSvcArgs->Arg1 = 0; > InitMmFoundationSvcArgs->Arg2 = 0; > - InitMmFoundationSvcArgs->Arg3 = ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64; > + InitMmFoundationSvcArgs->Arg3 = ARM_SVC_ID_SP_EVENT_COMPLETE; > InitMmFoundationSvcArgs->Arg4 = *Ret; > } else { > - InitMmFoundationSvcArgs->Arg0 = ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64; > + InitMmFoundationSvcArgs->Arg0 = ARM_SVC_ID_SP_EVENT_COMPLETE; > InitMmFoundationSvcArgs->Arg1 = *Ret; > } > } > @@ -395,7 +395,7 @@ _ModuleEntryPoint ( > // > ProcessModuleEntryPointList (HobStart); > > - DEBUG ((DEBUG_INFO, "Shared Cpu Driver EP 0x%lx\n", (UINT64) CpuDriverEntryPoint)); > + DEBUG ((DEBUG_INFO, "Shared Cpu Driver EP %p\n", (VOID *) CpuDriverEntryPoint)); > > finish: > if (Status == RETURN_UNSUPPORTED) { > diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf > index 4fa426f58e..1762586cfa 100644 > --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf > +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf > @@ -21,10 +21,10 @@ > # VALID_ARCHITECTURES = IA32 X64 IPF EBC (EBC is for build only) > # > > -[Sources.AARCH64] > - AArch64/StandaloneMmCoreEntryPoint.c > - AArch64/SetPermissions.c > - AArch64/CreateHobList.c > +[Sources.AARCH64, Sources.ARM] > + Arm/StandaloneMmCoreEntryPoint.c > + Arm/SetPermissions.c > + Arm/CreateHobList.c > > [Sources.X64] > X64/StandaloneMmCoreEntryPoint.c > @@ -34,14 +34,14 @@ > MdeModulePkg/MdeModulePkg.dec > StandaloneMmPkg/StandaloneMmPkg.dec > > -[Packages.AARCH64] > +[Packages.ARM, Packages.AARCH64] > ArmPkg/ArmPkg.dec > > [LibraryClasses] > BaseLib > DebugLib > > -[LibraryClasses.AARCH64] > +[LibraryClasses.ARM, LibraryClasses.AARCH64] > StandaloneMmMmuLib > ArmSvcLib > > @@ -51,7 +51,7 @@ > gEfiStandaloneMmNonSecureBufferGuid > gEfiArmTfCpuDriverEpDescriptorGuid > > -[FeaturePcd.AARCH64] > +[FeaturePcd.ARM, FeaturePcd.AARCH64] > gArmTokenSpaceGuid.PcdFfaEnable > > [BuildOptions] > diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreHobLib/AArch64/StandaloneMmCoreHobLib.c b/StandaloneMmPkg/Library/StandaloneMmCoreHobLib/Arm/StandaloneMmCoreHobLib.c > similarity index 100% > rename from StandaloneMmPkg/Library/StandaloneMmCoreHobLib/AArch64/StandaloneMmCoreHobLib.c > rename to StandaloneMmPkg/Library/StandaloneMmCoreHobLib/Arm/StandaloneMmCoreHobLib.c > diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreHobLib/AArch64/StandaloneMmCoreHobLibInternal.c b/StandaloneMmPkg/Library/StandaloneMmCoreHobLib/Arm/StandaloneMmCoreHobLibInternal.c > similarity index 100% > rename from StandaloneMmPkg/Library/StandaloneMmCoreHobLib/AArch64/StandaloneMmCoreHobLibInternal.c > rename to StandaloneMmPkg/Library/StandaloneMmCoreHobLib/Arm/StandaloneMmCoreHobLibInternal.c > diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf b/StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf > index a2559920e8..34ed536480 100644 > --- a/StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf > +++ b/StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf > @@ -22,7 +22,7 @@ > LIBRARY_CLASS = HobLib|MM_CORE_STANDALONE > > # > -# VALID_ARCHITECTURES = X64 AARCH64 > +# VALID_ARCHITECTURES = X64 AARCH64 ARM > # > [Sources.common] > Common.c > @@ -30,9 +30,9 @@ > [Sources.X64] > X64/StandaloneMmCoreHobLib.c > > -[Sources.AARCH64] > - AArch64/StandaloneMmCoreHobLib.c > - AArch64/StandaloneMmCoreHobLibInternal.c > +[Sources.AARCH64, Sources.ARM] > + Arm/StandaloneMmCoreHobLib.c > + Arm/StandaloneMmCoreHobLibInternal.c > > [Packages] > MdePkg/MdePkg.dec > diff --git a/StandaloneMmPkg/Library/StandaloneMmMemLib/AArch64/StandaloneMmMemLibInternal.c b/StandaloneMmPkg/Library/StandaloneMmMemLib/ArmStandaloneMmMemLibInternal.c > similarity index 86% > rename from StandaloneMmPkg/Library/StandaloneMmMemLib/AArch64/StandaloneMmMemLibInternal.c > rename to StandaloneMmPkg/Library/StandaloneMmMemLib/ArmStandaloneMmMemLibInternal.c > index 4124959e04..fa7df46413 100644 > --- a/StandaloneMmPkg/Library/StandaloneMmMemLib/AArch64/StandaloneMmMemLibInternal.c > +++ b/StandaloneMmPkg/Library/StandaloneMmMemLib/ArmStandaloneMmMemLibInternal.c > @@ -20,6 +20,13 @@ > // > extern EFI_PHYSICAL_ADDRESS mMmMemLibInternalMaximumSupportAddress; > > +#ifdef MDE_CPU_AARCH64 > +#define ARM_PHYSICAL_ADDRESS_BITS 36 > +#endif > +#ifdef MDE_CPU_ARM > +#define ARM_PHYSICAL_ADDRESS_BITS 32 > +#endif > + > /** > Calculate and save the maximum support address. > > @@ -31,7 +38,7 @@ MmMemLibInternalCalculateMaximumSupportAddress ( > { > UINT8 PhysicalAddressBits; > > - PhysicalAddressBits = 36; > + PhysicalAddressBits = ARM_PHYSICAL_ADDRESS_BITS; > > // > // Save the maximum support address in one global variable > diff --git a/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf > index 062b0d7a11..b29d97a746 100644 > --- a/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf > +++ b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf > @@ -28,7 +28,7 @@ > # > # The following information is for reference only and not required by the build tools. > # > -# VALID_ARCHITECTURES = IA32 X64 AARCH64 > +# VALID_ARCHITECTURES = IA32 X64 AARCH64 ARM > # > > [Sources.Common] > @@ -37,8 +37,8 @@ > [Sources.IA32, Sources.X64] > X86StandaloneMmMemLibInternal.c > > -[Sources.AARCH64] > - AArch64/StandaloneMmMemLibInternal.c > +[Sources.AARCH64, Sources.ARM] > + ArmStandaloneMmMemLibInternal.c > > [Packages] > MdePkg/MdePkg.dec > diff --git a/StandaloneMmPkg/Library/VariableMmDependency/VariableMmDependency.inf b/StandaloneMmPkg/Library/VariableMmDependency/VariableMmDependency.inf > index a2a059c5d6..ffb2a6d083 100644 > --- a/StandaloneMmPkg/Library/VariableMmDependency/VariableMmDependency.inf > +++ b/StandaloneMmPkg/Library/VariableMmDependency/VariableMmDependency.inf > @@ -20,7 +20,7 @@ > # > # The following information is for reference only and not required by the build tools. > # > -# VALID_ARCHITECTURES = AARCH64 > +# VALID_ARCHITECTURES = AARCH64|ARM > # > # > > diff --git a/StandaloneMmPkg/StandaloneMmPkg.dsc b/StandaloneMmPkg/StandaloneMmPkg.dsc > index 0c45df95e2..772af1b72b 100644 > --- a/StandaloneMmPkg/StandaloneMmPkg.dsc > +++ b/StandaloneMmPkg/StandaloneMmPkg.dsc > @@ -20,7 +20,7 @@ > PLATFORM_VERSION = 1.0 > DSC_SPECIFICATION = 0x00010011 > OUTPUT_DIRECTORY = Build/StandaloneMm > - SUPPORTED_ARCHITECTURES = AARCH64|X64 > + SUPPORTED_ARCHITECTURES = AARCH64|X64|ARM > BUILD_TARGETS = DEBUG|RELEASE > SKUID_IDENTIFIER = DEFAULT > > @@ -60,7 +60,7 @@ > StandaloneMmDriverEntryPoint|MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf > VariableMmDependency|StandaloneMmPkg/Library/VariableMmDependency/VariableMmDependency.inf > > -[LibraryClasses.AARCH64] > +[LibraryClasses.AARCH64, LibraryClasses.ARM] > ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf > StandaloneMmMmuLib|ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf > ArmSvcLib|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf > @@ -118,8 +118,8 @@ > StandaloneMmPkg/Library/StandaloneMmMemoryAllocationLib/StandaloneMmMemoryAllocationLib.inf > StandaloneMmPkg/Library/VariableMmDependency/VariableMmDependency.inf > > -[Components.AARCH64] > - StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.inf > +[Components.AARCH64, Components.ARM] > + StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf > StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/StandaloneMmPeCoffExtraActionLib.inf > > ################################################################################################### > @@ -131,7 +131,7 @@ > # module style (EDK or EDKII) specified in [Components] section. > # > ################################################################################################### > -[BuildOptions.AARCH64] > +[BuildOptions.AARCH64, BuildOptions.ARM] > GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 -march=armv8-a+nofp -mstrict-align [SAMI] Looks like I missed this in my previous review, sorry. Is '-march=armv8-axxx' correct here? or we need another ARM section with -march=armv7-a? Can you also check if '-mstrict-align' is right and if '-fno-stack-protector' is needed instead, please? I used the following setting from your edk2-platforms patch v1 4/4, file Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc and was able to build on a Windows host PC using gcc-arm-9.2-2019.12-mingw-w64-i686-arm-none-eabi compiler. [BuildOptions.ARM] GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 -march=armv7-a GCC:*_*_*_CC_FLAGS = -fno-stack-protector [/SAMI] > GCC:*_*_*_CC_FLAGS = -mstrict-align >