From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0709.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe41::709]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id EF38A1A1E25 for ; Fri, 30 Sep 2016 10:02:34 -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 17:02:32 +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 17:02:33 +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: AdIbIt8zDF4zYVg0Qm6BbTDEpt2HcgAA5RyAAARYvtAAAGYAgAAAHmIQAABlC4AAACil4A== Date: Fri, 30 Sep 2016 17:02:33 +0000 Message-ID: References: <9877647c-b348-2a36-9ac0-b520a82260d1@redhat.com> <7236196A5DF6C040855A6D96F556A53F3F23AA@msmail.insydesw.com.tw> <7236196A5DF6C040855A6D96F556A53F3F2407@msmail.insydesw.com.tw> In-Reply-To: <7236196A5DF6C040855A6D96F556A53F3F2407@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: 3aa0d6bb-bfe7-4a61-8970-08d3e9539222 x-microsoft-exchange-diagnostics: 1; AT5PR84MB0292; 6:bs/9d997qwyVNK4ODlpq4wnWbeTbekH1OIuklVYjOp6+4G6rni2wVz5FsfILsKoypB6ewd7C/dtMBL21damFI2E3HqcnnmCOhzHD8ixRL573hvjn9OeyctqMFtwBzt7wNqth+CGuD5XecSQNAfhpFFfI7GEXWf+N/BKRj/7OxCAnB3OKoGSqXctf8b14d1FV5zAM8bMtObQa6MAkL8BAfOmAuP6owSkDRT9QLBzYA2NnGVygAPT6mA5oEjnJB6XWdJTqlDdCP7I+Vg/SBgIIy5FhkRqGWrqLws+JSlZvgAc=; 5:VeCij84r+SZ/+bgeNIl6IZTjRGob3ROuDu2fbi3rmXNPcgWtVbdxGbVAVC+A2R2Zxiq64L2Zh6GENUOmbToc9ImzLtIRMtqLXUMSrFxCpeXIzc7kVaWoAtHk6uaeZY8LczFU6oQEoZrLeAFMkzm5vA==; 24:UT/DqvDnbmi2E4Rd8oMV19wWmwZgQcaDBMH0XtLFWwnNlZhaCb+MNod5n8w92thctzoXvitl6c6H685D4t6NEm5CZzIPpYsc/Bd0dyHkGWU=; 7:TUVB6uQEKDsYyv1CLQ68u5WZVzWE1v4tHM6S8plcAi0oi82wSRfC0Zln+z83aMMmW0NospYNB3q3w9zikFkI0J9tSBN6c+klb28m8qD6h8wr9qerqnazCY4atH5703E/XZWoWngGq/xj/PqaH98iMCdS2QiHzHce2LUqGt7M5icSCXtETUvn2GAm6FhZi0A4ChK5ygIV4JSnmObpSo5GaJtUaYiHkXCW5RCx/zfuDSgionRUdGRnp9BydbXNVl9ret+KefpGRT6rJ2+uIG9Vqrfef5ZRL5QMVB6OZDgEu+pAy7heFU4tYEgjt6Gckb8F 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)(5005006)(8121501046)(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)(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 17:02:33.1815 (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 17:02:35 -0000 Content-Language: en-US Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Tim, Agreed - When BaseTools gets the standalone support I expect us to be able = to differentiate library instances. I wanted to gather feedback now while we prototype on a branch. Eugene > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf > Of Tim Lewis > Sent: Friday, September 30, 2016 10:56 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 the standalone file type isn't yet in the EDK2 code, the build > system will not be able to make this distinction in the library's INF fil= e. >=20 > Tim >=20 >=20 > -----Original Message----- > From: Cohen, Eugene [mailto:eugene@hp.com] > Sent: Friday, September 30, 2016 9:51 AM > To: Tim Lewis ; 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 > Tim, >=20 > My focus at the moment is on standalone SMM drivers, but in order to > support the dual-mode DXE_SMM_DRIVER modules we could have > another instance that does the InSmm check at runtime. >=20 > Eugene >=20 > > -----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 ; Kinney, > Michael D > > ; Yao, Jiewen > ; > > Andrew Fish (afish@apple.com) > > Subject: RE: [edk2] RFC: ProtocolLib for cross DXE and SMM Protocol > > and Handle Services > > > > Eugene -- > > > > 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? > > > > Thanks, > > > > Tim > > > > -----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 > > > > Laszlo, > > > > > 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. > > > > 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). > > > > Sorry I wasn't more clear initially. > > > > Eugene > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel