From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=ray.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2DBF0211B158C for ; Wed, 30 Jan 2019 19:27:21 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jan 2019 19:27:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,543,1539673200"; d="scan'208";a="139383119" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga002.fm.intel.com with ESMTP; 30 Jan 2019 19:27:20 -0800 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 30 Jan 2019 19:27:19 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 30 Jan 2019 19:27:19 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.102]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.110]) with mapi id 14.03.0415.000; Thu, 31 Jan 2019 11:27:17 +0800 From: "Ni, Ray" To: "Wu, Hao A" , "edk2-devel@lists.01.org" CC: "Wang, Jian J" , "Dong, Eric" Thread-Topic: [PATCH v2 04/12] MdeModulePkg: Add GUID for LockBox to save storage dev to init in S3 Thread-Index: AQHUuQ+NUPPDS7sS8k2+diUyh37njaXIuA3w Date: Thu, 31 Jan 2019 03:27:17 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5BFFFF3D@SHSMSX104.ccr.corp.intel.com> References: <20190131024854.4880-1-hao.a.wu@intel.com> <20190131024854.4880-5-hao.a.wu@intel.com> In-Reply-To: <20190131024854.4880-5-hao.a.wu@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2 04/12] MdeModulePkg: Add GUID for LockBox to save storage dev to init in S3 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jan 2019 03:27:21 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Wu, Hao A > Sent: Thursday, January 31, 2019 10:49 AM > To: edk2-devel@lists.01.org > Cc: Wu, Hao A ; Wang, Jian J ; > Ni, Ray ; Dong, Eric > Subject: [PATCH v2 04/12] MdeModulePkg: Add GUID for LockBox to save > storage dev to init in S3 >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D1409 >=20 > This commit will add the GUID definitions for LockBox which is used to sa= ve a > list of storage devices that need to get initialized during the S3 resume= . >=20 > The content of the LockBox will be a DevicePath structure that contains z= ero > or more DevicePath instances. Each instance denotes a storage device that > needs to get initialized during the S3 resume. >=20 > The producers of the content of this LockBox will be drivers like > OpalPassword DXE driver. This kind of drivers requires some specific stor= age > devices to be initialized during the PEI phase of in S3 resume. > (For the OpalPasword case, it requires the managing devices to be > automatically unlocked during the S3 resume). >=20 > The attribute of the LockBox should be set to > LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY. >=20 > The consumers of the content of this LockBox will be PEI storage device > controller/bus drivers (e.g. NvmExpressPei) during S3 resume. This kind o= f > drivers can use the DevicePath instances stored in the LockBox to get a l= ist of > devices that need to get initialized. In such way, an on-demand > (partial) device enumeration/initialization can be performed to benefit t= he S3 > resume performance. >=20 > Cc: Jian J Wang > Cc: Ray Ni > Cc: Eric Dong > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Hao Wu > --- > MdeModulePkg/MdeModulePkg.dec | 3 ++ > MdeModulePkg/Include/Guid/S3StorageDeviceInitList.h | 36 > ++++++++++++++++++++ > 2 files changed, 39 insertions(+) >=20 > diff --git a/MdeModulePkg/MdeModulePkg.dec > b/MdeModulePkg/MdeModulePkg.dec index 7f646d7702..a2130bc439 > 100644 > --- a/MdeModulePkg/MdeModulePkg.dec > +++ b/MdeModulePkg/MdeModulePkg.dec > @@ -422,6 +422,9 @@ > ## Include/Guid/S3SmmInitDone.h > gEdkiiS3SmmInitDoneGuid =3D { 0x8f9d4825, 0x797d, 0x48fc, { 0x84, 0x71= , > 0x84, 0x50, 0x25, 0x79, 0x2e, 0xf6 } } >=20 > + ## Include/Guid/S3StorageDeviceInitList.h > + gS3StorageDeviceInitListGuid =3D { 0x310e9b8c, 0xcf90, 0x421e, { 0x8e, > + 0x9b, 0x9e, 0xef, 0xb6, 0x17, 0xc8, 0xef } } > + > [Ppis] > ## Include/Ppi/AtaController.h > gPeiAtaControllerPpiGuid =3D { 0xa45e60d1, 0xc719, 0x44aa, { 0xb= 0, 0x7a, > 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }} > diff --git a/MdeModulePkg/Include/Guid/S3StorageDeviceInitList.h > b/MdeModulePkg/Include/Guid/S3StorageDeviceInitList.h > new file mode 100644 > index 0000000000..cfbd2a78e7 > --- /dev/null > +++ b/MdeModulePkg/Include/Guid/S3StorageDeviceInitList.h > @@ -0,0 +1,36 @@ > +/** @file > + Define the LockBox GUID for list of storage devices need to be > +initialized in > + S3. > + > + Copyright (c) 2019, 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. > + > +**/ > + > +#ifndef __S3_STORAGE_DEVICE_INIT_LIST_H__ #define > +__S3_STORAGE_DEVICE_INIT_LIST_H__ > + > +#define S3_STORAGE_DEVICE_INIT_LIST \ > + { \ > + 0x310e9b8c, 0xcf90, 0x421e, { 0x8e, 0x9b, 0x9e, 0xef, 0xb6, 0x17, > +0xc8, 0xef } \ > + } > + > +// > +// The LockBox will store a DevicePath structure that contains zero or > +more // DevicePath instances. Each instance denotes a storage device > +that needs to // get initialized during the S3 resume. Can you have some pseudo code to describe the structure? > +// > +// The attribute of the LockBox should be set to // > +'LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY'. > +// > +extern EFI_GUID gS3StorageDeviceInitListGuid; > + > +#endif // __S3_STORAGE_DEVICE_INIT_LIST_H__ > -- > 2.12.0.windows.1