From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=hao.a.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 3C5C42094608B for ; Sun, 6 May 2018 20:08:38 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 May 2018 20:08:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,372,1520924400"; d="scan'208";a="47238039" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by FMSMGA003.fm.intel.com with ESMTP; 06 May 2018 20:08:37 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 6 May 2018 20:08:36 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 6 May 2018 20:08:36 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.240]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.40]) with mapi id 14.03.0319.002; Mon, 7 May 2018 11:08:34 +0800 From: "Wu, Hao A" To: "Dong, Eric" , "edk2-devel@lists.01.org" Thread-Topic: [Patch 1/3] MdePkg: Add Feature definitions add in pyrite 2.0 spec. Thread-Index: AQHT4o1Avd0OySI+5U2ZA/E5obRU56Qjl1DA Date: Mon, 7 May 2018 03:08:33 +0000 Message-ID: References: <20180503031702.11296-1-eric.dong@intel.com> <20180503031702.11296-2-eric.dong@intel.com> In-Reply-To: <20180503031702.11296-2-eric.dong@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch 1/3] MdePkg: Add Feature definitions add in pyrite 2.0 spec. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 May 2018 03:08:38 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Hao Wu Best Regards, Hao Wu > -----Original Message----- > From: Dong, Eric > Sent: Thursday, May 03, 2018 11:17 AM > To: edk2-devel@lists.01.org; Wu, Hao A > Subject: [Patch 1/3] MdePkg: Add Feature definitions add in pyrite 2.0 sp= ec. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Eric Dong > --- > MdePkg/Include/IndustryStandard/TcgStorageCore.h | 2 + > MdePkg/Include/IndustryStandard/TcgStorageOpal.h | 54 > ++++++++++++++++++++++++ > 2 files changed, 56 insertions(+) >=20 > diff --git a/MdePkg/Include/IndustryStandard/TcgStorageCore.h > b/MdePkg/Include/IndustryStandard/TcgStorageCore.h > index 56ea92f2eb..6d80da2401 100644 > --- a/MdePkg/Include/IndustryStandard/TcgStorageCore.h > +++ b/MdePkg/Include/IndustryStandard/TcgStorageCore.h > @@ -228,7 +228,9 @@ typedef enum { > #define TCG_FEATURE_OPAL_SSC_V2_0_0 (UINT16)0x0203 > #define TCG_FEATURE_OPAL_SSC_LITE (UINT16)0x0301 > #define TCG_FEATURE_PYRITE_SSC (UINT16)0x0302 > +#define TCG_FEATURE_PYRITE_SSC_V2_0_0 (UINT16)0x0303 > #define TCG_FEATURE_BLOCK_SID (UINT16)0x0402 > +#define TCG_FEATURE_DATA_REMOVAL (UINT16)0x0404 >=20 > // ACE Expression values > #define TCG_ACE_EXPRESSION_AND 0x0 > diff --git a/MdePkg/Include/IndustryStandard/TcgStorageOpal.h > b/MdePkg/Include/IndustryStandard/TcgStorageOpal.h > index 91d5008c05..8ff36efe50 100644 > --- a/MdePkg/Include/IndustryStandard/TcgStorageOpal.h > +++ b/MdePkg/Include/IndustryStandard/TcgStorageOpal.h > @@ -34,6 +34,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY > KIND, EITHER EXPRESS OR IMPLIED. > #define OPAL_ADMIN_SP_ACTIVATE_METHOD TCG_TO_UID(0x00, 0x00, > 0x00, 0x06, 0x00, 0x00, 0x02, 0x03) > #define OPAL_ADMIN_SP_REVERT_METHOD TCG_TO_UID(0x00, 0x00, > 0x00, 0x06, 0x00, 0x00, 0x02, 0x02) >=20 > +// ADMIN_SP > +// Data Removal mechanism > +#define OPAL_UID_ADMIN_SP_DATA_REMOVAL_MECHANISM > TCG_TO_UID(0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x00, 0x01) >=20 > // LOCKING SP > // Authorities > @@ -93,6 +96,23 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY > KIND, EITHER EXPRESS OR IMPLIED. > #define OPAL_LOCKING_SP_C_PIN_TRYLIMIT_COL 5 > #define OPAL_RANDOM_METHOD_MAX_COUNT_SIZE 32 >=20 > +// Data Removal Mechanism column. > +#define OPAL_ADMIN_SP_ACTIVE_DATA_REMOVAL_MECHANISM_COL 1 > + > +// > +// Supported Data Removal Mechanism. > +// Detail see Pyrite SSC v2 spec. > +// > +typedef enum { > + OverwriteDataErase =3D 0, > + BlockErase, > + CryptoErase, > + Unmap, > + ResetWritePointers, > + VendorSpecificErase, > + ResearvedMechanism > +} SUPPORTED_DATA_REMOVAL_MECHANISM; > + > #pragma pack(1) >=20 > typedef struct _OPAL_GEOMETRY_REPORTING_FEATURE { > @@ -162,6 +182,38 @@ typedef struct _PYRITE_SSC_FEATURE_DESCRIPTOR { > UINT8 Future[5]; > } PYRITE_SSC_FEATURE_DESCRIPTOR; >=20 > +typedef struct _PYRITE_SSCV2_FEATURE_DESCRIPTOR { > + TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; > + UINT16 BaseComdIdBE; > + UINT16 NumComIdsBE; > + UINT8 Reserved[5]; > + UINT8 InitialCPINSIDPIN; > + UINT8 CPINSIDPINRevertBehavior; > + UINT8 Future[5]; > +} PYRITE_SSCV2_FEATURE_DESCRIPTOR; > + > +typedef struct _DATA_REMOVAL_FEATURE_DESCRIPTOR { > + TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; > + UINT8 Reserved; > + UINT8 OperationProcessing : 1; > + UINT8 Reserved2 : 7; > + UINT8 RemovalMechanism; > + UINT8 FormatBit0 : 1; // Data Removal= Time Format for > Bit 0 > + UINT8 FormatBit1 : 1; // Data Removal= Time Format for > Bit 1 > + UINT8 FormatBit2 : 1; // Data Removal= Time Format for > Bit 2 > + UINT8 FormatBit3 : 1; // Data Removal= Time Format for > Bit 3 > + UINT8 FormatBit4 : 1; // Data Removal= Time Format for > Bit 4 > + UINT8 FormatBit5 : 1; // Data Removal= Time Format for > Bit 5 > + UINT8 Reserved3 : 2; > + UINT16 TimeBit0; // Data Removal= Time for > Supported Data Removal Mechanism Bit 0 > + UINT16 TimeBit1; // Data Removal= Time for > Supported Data Removal Mechanism Bit 1 > + UINT16 TimeBit2; // Data Removal= Time for > Supported Data Removal Mechanism Bit 2 > + UINT16 TimeBit3; // Data Removal= Time for > Supported Data Removal Mechanism Bit 3 > + UINT16 TimeBit4; // Data Removal= Time for > Supported Data Removal Mechanism Bit 4 > + UINT16 TimeBit5; // Data Removal= Time for > Supported Data Removal Mechanism Bit 5 > + UINT8 Future[16]; > +} DATA_REMOVAL_FEATURE_DESCRIPTOR; > + > typedef union { > TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER CommonHeader; > TCG_TPER_FEATURE_DESCRIPTOR Tper; > @@ -173,7 +225,9 @@ typedef union { > OPAL_SSCV2_FEATURE_DESCRIPTOR OpalSscV2; > OPAL_SSCLITE_FEATURE_DESCRIPTOR OpalSscLite; > PYRITE_SSC_FEATURE_DESCRIPTOR PyriteSsc; > + PYRITE_SSCV2_FEATURE_DESCRIPTOR PyriteSscV2; > TCG_BLOCK_SID_FEATURE_DESCRIPTOR BlockSid; > + DATA_REMOVAL_FEATURE_DESCRIPTOR DataRemoval; > } OPAL_LEVEL0_FEATURE_DESCRIPTOR; >=20 > #pragma pack() > -- > 2.15.0.windows.1