From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.72]) by mx.groups.io with SMTP id smtpd.web09.1725.1620760725622044783 for ; Tue, 11 May 2021 12:18:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=9UFS8va0; spf=pass (domain: arm.com, ip: 40.107.6.72, 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=HenFJqcBZS4rsGF6rTqBP4Lbo5I+ydEZnfRd9OFg7eY=; b=9UFS8va0fp6xqOZIt+6UZMYqYY0ayB+F2lweGEsk4XbS93qVA5wuAFTmxmdIVCcgYcQmd1Z5cda1IrysSTZKU3NNXqEUbu2lVrifjKtvpVWrAlEtMgLpSMkj4m57w/BSMINEOoICNCZ8+IgWpqD8Gr/IX7fcLV71qpBj1N9wJMc= Received: from AM5PR0601CA0064.eurprd06.prod.outlook.com (2603:10a6:206::29) by DB7PR08MB3803.eurprd08.prod.outlook.com (2603:10a6:10:7f::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.30; Tue, 11 May 2021 19:18:41 +0000 Received: from AM5EUR03FT054.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:0:cafe::42) by AM5PR0601CA0064.outlook.office365.com (2603:10a6:206::29) 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, 11 May 2021 19:18:41 +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 AM5EUR03FT054.mail.protection.outlook.com (10.152.16.212) 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, 11 May 2021 19:18:40 +0000 Received: ("Tessian outbound 9a5bb9d11315:v91"); Tue, 11 May 2021 19:18:40 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 753ba07aec712bcb X-CR-MTA-TID: 64aa7808 Received: from 7e5e593a0c97.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4E13779A-41AE-4685-8195-9E6B06715A99.1; Tue, 11 May 2021 19:18:29 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 7e5e593a0c97.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 11 May 2021 19:18:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CdjBh21Rru9VW7tv3dsVHPKk/3niCIsfClY3CAVnGpdWOwyR4BQBVHq4gGvr7AGNCpjE1so903sQgiBZQ70w5PG9PbH9i7SpFrhtGLg7OX8+dNVnCL1EQIAd0wCmND7zvmqdum/MQJYCmUvmiJoCr/Wu5FtlhgomCBlgFzxU7klRk/wAZBQKj6ZBSBfB7rlFLYr8RVS6FQw+nhLsRat+jQuIC8C+Rz1Ck5nzx+jk++h56KfbvOuUTvIjmZDDMOKfaOCB5WOyjl6RAb2Sg5OY14npZaNe9f2IoP4mXa2RMDZNNvrlkHV+BLhCZRAWk/nzPfM0MZJLkYMypyhEWfYgRg== 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=HenFJqcBZS4rsGF6rTqBP4Lbo5I+ydEZnfRd9OFg7eY=; b=BM7srnRAB0A5GveXVejVDsLyUq9c9uWVFjJa+wpTjJ7Ka0cGGbQYL4shiVbe3iiAGlVCSrZiawBXifPVjfFZpsVrnplhoZx7kYKJ9pNltf08cuO68FoEV9TwEwocmkYqSap9eHIZmOGILRnxJoDYR1CvVyo4i0LU+ja2yX6O4hb09laEWBuViwF4E5vdMrEPrWL7PAfLj3dfLvWLXA44dgeypagVqqXxWSIljsE8GuuvL50pM0I0jFs6iRTS42pRtOLiy2EaQ8skYl3wYcnYpwssq2TU3ICStdY0f/MpWBorsAXJhCsFn7JgQi87EjvnURepCCBofLTvhRCOv6aR1Q== 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=HenFJqcBZS4rsGF6rTqBP4Lbo5I+ydEZnfRd9OFg7eY=; b=9UFS8va0fp6xqOZIt+6UZMYqYY0ayB+F2lweGEsk4XbS93qVA5wuAFTmxmdIVCcgYcQmd1Z5cda1IrysSTZKU3NNXqEUbu2lVrifjKtvpVWrAlEtMgLpSMkj4m57w/BSMINEOoICNCZ8+IgWpqD8Gr/IX7fcLV71qpBj1N9wJMc= 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 AM6PR08MB4597.eurprd08.prod.outlook.com (2603:10a6:20b:90::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Tue, 11 May 2021 19:18:27 +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.4108.031; Tue, 11 May 2021 19:18:27 +0000 Subject: Re: [PATCH 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: <20210504152048.8739-1-etienne.carriere@linaro.org> <20210504152048.8739-6-etienne.carriere@linaro.org> From: "Sami Mujawar" Message-ID: Date: Tue, 11 May 2021 20:18:22 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 In-Reply-To: <20210504152048.8739-6-etienne.carriere@linaro.org> X-Originating-IP: [217.140.106.52] X-ClientProxiedBy: LO4P123CA0359.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18d::22) 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 LO4P123CA0359.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18d::22) 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, 11 May 2021 19:18:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5b514945-d38e-48b9-ee84-08d914b195ff X-MS-TrafficTypeDiagnostic: AM6PR08MB4597:|DB7PR08MB3803: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:10000;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: AF92kjK6NHAMOiTOxl0HVZzQzKkM4KRgwVaQXX9YchNTnmItjmgvCjAeCkc9M/6K+3aLtKgWvoWP5YPtGN8TpECcVfYuZeIu2arzYh+KShhOXbGQGNl6nvy/yeluFORJ429qJvcbMtc3YeCd1aPojHO/HtwLokV1HtogT4XYagYQvP2UpwgUb6YWiubYOg12QSc38XXyQ5U2NntwamrySfRIfVIN6t3hyr8IFzL00d/baXjP7jDGvnD98xGXzplf1FLm4rzkofF+Dqu1uZdFt0TbqP4zBBrYNz/P3WxgZxMj6t/vV/BUaWsQ+oTroktwDF8h0E/fYFssqtrR3PiQoWA4xQ08n0qkIyZ6gIk4JUE+ec5cz/Y+fAHlB9BLVpvNXFk7KNcks/Fp2H0aHqZUf8ZArjPuXLjNTj1JsuuGEZHGiuQe+IG078eicBYqCGdwoRey46647IM4mSaKGpQJBnPg+UU/UAKeNQjjEeXxw9ksaZwokwXlBzHPl+APkwH4DSKTFmDaUlpA+JcgevstYKq66Hmw5Z0gm/czbXHvOgs0F2KF5EzqI0XUFAeL2UGfq3zgPiD5LHJtFRmv4H72mxhwAU9osZ480a/jgPGeIFy9LjEYYW/EvYylNr22O9e8R5zTGCbzIwsX5yeTrZV+SKBWIDeVTo/57/0YYvohXqqDFqRpyYsBjxz0Pn/v29SszMSHPe5/pNkClPtAPc3Gyovdf0uS3U/qpbfijismvtQ= 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)(396003)(366004)(346002)(39840400004)(376002)(136003)(44832011)(4326008)(316002)(52116002)(16576012)(53546011)(5660300002)(2906002)(8936002)(66946007)(66476007)(6666004)(66556008)(6486002)(19627235002)(16526019)(38350700002)(38100700002)(478600001)(26005)(186003)(8676002)(54906003)(30864003)(36756003)(31686004)(31696002)(83380400001)(86362001)(2616005)(956004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?dkxyS2VPVEVGQmQxTGVTczc2MERqdG82TnpWRmsyK05ROWhjK3dPTTlxcWJr?= =?utf-8?B?aXhKU05MdlZBUkFtUWVWZm1aRXFCN0RTZUJSaCtYa1RSRFluZm5mbXBYTDRj?= =?utf-8?B?T1p0czhFOWV2NCtsSXFBTkJ3eWZtSDkzRnlJY2x6Z1NrbzNFVjdOMHV0bUFL?= =?utf-8?B?NmY4ZWEvYnRrZm05dFNISlliYnBGakZVMytEaEdPUGIxcGk4M1M1eEFUYXpr?= =?utf-8?B?Z3g4RjhQWXN5VEVudTlvdzNXY05aSkZYSFU1TFE1QkRHUnpFTDI2ck5ka3l4?= =?utf-8?B?S2tNUjZsck1hNEU5K2lKT0hqYjNVaHIyMWNubVJEeU5YQkdHN0lzSDNxOFdy?= =?utf-8?B?TENydHRlYTMyUlBLVnZQVG8rQS9GdHA4N2RjNTlTckhUVVZkRDdjV3RUYmc3?= =?utf-8?B?WmNtcEtzeFNLMEN5L21lYUxrbHFVMjNSd254YVk0YmNKYk1BdTIwRVh6bmFR?= =?utf-8?B?Q0Y3eE1sNGcrRFUxRENJYjhoZjA5VC9ab3RNdWZvdmVadEFIS2FwTWdKeW02?= =?utf-8?B?ZFBLdFNpUnVEdFNFYlhZMk9BQW9vQk1yVnBhU3FoUGxFOTRvMXVNUlZYVFpV?= =?utf-8?B?alhDOHhVQkloSlFobFVsWHQ1eG0yaDdGSy9WMXY5THdSZDVRVjN5ZXRoWmI0?= =?utf-8?B?bXlyNmpPcndnVGt4eEUzWXE5WG5Vd3lwV0NwVWxWK0pscUY4QzlUak5WMW1m?= =?utf-8?B?YVNCUUxaeXJ5N3hxNHRXam5IYVc4V3F1SzlSU3Z4Z1FLaVJ0dVNWbHRMTGRW?= =?utf-8?B?VzhueDRDY1JLcThTcHBkMzVETkZvdHRQUUFiaGUrU3dTbUJhMWliOEFrR2hZ?= =?utf-8?B?TlVyR1pCUG93NkZPTEZHcWdzc0sxM3RrSnhKZVk4N1lPSndsdzBtbUdQelFo?= =?utf-8?B?dzVMbFdzR3NCa21SZHByUEY3OUMrei9FalZQZGhmNEZwOWtQMk40YlFTUTNv?= =?utf-8?B?REI2b2d6b0QwOFdRNWFEd01WeWcwRWdTUDA3MC9ITWZoenUyQi93L0JxWVRH?= =?utf-8?B?VmZGWURUeEErVnFEU2JHVzVOclJpakdvRVVFdXNZMzFIakR3d3VBUkoyU0dO?= =?utf-8?B?OGNkRnBKOFF0ZnFTWEFUQTJLcWs4RnpkQlBkK251QTk5QWVIRGVuOVIvYk9C?= =?utf-8?B?RVVOOGU4NUtldURGcWppUGFpandsQWJFYzZUcVlkUzBDZjVyRU1xb0lpclJy?= =?utf-8?B?WmpGTjZEd2dUUk1IQkdxbkMzdklmV3E3SkkxTnRlWlB5RnFOQ2xmVnBaSDNm?= =?utf-8?B?SURZeTRUMXpkdmhPL1NnTTV2QXMvVmw1b2ZLODgvOFZlcnFPdUpLcjlTT2Vv?= =?utf-8?B?VHNiek1VLzNUNzFzSnF6RmpJZjlsdTExRGtwVlpkaWE5WS9tdzNzUDZNRFZX?= =?utf-8?B?bEdFTzBMaU1tQ3ZXWUtCQ05PZE1MNFZsQnRraEwvNlVIbEVVM1p6MGhKYk15?= =?utf-8?B?aTVocXNzQ09pMjJxeGNMNVQ3bDl3WFpzWDhtMnlqajBVSlNWR2RmQXI4M2I4?= =?utf-8?B?U2FWbmtWYjRHV0dNTytnaXdSdndkOWpFV1o2OEJ6M1dIcUFVVHZSU2w1UUll?= =?utf-8?B?VC9SQ2oyaDVrTEZXYnVWbktRRlZHOVVjRGI2YTVUclNoMmlEbi9NOGVjY2Zm?= =?utf-8?B?UG1GR2tGN3paaU1WL3NJWG1URUVRd0k4SEFYWkZYREkwek9peTJkR1NlR29B?= =?utf-8?B?VHB3elhpRS9rNHJEOUZsZ1BjRzllV2lDaFUzTHI3VUtoQnQxUXVqcVdTVGg3?= =?utf-8?Q?U+XynJJi2fV0N0WryX4xE3kxR2bhBaxMmjgBR8d?= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4597 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: AM5EUR03FT054.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: eff879be-4518-47ff-7460-08d914b18da6 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aR0iN0YzfGKajB5zyfhSwQFcVpctsYLkSMyu9hcSRHfoxa9ipHC6irvnt/JjpbuJ15GQc3boRtG52i7uNNPBeOFmxmOKQ4GKU4CkgZqcMAw/m7H/m4g7ePRu3CqdaCA18NeGxHzSiyIPdXAML+NEpL1CtuUUmHfmEEZc8UX0Xs/jc1z3jTjP7j8ZS1taPdheEW07zMlY7OxBFBTGIV4CVGF59brHWWGvWqIKW3ndhQHOhlJfOt1zBFzHxi+2QqbmsAnr1Hf9WRSwtoq7sMlTPxep9Jk7tYWfVQsqgsxQGqTDV03whCspBOsN4Vc0uizmkDAMsovI10dgb0qPl9SifX/eG/h/rAtCfbPLhq4HpOAo5d7Lwe5Pvnm0ZUN+SIZOPZ90kPC0/PYOi0lb1VKcsSPGkjBYcK/IlaeDe6ZDd+hqj+Mn/35A4g1zjBvBeGhhpmLKM7KhkFZU4RzoPWDb55GDhYBZAWR4rTN7klCN/WvJToadTDbV0O1DoyhpCnWyZUUzoLEXyXi3YSE3ZKnYCoJ2fiMzETlpyUj//rujM7iW6+V37Z4tRrMgvi4HH59wsKya1HWbCqmSdiu9VxJffpy3M/Vx8WrEBYaZlADnKuzk23Lc5tAObPrK9W6BLdDP+FsNbjZffg857OOrwr4tpLEnlFD2eIofip3iDp1/htj7VM3JsmPGBtsjWuVb6uEn 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)(39840400004)(136003)(376002)(396003)(346002)(36840700001)(46966006)(336012)(8936002)(8676002)(2906002)(54906003)(81166007)(356005)(47076005)(186003)(31686004)(82310400003)(6486002)(478600001)(70206006)(16526019)(70586007)(36756003)(44832011)(956004)(19627235002)(26005)(16576012)(316002)(30864003)(36860700001)(83380400001)(31696002)(6666004)(86362001)(5660300002)(4326008)(2616005)(53546011)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2021 19:18:40.7231 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5b514945-d38e-48b9-ee84-08d914b195ff 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: AM5EUR03FT054.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3803 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Hi Etienne, Thank you for this patch. I am getting build errors in VariableMmDependency.inf when building for ARM. Not sure if you are getting these or it is my development environment (I am building on a Windows Host PC). Can you let me know which AArch32 GCC compiler you are using, please? Apart from this, there are some minor comments that I have marked inline as [SAMI]. With those addressed. Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 04/05/2021 04:20 PM, 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 > --- > StandaloneMmPkg/Core/StandaloneMmCore.inf | 2 +- > StandaloneMmPkg/Drivers/StandaloneMmCpu/{AArch64 => }/EventHandle.c | 12 ++++++++++-- > 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 | 8 ++++---- > 17 files changed, 49 insertions(+), 34 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 92% > rename from StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c > rename to StandaloneMmPkg/Drivers/StandaloneMmCpu/EventHandle.c > index 63fbe26642..2d7fd81133 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 > > @@ -27,6 +28,13 @@ > > #include "StandaloneMmCpu.h" > > +#ifdef MDE_CPU_AARCH64 > +#define ARM_SMC_ID_MM_COMMUNICATE ARM_SMC_ID_MM_COMMUNICATE_AARCH64 > +#endif > +#ifdef MDE_CPU_ARM > +#define ARM_SMC_ID_MM_COMMUNICATE ARM_SMC_ID_MM_COMMUNICATE_AARCH32 > +#endif [SAMI] Should this definition be in ArmPkg\Include\IndustryStandard\ArmStdSmc.h? I can see Patch 2/5 uses the above define in ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c. [/SAMI] > + > EFI_STATUS > EFIAPI > MmFoundationEntryRegister ( > @@ -92,8 +100,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..e199e81bbd 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)); [SAMI] void * should be changed to VOID* [/SAMI] > > 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..01bfbe8cc5 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,7 +118,7 @@ > StandaloneMmPkg/Library/StandaloneMmMemoryAllocationLib/StandaloneMmMemoryAllocationLib.inf > StandaloneMmPkg/Library/VariableMmDependency/VariableMmDependency.inf > > -[Components.AARCH64] > +[Components.AARCH64, Components.ARM] > StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.inf [SAMI] I think this should be StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf. [/SAMI] > 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 > GCC:*_*_*_CC_FLAGS = -mstrict-align >