From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.107.3.75; helo=eur03-am5-obe.outbound.protection.outlook.com; envelope-from=achin.gupta@arm.com; receiver=edk2-devel@lists.01.org Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30075.outbound.protection.outlook.com [40.107.3.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id EE4BA2119071C for ; Sat, 1 Dec 2018 10:45:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=k/wNSXYzkGP4XPM0fet4iTRLQZUie2OEOKMTwCyg24k=; b=UjxF+JZq9nPbpPoxbhVKKmY7Dg3UCOYnggg0COnM8OkJ+jvgb1AjZorf5QW/LQ9pSPgFzollLIvisE5859+VnO5v6PfACoqWdUNKf6el0D34hJVkaa3Mi5ja3+U+C/68Ur9/v1yKuLO13iyDt4KKhjRNCqHn9g7kqCoiNK6OLMY= Received: from AM0PR08MB2980.eurprd08.prod.outlook.com (52.134.92.153) by AM0PR08MB3187.eurprd08.prod.outlook.com (52.134.93.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1382.18; Sat, 1 Dec 2018 18:45:47 +0000 Received: from AM0PR08MB2980.eurprd08.prod.outlook.com ([fe80::8908:b854:e03:a206]) by AM0PR08MB2980.eurprd08.prod.outlook.com ([fe80::8908:b854:e03:a206%4]) with mapi id 15.20.1382.020; Sat, 1 Dec 2018 18:45:47 +0000 From: Achin Gupta To: Sughosh Ganu CC: "edk2-devel@lists.01.org" , nd , "jiewen.yao@intel.com" Thread-Topic: [PATCH v2 0/2] StandaloneMM: Update permissions for Standalone MM drivers memory area Thread-Index: AQHUhhmsygXY/Z2Q0UC+ifQGwqy4+aVo/36AgABQeQCAAO/8AA== Date: Sat, 1 Dec 2018 18:45:47 +0000 Message-ID: <20181201184547.GT4897@e104320-lin> References: <1543299775-25345-1-git-send-email-sughosh.ganu@arm.com> <20181130233851.GS4897@e104320-lin> <20181201042652.GA29905@arm.com> In-Reply-To: <20181201042652.GA29905@arm.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mutt/1.5.21 (2010-09-15) x-originating-ip: [217.140.106.54] x-clientproxiedby: CWLP265CA0119.GBRP265.PROD.OUTLOOK.COM (2603:10a6:401:51::35) To AM0PR08MB2980.eurprd08.prod.outlook.com (2603:10a6:208:5b::25) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Achin.Gupta@arm.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM0PR08MB3187; 6:mvdxUpbNbzH7u8k6k3qj4XP5qhQvxvhZFurZyb+d4w0EWxbum8YGZvLlokxY+F34vuATvzQ3/yqIC/V58eXVA/bO9Z5sThB0BHTOs5Exi//UPcdP8iBeZA0yKad7nPGWb+IqPvihBpUAiXc3Oy4JK0e97wOG4Ew7OyqKTDhU+19xXtMgyZRbEDLYxXJDMa1yLmOoAEo8vtwVkpa5HUcwoJZiTx60a15d4oDR+bnF+qOnJJ1+kyi6I8EbJJhxC2PTAdmO0YtPPLaOoQKhPqIQmC4GUBW2NYHzteZrBQkm5PKdUY1uI80anVET+R/GMuam+8+llsZHRFFqdyXONOFfqhfHn1qEYCVGWkQsbZZv9XwrDF8PsREWqhXjQxKxPKOKjFwwoWSoC7WFshsKXwrul0t5u/AcbSh+8V0iVTHCQaIaMCuYZACV77ZvkpZWSNGH9IHoK3x/opqA1NB4VvcXYg==; 5:90dKXnblUFXeyejWbyGQ8iHYJ2hQ1BZBd+zvhFr5Y2a7i5dVginhZmuSMemS4SUgc8gynHFpWpUV1LkBDs1oR3HbCrp4jee1K5rXs8hqvoqXhbRMWtjLcXAH085CXCVePFRFb2NCSrdefn+pOuVqGuEDsiKTrpzjz6ZOkLoughk=; 7:EGR2QkIFHNHaZMhtNFYgXC9c5eI0ChH2VEBywy6dugPZmkKYRapmJlJr+jl5yW4N8sORZmFKM+H2PMdsJ9HkCCXLURSnISnKsSXEjACjXR1jsGAWy2mX9xXa4AwN5pMMxtha50EcPMFxSb5C0ZI+IA== x-ms-office365-filtering-correlation-id: cfd15da2-86ca-46df-a1d5-08d657bd3514 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:AM0PR08MB3187; x-ms-traffictypediagnostic: AM0PR08MB3187: nodisclaimer: True x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231455)(999002)(944501410)(52105112)(10201501046)(93006095)(93001095)(3002001)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:AM0PR08MB3187; BCL:0; PCL:0; RULEID:; SRVR:AM0PR08MB3187; x-forefront-prvs: 087396016C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(7916004)(39860400002)(396003)(366004)(346002)(136003)(376002)(189003)(199004)(229853002)(33656002)(966005)(6436002)(476003)(6636002)(6116002)(14444005)(186003)(44832011)(6506007)(386003)(26005)(15650500001)(1076002)(3846002)(106356001)(68736007)(76176011)(54906003)(25786009)(52116002)(33896004)(316002)(19627235002)(256004)(486006)(446003)(72206003)(102836004)(58126008)(478600001)(53936002)(4326008)(14454004)(6246003)(6862004)(305945005)(5660300001)(7736002)(11346002)(99286004)(86362001)(66066001)(9686003)(6306002)(97736004)(6512007)(105586002)(2906002)(6486002)(81156014)(8936002)(71200400001)(71190400001)(8676002)(81166006)(33716001)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR08MB3187; H:AM0PR08MB2980.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: ZoNjbRbkwM3Q3QyiGSIu13fRkVK+VO5saIta8fQRKi4JqYSHI14BMeBonhwn5w0a9QldT1QqrG2C8C0/w7RcYhjhBB1TRojIigaR2nmRDWOYa6+C0efCayihtEGzoaJONvanvgYr61JScqVBtuSAD8uESFrsEg/3lnIBIkYZGIfp1WiH1Ngc1TxHW+uFw7N70KlUV/hBsE1xp753vqAF1bb2G3Vl6bxwVr2EpIj5wnjuS+gXOgPr6sEkbfPs3GOzBNckMzQOKJWi9dSIp7vJOVX8nw6OO5ZDJVYEP02lqxfRs8UT9dQfMDc571WWDOwH7U+WX8S114C3m9uKeUIjYxZzAiIb8uX7W+9k4FD7/E0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: cfd15da2-86ca-46df-a1d5-08d657bd3514 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Dec 2018 18:45:47.3816 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3187 Subject: Re: [PATCH v2 0/2] StandaloneMM: Update permissions for Standalone MM drivers memory area X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Dec 2018 18:45:51 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-ID: <91705D2E21FAB445AC0E47DB5B8001DB@eurprd08.prod.outlook.com> Content-Transfer-Encoding: quoted-printable Hi Sughosh, On Sat, Dec 01, 2018 at 09:56:52AM +0530, Sughosh Ganu wrote: > hi Achin, >=20 > On Sat Dec 01, 2018 at 05:08:50AM +0530, Achin Gupta wrote: > > Hi Sughosh, > >=20 > > +Jiewen > >=20 > > I took the patches for a spin and it looks like the FVP port is broken.= Some > > reasons are: > >=20 > > 1. The build breaks due to a reference to ArmMmuLib in StandaloneMmPkg.= dsc > > 2. There is a broken dependency on PL011UartClockLib in StandaloneMmPkg= .dsc > > 3. GCC flags to enforce strict alignment and no fp are required in > > StandaloneMmPkg.dsc to avoid a runtime fault > > 4. There is a data structre in StandaloneMmCoreEntryPoint.c that needs = to be > > memzeroed due to the alignment checks > >=20 > > Even after these fixes, I am unable to boot the MM SP. The SP boots wit= h the > > previous revision of your patches and the above fixes. Something has br= oken > > between the two. I am suspecting the MMU library for S-EL0. >=20 > I had tested the patches which i had sent out for ArmPkg changes with > the error handling and error reporting feature on sgi575 before > posting the patches. In addition to the changes that you mention, i > was required to make a couple of more changes in the StandadloneMm > description file. >=20 > 1) StandaloneMmMmuLib|ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneM= mLib.inf >=20 > This was changed from ArmMmuLib which was used earlier. yes! this was the change i was referring to in 1. >=20 > 2) PeCoffExtraActionLib|StandaloneMmPkg/Library/StandaloneMmPeCoffExtraAc= tionLib/StandaloneMmPeCoffExtraActionLib.inf >=20 > I had changed this to reflect the change made in the patch > StandaloneMM: Update permissions for Standalone MM drivers memory area Doh! of course it does not work without this change. Thanks! Could you roll= it in your patchstack? >=20 > Can you please confirm that you tested with these two additional > changes made. Meanwhile, I will incorporate your review comments which > you make below. Thanks. I was able to initialise the SP on the FVP and the MM communication driver initialised correctly. I did not test the MM SP further. I have pushed my changes on top of your patches here [1]. Could you please check they work f= or you as well and include the relevant changes in the next rev of your patchs= tack? cheers, Achin [1] https://github.com/achingupta/edk2/commits/ag/stmm_perm_v2 >=20 > -sughosh >=20 > >=20 > > Lets sort this out first. Apart from this, could you move this library = into > > an AArch64 directory as is the case for other Arm specific libraries > > e.g. StandaloneMmCoreEntryPoint/AArch64 > >=20 > > cheers, > > Achin > >=20 > > On Tue, Nov 27, 2018 at 11:52:53AM +0530, Sughosh Ganu wrote: > > > Changes since v1: > > > A new patch has been added to reflect the library class added for > > > changing the MMU attributes in StandaloneMM image, based on review > > > comments from Ard Biesheuvel. > > >=20 > > >=20 > > > These patches needs to be applied on top of the following patch serie= s > > > - "ArmPkg related changes for StandaloneMM package". > > >=20 > > >=20 > > > Sughosh Ganu (2): > > > StandaloneMM: Include the newly added library class for MMU functio= ns > > > StandaloneMM: Update permissions for Standalone MM drivers memory a= rea > > >=20 > > > .../StandaloneMmCoreEntryPoint.inf | 2 +- > > > .../StandaloneMmPeCoffExtraActionLib.inf | 18 +- > > > .../StandaloneMmPeCoffExtraActionLib.c | 222 +++++++++++= ++++++++++ > > > 3 files changed, 234 insertions(+), 8 deletions(-) > > > copy ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.= inf =3D> StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/Standalon= eMmPeCoffExtraActionLib.inf (72%) > > > create mode 100644 StandaloneMmPkg/Library/StandaloneMmPeCoffExtraAc= tionLib/StandaloneMmPeCoffExtraActionLib.c > > >=20 > > > --=20 > > > 2.7.4 > > >=20 >=20 > --=20 > -sughosh