From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.107.5.57; helo=eur03-ve1-obe.outbound.protection.outlook.com; envelope-from=achin.gupta@arm.com; receiver=edk2-devel@lists.01.org Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50057.outbound.protection.outlook.com [40.107.5.57]) (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 4540B211D56BC for ; Wed, 6 Mar 2019 08:58:09 -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=cd5tqctNKL3lyWQ+nflpi28mG1m4Fos+nK/0o/dcy0M=; b=IRYSTcljQvnYZ8I9cApPiNUdiHL9b209yuLM7wR2bt7DF8+FneXU0JfPLC4jw2Ju95BQ4el7UGhFRZE10u25joA5WccMgvGM/jJWl6W4S/2en5F+AKH7naCg4+O6C752IqwMhgJ8gTVfokbxo4Fug6BQbcX04l2te06Exv75Rkk= Received: from AM0PR08MB2980.eurprd08.prod.outlook.com (52.134.92.153) by AM0PR08MB4481.eurprd08.prod.outlook.com (20.179.36.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.17; Wed, 6 Mar 2019 16:58:06 +0000 Received: from AM0PR08MB2980.eurprd08.prod.outlook.com ([fe80::a133:50fa:bbbe:81a6]) by AM0PR08MB2980.eurprd08.prod.outlook.com ([fe80::a133:50fa:bbbe:81a6%5]) with mapi id 15.20.1665.020; Wed, 6 Mar 2019 16:58:06 +0000 From: Achin Gupta To: Ard Biesheuvel CC: "edk2-devel@lists.01.org" , Supreeth Venkatesh , Jiewen Yao , Leif Lindholm , Jagadeesh Ujja , nd Thread-Topic: [PATCH 08/10] StandaloneMmPkg/Core: drop support for dispatching FVs into MM Thread-Index: AQHU01f3QOjR3zOIAUK515O9v7OY7qX+1NGA Date: Wed, 6 Mar 2019 16:58:06 +0000 Message-ID: <20190306165759.GU21602@mac-ubuntu-vm> References: <20190305133248.4828-1-ard.biesheuvel@linaro.org> <20190305133248.4828-9-ard.biesheuvel@linaro.org> In-Reply-To: <20190305133248.4828-9-ard.biesheuvel@linaro.org> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mutt/1.9.4 (2018-02-28) x-originating-ip: [95.146.138.15] x-clientproxiedby: LO2P265CA0463.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a2::19) 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-ms-office365-filtering-correlation-id: 6cab5004-ff6a-4ef1-690b-08d6a254e75c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR08MB4481; x-ms-traffictypediagnostic: AM0PR08MB4481: nodisclaimer: True x-microsoft-exchange-diagnostics: 1; AM0PR08MB4481; 20:achPTACL02CvY2wH9sZH5W62iF1XMDneWrh0iyJBocP11f2xPZEWu4b79VuVSEDMnyBdcjruZ8cT7ZkG5ZaoHSOlvzfhFsV3Vy8MKkIGawkj27IhrlJt85sgxDvI6bP2bu2LwIHLJHI7zAFGWwSXwEaPzgzxz/Fw9On5ibYfpfo= x-microsoft-antispam-prvs: x-forefront-prvs: 0968D37274 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6029001)(7916004)(366004)(39860400002)(396003)(346002)(136003)(376002)(199004)(189003)(256004)(478600001)(9686003)(486006)(2906002)(44832011)(53936002)(6512007)(476003)(11346002)(6916009)(81166006)(6506007)(72206003)(8936002)(7736002)(8676002)(81156014)(229853002)(52116002)(3846002)(6246003)(6116002)(102836004)(33656002)(25786009)(386003)(99286004)(4326008)(76176011)(66066001)(446003)(5660300002)(105586002)(58126008)(54906003)(316002)(68736007)(106356001)(1076003)(86362001)(14454004)(33716001)(305945005)(6436002)(71190400001)(71200400001)(186003)(97736004)(26005)(6486002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR08MB4481; H:AM0PR08MB2980.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: m+keRv1SWkPT+wrT35/1MCUmJ0sM+mB1XAeBgnlBThWvBMWIcDzy+0U0FGyMMea1PDyYK/nK4sOlLx1iOqk/xoTR6RcP/O/DsZTTOr2BF+keDYq0d+PiDqwUr3BeUWZ1Ct7KC8NdUwcSFzxRxKvA2Rit1rhjFprZVcTin/g5dO9b6R0tv6p6KacBX2QqE4IEBQbkR8r+hCt8R3QkW49Y4oOIxhg2ixJgwHoOby/Hda4IeqAJZgxJ7V3J170EBDso6fbo9ZAKAZe/umLbuqNqELtKtM57PwzMzZ4r8RS7BB6zf163duZTKgmfzOwdl/lTwpgmFtvEUMmY+z+Sse/Cy8S+BhKvu+y7n1r8KNa5VsqlVv4mDyTX0vsOIFXfq1eGs4mFzeiqYPuarcdZAQl1HY48y1cJCErJS44+dwgQdUI= MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6cab5004-ff6a-4ef1-690b-08d6a254e75c X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Mar 2019 16:58:06.4861 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4481 Subject: Re: [PATCH 08/10] StandaloneMmPkg/Core: drop support for dispatching FVs into MM 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: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 X-List-Received-Date: Wed, 06 Mar 2019 16:58:09 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable Reviewed-by: achin.gupta@arm.com On Tue, Mar 05, 2019 at 02:32:46PM +0100, Ard Biesheuvel wrote: > Remove the support that permits calls into the MM context to dispatch > firmware volumes that are not part of the initial standalone MM firmware > volume. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel > --- > StandaloneMmPkg/Core/StandaloneMmCore.h | 22 ---------- > StandaloneMmPkg/Core/Dispatcher.c | 46 -------------------- > StandaloneMmPkg/Core/StandaloneMmCore.c | 1 - > 3 files changed, 69 deletions(-) > > diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.h b/StandaloneMmPkg/Co= re/StandaloneMmCore.h > index 0d20bcaa6be5..74338dc9da0d 100644 > --- a/StandaloneMmPkg/Core/StandaloneMmCore.h > +++ b/StandaloneMmPkg/Core/StandaloneMmCore.h > @@ -635,28 +635,6 @@ MmDriverDispatchHandler ( > > @return Status Code > > -**/ > -EFI_STATUS > -EFIAPI > -MmFvDispatchHandler ( > - IN EFI_HANDLE DispatchHandle, > - IN CONST VOID *Context, OPTIONAL > - IN OUT VOID *CommBuffer, OPTIONAL > - IN OUT UINTN *CommBufferSize OPTIONAL > - ); > - > -/** > - This function is the main entry point for an MM handler dispatch > - or communicate-based callback. > - > - @param DispatchHandle The unique handle assigned to this handler by = MmiHandlerRegister(). > - @param Context Points to an optional handler context which wa= s specified when the handler was registered. > - @param CommBuffer A pointer to a collection of data in memory th= at will > - be conveyed from a non-MM environment into an = MM environment. > - @param CommBufferSize The size of the CommBuffer. > - > - @return Status Code > - > **/ > EFI_STATUS > EFIAPI > diff --git a/StandaloneMmPkg/Core/Dispatcher.c b/StandaloneMmPkg/Core/Dis= patcher.c > index bede4832cfb7..4b2f38f700a0 100644 > --- a/StandaloneMmPkg/Core/Dispatcher.c > +++ b/StandaloneMmPkg/Core/Dispatcher.c > @@ -883,52 +883,6 @@ MmAddToDriverList ( > return EFI_SUCCESS; > } > > -/** > - This function is the main entry point for an MM handler dispatch > - or communicate-based callback. > - > - @param DispatchHandle The unique handle assigned to this handler by = SmiHandlerRegister(). > - @param Context Points to an optional handler context which wa= s specified when the handler was registered. > - @param CommBuffer A pointer to a collection of data in memory th= at will > - be conveyed from a non-MM environment into an = MM environment. > - @param CommBufferSize The size of the CommBuffer. > - > - @return Status Code > - > -**/ > -EFI_STATUS > -EFIAPI > -MmFvDispatchHandler ( > - IN EFI_HANDLE DispatchHandle, > - IN CONST VOID *Context, OPTIONAL > - IN OUT VOID *CommBuffer, OPTIONAL > - IN OUT UINTN *CommBufferSize OPTIONAL > - ) > -{ > - EFI_STATUS Status; > - EFI_MM_COMMUNICATE_FV_DISPATCH_DATA *CommunicationFvDispatchData; > - EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader; > - > - DEBUG ((DEBUG_INFO, "MmFvDispatchHandler\n")); > - > - CommunicationFvDispatchData =3D CommBuffer; > - > - DEBUG ((DEBUG_INFO, " Dispatch - 0x%016lx - 0x%016lx\n", Communicatio= nFvDispatchData->Address, > - CommunicationFvDispatchData->Size)); > - > - FwVolHeader =3D (EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)CommunicationFvDi= spatchData->Address; > - > - MmCoreFfsFindMmDriver (FwVolHeader); > - > - // > - // Execute the MM Dispatcher on any newly discovered FVs and previousl= y > - // discovered MM drivers that have been discovered but not dispatched. > - // > - Status =3D MmDispatcher (); > - > - return Status; > -} > - > /** > Traverse the discovered list for any drivers that were discovered but = not loaded > because the dependency experessions evaluated to false. > diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.c b/StandaloneMmPkg/Co= re/StandaloneMmCore.c > index ec53b8d8bec4..766cdb5c848c 100644 > --- a/StandaloneMmPkg/Core/StandaloneMmCore.c > +++ b/StandaloneMmPkg/Core/StandaloneMmCore.c > @@ -99,7 +99,6 @@ BOOLEAN mInLegacyBoot =3D FALSE; > // Table of MMI Handlers that are registered by the MM Core when it is i= nitialized > // > MM_CORE_MMI_HANDLERS mMmCoreMmiHandlers[] =3D { > - { MmFvDispatchHandler, &gMmFvDispatchGuid, NULL, T= RUE }, > { MmReadyToLockHandler, &gEfiDxeMmReadyToLockProtocolGuid, NULL, T= RUE }, > { MmEndOfDxeHandler, &gEfiEndOfDxeEventGroupGuid, NULL, F= ALSE }, > { MmLegacyBootHandler, &gEfiEventLegacyBootGuid, NULL, F= ALSE }, > -- > 2.20.1 >