From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0711.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe4a::711]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E8D331A1E3A for ; Fri, 30 Sep 2016 07:13:57 -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 14:13:51 +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 14:13:52 +0000 From: "Cohen, Eugene" To: "edk2-devel@lists.01.org" , "Kinney, Michael D" , "Yao, Jiewen" , "Andrew Fish (afish@apple.com)" Thread-Topic: RFC: ProtocolLib for cross DXE and SMM Protocol and Handle Services Thread-Index: AdIbIt8zDF4zYVg0Qm6BbTDEpt2Hcg== Date: Fri, 30 Sep 2016 14:13:51 +0000 Message-ID: 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: 482f8a71-8b43-4800-3012-08d3e93c0185 x-microsoft-exchange-diagnostics: 1; AT5PR84MB0292; 6:9pGKckWkwP9aU58vWHuR/K3fy3g0NMPcHZ5/RSAD6sxzfWB9LfOHm0gLnXn/7Y0YlMAsBXydUwzN3BBCih1phXUvJc3AOcAZqRr6aoUiZ7Zoa9cTGeNmBz34kM71JA8v086aqTGu7huunxsn6TI/mZh6edPchQwZ+5KK3MCddf+B9QjfgQweZti3XSyjPhUPkaBZtGlP2yd7NG7Bn/3RWev7aX/ElP/dAXAOjxLCSbLE+r39j+BoolTkCNM/8WYYDMcW+kEbRrxoZdULx1wLAPev2qgfsbOuuUh7UTY1HAA=; 5:Vb86Qr9K6j+NES0ltimZSgzEfBchfs+tUoLjoVxSw65KaRT+laAsSJNDMGMHubIGA3JuMqR5jU9pUfyooZQDIcNcP0C9kagl8SEM1A1Rs578mx74CX5r6uka0C6jmp0CCm9FV0VH3wjyOG8cGdel+A==; 24:u4tgDZhe7qWy/uhjNkbn9/+1NlFoqmmz6JbN2pLkk5ZBrLKDOQF5LMlB7ozuVBdz/2yjp7HpNxNNt/bcOCAPUVRc/bwnxMfHjFSVvSAznIk=; 7:EGrd/kAOstluoKa+LHAO1TSC61g2CvkfmniWkdgyFrEF1JMQH3PMacL+qQzICa19UPZVlTz0R99/LiaOs3HP67dGXSX48jZg86ytXxB1AIf96rLkd4+x5RUCPPbQKXs0RXsyOwOOZrlq103fUE7PIwDxxVI5hu3U+xcz9gZEBUJHjyhCjCgjqv6hq9LFWVZwU20aIAZZkDR8ZYMldmOwGaXoQIinLzOnD1MApHpgwzxUle5DGSYHK6YRRHsmwRQw+ByN1KNL3fyWd1SOXT+8QIt6yl+eRrMdrou4vbPRtRgvzdVDl/SMutJtdQO3u3gc 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)(8676002)(5002640100001)(10400500002)(7846002)(305945005)(7736002)(586003)(8666005)(33656002)(66066001)(122556002)(229853001)(99286002)(105586002)(106356001)(50986999)(2501003)(54356999)(2906002)(7696004)(101416001)(2900100001)(3846002)(87936001)(68736007)(86362001)(97736004)(5660300001)(5001770100001)(92566002)(8936002)(189998001)(9686002)(107886002)(3280700002)(77096005)(74316002)(3660700001)(7059030); 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 14:13:51.9254 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: ca7981a2-785a-463d-b82a-3db87dfc3ce6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR84MB0292 Subject: 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 14:13:58 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Request for Comments... Both UEFI/DXE and SMM support the protocol / handle database concept. Some= protocol definitions are able used in both environments with different imp= lementations behind them. We'd like to create a library that could be used in either DXE or SMM makin= g use of protocol and handle services. For example, we'd like to be able t= o do a LocateProtocol for a certain protocol and make use of the protocol r= egardless of the environment we're executing in. In order to create a neutral API for protocol and handle services from eith= er environment, I'm proposing that we create a "ProtocolLib" that abstracts= protocol install, uninstall, HandleProtocol, install notification, LocateH= andle and LocateProtocol implementations - basically all the protocol and h= andle services common across UEFI Boot Services and SMST. A DXE instance = of ProtocolLib would direct functions through the Boot Services table and a= n SMM instance of ProtocolLib would go through the SMST. (We also would l= ike to maintain separation between DXE and SMM in support of the PI 1.5 Sta= ndalone SMM model which is easy to achieve with separate library instances.= ) We have a similar model already with the MemoryAllocationLib so this would = follow in its footsteps. Please share your thoughts... Eugene