From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0723.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe40::723]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 037AF1A1E25 for ; Fri, 30 Sep 2016 09:51:25 -0700 (PDT) Received: from AT5PR84MB0291.NAMPRD84.PROD.OUTLOOK.COM (10.162.138.25) by AT5PR84MB0292.NAMPRD84.PROD.OUTLOOK.COM (10.162.138.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5; Fri, 30 Sep 2016 16:51:23 +0000 Received: from AT5PR84MB0291.NAMPRD84.PROD.OUTLOOK.COM ([10.162.138.25]) by AT5PR84MB0291.NAMPRD84.PROD.OUTLOOK.COM ([10.162.138.25]) with mapi id 15.01.0639.015; Fri, 30 Sep 2016 16:51:23 +0000 From: "Cohen, Eugene" To: Tim Lewis , Laszlo Ersek , "edk2-devel@lists.01.org" , "Kinney, Michael D" , "Yao, Jiewen" , "Andrew Fish (afish@apple.com)" Thread-Topic: [edk2] RFC: ProtocolLib for cross DXE and SMM Protocol and Handle Services Thread-Index: AdIbIt8zDF4zYVg0Qm6BbTDEpt2HcgAA5RyAAARYvtAAAGYAgAAAHmIQ Date: Fri, 30 Sep 2016 16:51:23 +0000 Message-ID: References: <9877647c-b348-2a36-9ac0-b520a82260d1@redhat.com> <7236196A5DF6C040855A6D96F556A53F3F23AA@msmail.insydesw.com.tw> In-Reply-To: <7236196A5DF6C040855A6D96F556A53F3F23AA@msmail.insydesw.com.tw> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=eugene@hp.com; x-originating-ip: [15.65.252.13] x-ms-office365-filtering-correlation-id: 0fbb2478-517e-4bf5-dd25-08d3e95202e5 x-microsoft-exchange-diagnostics: 1; AT5PR84MB0292; 6:9Gv+Qf234ARmGaDgWtdZXLa6A5V9yssSDHAUYp4IT7yDYW6NSSyZEeXK1iyepN+k6f5SuMoPf9t6tnb3Q/0mGl6KVS1QCR4jUOPVzUie+mcqDbP8HtsxqbPXJSaESQyRynLsuOqanF52JOj1Mp8vYphfUk2USUxca1PsQiM/Ochq2PUTYwIqDByJwxUNLXsezK8Dzw0dyyWjbbGqGrqR91Rz5EMf4s2RPwhc9z2z4/9rBkfFY7yqvVBoaMwTw6qUtDSvF8BuV/oDdMNqv0dRPv/uhlKhTxxNqBZWtNpKFZI=; 5:tPsVtjTIaCL7ZwL3AXQ4a/ffeKUE01DLhXHcTY6zaPTh5l1Ko1TPgh4/sJBqFGzE6Z+LnIK+XcgiH3NJl4XIwlpKRBcBwTDPofdV7qJXEz+/kFVNhMp4jftdcQfKVd9E4RmUBbxRmiRo7JN4+5ImEw==; 24:c8EN5nyw23TG43woupwqVmvZUR7M5xV3ES2BINvVSzt6YPdjEQpTQnSz9tXO5Wrwqo079vuCor6U6yMMWFQ980HWV4ynKEbATCCk9VrcxzI=; 7:NRLXzRZyYTXha3Ed6rTWfT91OcpOvf5V1We7XtZuLQF/fBHDyU6QGv3g4KIadAAVv061Od7ay0uqqctjnY5kOIkR4DsU6WIp1wBSf1swAOmcUre6mHqOFnO3YdmYvL2P8M2BMWnFop+WGUERi8nzplqK1eekk5Ir7SlGYA4UkGEkMak65mWjjXADaoC8ULcRnPwugs2e0D7XAOzLUzCnOgAtfBbPlCvU6gRvSRiAK7xf1D64BcXe8d+lnruM1gcwZwzVSEBNKnjrZjRpVhxT0lyDeBu+Rp1QDFkokREPCEHx3AkEaZwt0ZnoMOT2qclZ x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AT5PR84MB0292; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(162533806227266)(31960201722614)(228905959029699)(73583498263828); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:AT5PR84MB0292; BCL:0; PCL:0; RULEID:; SRVR:AT5PR84MB0292; x-forefront-prvs: 008184426E x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(189002)(13464003)(377454003)(6602003)(199003)(87936001)(68736007)(2900100001)(3846002)(5001770100001)(92566002)(5660300001)(86362001)(97736004)(11100500001)(2906002)(101416001)(7696004)(19580405001)(15975445007)(107886002)(3280700002)(74316002)(19580395003)(77096005)(3660700001)(8936002)(189998001)(9686002)(93886004)(7736002)(10400500002)(7846002)(305945005)(66066001)(33656002)(586003)(8666005)(6116002)(102836003)(5002640100001)(8676002)(81156014)(81166006)(2950100002)(105586002)(106356001)(76176999)(50986999)(54356999)(99286002)(122556002)(7059030)(491001); DIR:OUT; SFP:1102; SCL:1; SRVR:AT5PR84MB0292; H:AT5PR84MB0291.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: hp.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Sep 2016 16:51:23.4150 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: ca7981a2-785a-463d-b82a-3db87dfc3ce6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR84MB0292 Subject: Re: RFC: ProtocolLib for cross DXE and SMM Protocol and Handle Services X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 16:51:25 -0000 Content-Language: en-US Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Tim, My focus at the moment is on standalone SMM drivers, but in order to suppor= t the dual-mode DXE_SMM_DRIVER modules we could have another instance that = does the InSmm check at runtime. Eugene > -----Original Message----- > From: Tim Lewis [mailto:tim.lewis@insyde.com] > Sent: Friday, September 30, 2016 10:41 AM > To: Cohen, Eugene ; Laszlo Ersek > ; edk2-devel@lists.01.org devel@ml01.01.org>; Kinney, Michael D > ; Yao, Jiewen ; > Andrew Fish (afish@apple.com) > Subject: RE: [edk2] RFC: ProtocolLib for cross DXE and SMM Protocol > and Handle Services >=20 > Eugene -- >=20 > Since SMM drivers today are actually DXE drivers during the > initialization phase, are you going to (a) have your library check > InSmm? or (b) only work with pure SMM stand-alone drivers? >=20 > Thanks, >=20 > Tim >=20 > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf > Of Cohen, Eugene > Sent: Friday, September 30, 2016 9:37 AM > To: Laszlo Ersek ; edk2-devel@lists.01.org > ; Kinney, Michael D > ; Yao, Jiewen ; > Andrew Fish (afish@apple.com) > Subject: Re: [edk2] RFC: ProtocolLib for cross DXE and SMM Protocol > and Handle Services >=20 > Laszlo, >=20 > > As far as I know: > > - the DXE and SMM protocol databases are distinct, > > - the same protocol GUID may or may not be installed (on one or > more) > > handle(s) in either, > > - even if a protocol GUID exists uniquely in exactly one of those > > databases, the locator function would have to return which database > > the GUID was found. > > > > My point is that every wrapper function that returns a protocol > > interface (or several protocol interfaces), or handles, each such > > return value will likely have to be qualified with the database where > it was found. >=20 > The intent here is to only search the UEFI DB from a DXE/UEFI driver > and the SMM DB from an SMM driver and not to cross between. So > which protocol DB is searched is purely a function of the module type > (i.e. what instance of the ProtocolLib it was linked against). This is > analogous to what is done with MemoryAllocationLib which either > allocates from the UEFI memory pools for UEFI/DXE modules > (UefiMemoryAllocationLib instance) or from the SMM memory pools > for SMM modules (SmmMemoryAllocationLib). >=20 > Sorry I wasn't more clear initially. >=20 > Eugene > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel