From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0707.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe40::707]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 84B011A1E0F for ; Fri, 30 Sep 2016 09:36:47 -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:36:45 +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:36:45 +0000 From: "Cohen, Eugene" To: 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: AdIbIt8zDF4zYVg0Qm6BbTDEpt2HcgAA5RyAAARYvtA= Date: Fri, 30 Sep 2016 16:36:45 +0000 Message-ID: References: <9877647c-b348-2a36-9ac0-b520a82260d1@redhat.com> In-Reply-To: <9877647c-b348-2a36-9ac0-b520a82260d1@redhat.com> 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: [174.19.99.119] x-ms-office365-filtering-correlation-id: aea24a7b-70f6-40da-2a24-08d3e94ff7c6 x-microsoft-exchange-diagnostics: 1; AT5PR84MB0292; 6:ubu4Slzrrl2FbcgLyvc8SLfBzn5KxQIAyioXJMB4Eyu2x43Pxf5BEulwZ2/TQMgGVVyI6Vuroirzi+VKgz5frhA2ITIqhHHOD7aflmPy+naYRPrIF/iHLlNuLZAuP+9L4TiDgrY+UttQ8vH/QWtpuekHkM777HTbGlvLa/D2RpCFx0noBp0/l+GILlnhRkOhpmqeN4ViWILA53dbMriZLaCAy9goMNrHokNoVQb5ARPRgSCZk5VgEgpM8qWgBtdckOhVRZjq0hKptPg0wUsTPu68ckLTw6yKvsia90HIiLw=; 5:euZtjOV8p5EG+9RHo5yiHfHTp9ua5hg0IaH4EKYyOwfE290XSdY12hC0yW93rqO4Npz5gzyiN4HLbKUXxxJk0FPokXHruYOr90SK/Wmi05tMzQdsWEs0Uqu67B6tUz3mPCsRT9QuV70KuES59bgpNw==; 24:PZdJ8WLisSwogfk40aq1NOx9Sh8zpioGipj7u5tUpT4zCxjdCJGACpvIfP9nmh413tajCF9z+ZCP6X+ru1V54qbKqky4CNrumdCVq5AGoHc=; 7:9heTnmlurSL6+usEaLtGLtQEkQpbsoXxhBHEKzh3CXyUzy7u1etz3chCM7B8q0lLnjkrud9SgxNWV+1zowHxTqnZqIzvFVBFWd/UsJV+6OpfmcePW0GSXu7PIxGa3h86hZnaDKLeqx9ac7PRLmm9uDTA6dV1Mt2eJiveBpPAfXCLxGoTQWDZU+tzyF+Iqq8OcyIGdTZxjpNXIUPt6CIycSf52PPjOhlffKvW/QNPW0gzqrlSIfe04C9kVHLM/U0m7prWczm+sTREvk8thUrtcfeDj958UkNIaFe5amqXuYQuL6q80+anLKGAahw2ElVk x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AT5PR84MB0292; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; 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)(199003)(6602003)(189002)(6116002)(102836003)(81166006)(81156014)(5002640100001)(8676002)(7846002)(10400500002)(305945005)(7736002)(8666005)(586003)(33656002)(66066001)(99286002)(122556002)(2950100002)(105586002)(106356001)(76176999)(50986999)(54356999)(2906002)(7696004)(101416001)(2900100001)(3846002)(87936001)(68736007)(86362001)(97736004)(11100500001)(5001770100001)(92566002)(5660300001)(8936002)(189998001)(9686002)(107886002)(3280700002)(77096005)(3660700001)(74316002)(7059030)(491001); DIR:OUT; SFP:1102; SCL:1; SRVR:AT5PR84MB0292; H:AT5PR84MB0291.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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:36:45.5156 (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:36:47 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 databas= es, > the locator function would have to return which database the GUID was > found. >=20 > My point is that every wrapper function that returns a protocol interface= (or > several protocol interfaces), or handles, each such return value will lik= ely > 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 th= e 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 me= mory pools for SMM modules (SmmMemoryAllocationLib). Sorry I wasn't more clear initially. Eugene