From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.92.70.53; helo=eur03-am5-obe.outbound.protection.outlook.com; envelope-from=marvin.haeuser@outlook.com; receiver=edk2-devel@lists.01.org Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-oln040092070053.outbound.protection.outlook.com [40.92.70.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D2105210C0F50 for ; Mon, 23 Jul 2018 05:49:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6HYDxACuiMrLrwyydhLLF1KT0tpQtXi7UVXWnKHVEu8=; b=kZYcg4rgPsrL58cStGtMhp+xNhX8qe5vUA0BH78P/oSR16NgC63XGSH1T68tAtwO7ryA4ZTLiELlQ9fysyqtUQCn4O1weH30ckyDUOPntsodOLRSWNMkIvIB/3ud4DGrbm7QtuRxPItr3KntZlJEUZen4dTcQ4khb0qjk/2HTxZ3othTgOwYSyYWntPBfbXMkRz6ZC7jysoNn6hDM/zGkztoP5oKTCEki2w4ltE1m4b4rDnAOviVg/tXqVrqt8ftjG0u+HeP310H4Q/aSEKfVUSDXG9gycPRfV5MRJdBM8V7eRKcAoasl+WZfuyeP5xrkuC79lOUEPhahXPpB1xrMQ== Received: from VE1EUR03FT024.eop-EUR03.prod.protection.outlook.com (10.152.18.56) by VE1EUR03HT097.eop-EUR03.prod.protection.outlook.com (10.152.19.239) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.995.12; Mon, 23 Jul 2018 12:48:58 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com (10.152.18.57) by VE1EUR03FT024.mail.protection.outlook.com (10.152.18.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.995.12 via Frontend Transport; Mon, 23 Jul 2018 12:48:58 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::7532:4dc6:e9f7:4765]) by VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::7532:4dc6:e9f7:4765%2]) with mapi id 15.20.0973.022; Mon, 23 Jul 2018 12:48:58 +0000 From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "edk2-devel@lists.01.org" CC: "jiewen.yao@intel.com" , "supreeth.venkatesh@arm.com" , "achin.gupta@arm.com" Thread-Topic: [PATCH 4/4] StandaloneMmPkg: Import StandaloneMmServicesTableLib library. Thread-Index: AQHUIUKlV/k7ZY0unU+tV24cipF2VaScw9RA Date: Mon, 23 Jul 2018 12:48:57 +0000 Message-ID: References: <5f41891c14511148a07d6b05c3f9ff7547aa8200.1532212228.git.Marvin.Haeuser@outlook.com> In-Reply-To: Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:701FD9321A7DEC80BEBE6DCD08F582271582F07933789D6675CAC15F0D2C89CB; UpperCasedChecksum:37E6F87650525170714859B8C95D87B6DEF428778F59FAD93EFD839FEFE766CC; SizeAsReceived:7559; Count:47 x-tmn: [qCuJKSKj49/RTwZFrtX71td2HRcSqqLA] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VE1EUR03HT097; 6:c/UJlIJOgMi0Kn/10v9ecGJkpntl1A0O99BoRkXX9XLZAYhM1m3t8+MNlGqNt5mX0IFanxd69eEJmdOQFVjMbH6yQbn1nRBmT28CAd4/6UlIglJ7rEtTG3cEnVN9rdf9xfKNAUD0KMkKyTG/6rao+JXYiOFR30QKsFbI5MzKnAvxHvMom6IpV43UwUTCDX3qiHXGYn8vUKW+ZYmkeHMzIAJPoZL89qwM0ZBepCDHJKEQv8+SDM27pfEAQ8WBiOERbMQMMDS0SR5xfPaUa8Wx+TwnZiwlU8pebfNW97yXX59jYRFNrfWAIlQAgw/AjaKTwefWVMgSZfHXRISKcm2Ezpx2cD1s0zVVcTE0IytvXRsjre4GKg/2G+AQWwpqrL8Lsqie3iSxtmss2Vf/jUtMOjtbFcl+VufjfTuZymRPXFnJfH6b7jvFQgt0OO9dByE2GuuibWyJ4B67+MkO1CO5Bw==; 5:19FhnYAEbGBb++JFWHYYnDuIC53pcWpXW/v2qf0GcQFHV8iR6JJlOAry9GetEFPP67v0pfhmOl8NcBeYjAFPLjM9Mk1bR+2wDNVcNfy8F9atMdc2cvI4agtpIX8KhUV0oH/JQ14NRPJ+4OtbB6TACwkrYwQgYTdGQacrDQQ9VUw=; 7:y89MasWYHKkIDwyFhkYzxpXdNgQCPeV8K8yeWFykD2VA2k/+mgbLXh8RbTSCrO4cZgLdM36DXyxNua6sRQvXoWehwU4AlYMBu3b2/385GB1Wp/FvKg8CDRMcmaUNMZBXarzWeLiOmz4GAwPOAGPUgO/InQxbn+5m78pkSZ3KwB87wfX8+j/ukoLeOX/Kf7Kk0Ddx3hvD6vsSF7zeakgrPvlzxa2BOmkA8aMsUCdyEUVAOHTF/xapykNK3Q18d1+Q x-incomingheadercount: 47 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1601125500)(1603101448)(1701031045); SRVR:VE1EUR03HT097; x-ms-traffictypediagnostic: VE1EUR03HT097: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(82015058); SRVR:VE1EUR03HT097; BCL:0; PCL:0; RULEID:; SRVR:VE1EUR03HT097; x-forefront-prvs: 0742443479 x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(6029001)(13464003)(189003)(199004)(72206003)(6436002)(966005)(1720100001)(5660300001)(53376002)(5640700003)(6246003)(33656002)(486006)(6916009)(229853002)(476003)(102836004)(55016002)(104016004)(87572001)(54906003)(14454004)(76176011)(20460500001)(11346002)(82202002)(446003)(53546011)(305945005)(6306002)(74316002)(7696005)(2900100001)(25786009)(4326008)(106356001)(81156014)(426003)(2501003)(8676002)(5250100002)(105586002)(56003)(2351001)(68736007)(256004)(86362001)(97736004)(99286004)(6346003)(8936002)(14444005)(26005); DIR:OUT; SFP:1901; SCL:1; SRVR:VE1EUR03HT097; H:VI1PR0801MB1790.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: outlook.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Marvin.Haeuser@outlook.com; x-microsoft-antispam-message-info: qll8RSEKtH8R5LEsA9Z7hFbsAwOGSoePEejvyG/zTtb20uOEDhWNukqS2Th4Iy7YlM/0u9RjF84SV0PyYvWZj8Ijan1+m598mpzEDlY9eetRkGrOAevYpysc0zqwcmaLBfrAr7JlslwxvVcCwkE+7xG/eSKcyhwSw9a9RD4rCBg1IPSEUM9+lBQwrCvJ39EqIGFUCqVOEywGsmPiSrhxNn+CDyGGPy21D2GFCk5npJA= MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-Network-Message-Id: 97295bb8-30ee-4d66-d21f-08d5f09aa833 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jul 2018 12:48:57.9450 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR03HT097 Subject: Re: [PATCH 4/4] StandaloneMmPkg: Import StandaloneMmServicesTableLib library. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2018 12:49:03 -0000 Content-Language: de-DE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Comment inline. Thanks, Marvin > -----Original Message----- > From: edk2-devel On Behalf Of Marvin > H=E4user > Sent: Sunday, July 22, 2018 12:32 AM > To: edk2-devel@lists.01.org > Cc: ruiyu.ni@intel.com; eric.dong@intel.com; liming.gao@intel.com; > jiewen.yao@intel.com; michael.d.kinney@intel.com; star.zeng@intel.com > Subject: [edk2] [PATCH 4/4] StandaloneMmPkg: Import > StandaloneMmServicesTableLib library. >=20 > Implements the MmServicesTableLib library class for MM Stanalone > modules. The code was derieved from SmmServicesTableLib. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marvin Haeuser > --- >=20 > StandaloneMmPkg/Library/StandaloneMmServicesTableLib/StandaloneMmS > ervicesTableLib.c | 64 ++++++++++++++++++++ >=20 > StandaloneMmPkg/Library/StandaloneMmServicesTableLib/StandaloneMmS > ervicesTableLib.inf | 35 +++++++++++ > StandaloneMmPkg/Library/StandaloneMmServicesTableLib/StandaloneMmS > ervicesTableLib.uni | 21 +++++++ > 3 files changed, 120 insertions(+) >=20 > diff --git > a/StandaloneMmPkg/Library/StandaloneMmServicesTableLib/StandaloneM > mServicesTableLib.c > b/StandaloneMmPkg/Library/StandaloneMmServicesTableLib/StandaloneM > mServicesTableLib.c > new file mode 100644 > index 000000000000..d33ff953b555 > --- /dev/null > +++ > b/StandaloneMmPkg/Library/StandaloneMmServicesTableLib/StandaloneM > mS > +++ ervicesTableLib.c > @@ -0,0 +1,64 @@ > +/** @file > + Standalone MM Services Table Library. > + > + Copyright (c) 2010 - 2018, Intel Corporation. All rights > + reserved.
This program and the accompanying materials are > + licensed and made available under the terms and conditions of the BSD > + License which accompanies this distribution. The full text of the > + license may be found at http://opensource.org/licenses/bsd-license.php= . > + > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" > BASIS, > + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER > EXPRESS OR IMPLIED. > + > +**/ > + > +#include > +#include #include > + > +EFI_MM_SYSTEM_TABLE *gMmst =3D NULL; > + > +/** > + The constructor function caches the pointer of MM Services Table. > + > + @param ImageHandle The firmware allocated handle for the EFI image= . > + @param MmSystemTable A pointer to the MM System Table. > + > + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. > + > +**/ > +EFI_STATUS > +EFIAPI > +StandaloneMmServicesTableLibConstructor ( > + IN EFI_HANDLE ImageHandle, > + IN EFI_MM_SYSTEM_TABLE *MmSystemTable > + ) > +{ > + gMmst =3D MmSystemTable; > + ASSERT (gMmst !=3D NULL); > + > + return EFI_SUCCESS; > +} > + > +/** > + This function allows the caller to determine if the driver is > +executing in > + Management Mode(MM). > + > + This function returns TRUE if the driver is executing in MM and FALSE > + if the driver is not executing in MM. > + > + @retval TRUE The driver is executing in Management Mode (MM). > + @retval FALSE The driver is not executing in Management Mode (MM). > + > +**/ > +BOOLEAN > +EFIAPI > +InMm ( > + VOID > + ) > +{ > + // > + // We are already in MM > + // > + return TRUE; > +} > diff --git > a/StandaloneMmPkg/Library/StandaloneMmServicesTableLib/StandaloneM > mServicesTableLib.inf > b/StandaloneMmPkg/Library/StandaloneMmServicesTableLib/StandaloneM > mServicesTableLib.inf > new file mode 100644 > index 000000000000..bfe5678a5bc0 > --- /dev/null > +++ > b/StandaloneMmPkg/Library/StandaloneMmServicesTableLib/StandaloneM > mS > +++ ervicesTableLib.inf > @@ -0,0 +1,35 @@ > +## @file > +# Standalone MM Services Table Library. > +# > +# Copyright (c) 2009 - 2014, Intel Corporation. All rights > +reserved.
# # This program and the accompanying materials # are > +licensed and made available under the terms and conditions of the BSD > +License # which accompanies this distribution. The full text of the > +license may be found at # http://opensource.org/licenses/bsd-license.ph= p. > +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" > +BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, > EITHER EXPRESS OR IMPLIED. > +# > +# > +## > + > +[Defines] > + INF_VERSION =3D 0x00010005 > + BASE_NAME =3D StandaloneMmServicesTableLib > + MODULE_UNI_FILE =3D StandaloneMmServicesTableLib.uni > + FILE_GUID =3D 821F6D8E-CE99-4CD5-B1FD-C33AC8BA570= 4 > + MODULE_TYPE =3D MM_STANDALONE > + VERSION_STRING =3D 1.0 > + LIBRARY_CLASS =3D MmServicesTableLib|MM_STANDALONE > + PI_SPECIFICATION_VERSION =3D 0x0001000A I just noticed I forgot to stage the update of this value to 0x00010032 whe= n committing. I can send a V2 once the other patches have been commented on / reviewed. > + CONSTRUCTOR =3D StandaloneMmServicesTableLibConstru= ctor > + > +[Sources] > + StandaloneMmServicesTableLib.c > + > +[Packages] > + MdePkg/MdePkg.dec > + StandaloneMmPkg/StandaloneMmPkg.dec > + > +[LibraryClasses] > + DebugLib > diff --git > a/StandaloneMmPkg/Library/StandaloneMmServicesTableLib/StandaloneM > mServicesTableLib.uni > b/StandaloneMmPkg/Library/StandaloneMmServicesTableLib/StandaloneM > mServicesTableLib.uni > new file mode 100644 > index 000000000000..c0581e2820ce > --- /dev/null > +++ > b/StandaloneMmPkg/Library/StandaloneMmServicesTableLib/StandaloneM > mS > +++ ervicesTableLib.uni > @@ -0,0 +1,21 @@ > +// /** @file > +// Standalone MM Services Table Library. > +// > +// Standalone MM Services Table Library. > +// > +// Copyright (c) 2009 - 2014, Intel Corporation. All rights > +reserved.
// // This program and the accompanying materials // are > +licensed and made available under the terms and conditions of the BSD > +License // which accompanies this distribution. The full text of the > +license may be found at // http://opensource.org/licenses/bsd- > license.php. > +// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" > +BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, > EITHER EXPRESS OR IMPLIED. > +// > +// **/ > + > + > +#string STR_MODULE_ABSTRACT #language en-US "Standalone MM > Services Table Library" > + > +#string STR_MODULE_DESCRIPTION #language en-US "Standalone MM > Services Table Library." > + > -- > 2.18.0.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel