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.65; helo=mga03.intel.com; envelope-from=eric.dong@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 663722063E2E1 for ; Wed, 2 May 2018 20:17:08 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 May 2018 20:17:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,356,1520924400"; d="scan'208";a="52769863" Received: from ydong10-win10.ccr.corp.intel.com ([10.239.158.44]) by orsmga001.jf.intel.com with ESMTP; 02 May 2018 20:17:07 -0700 From: Eric Dong To: edk2-devel@lists.01.org, hao.a.wu@intel.com Date: Thu, 3 May 2018 11:17:00 +0800 Message-Id: <20180503031702.11296-2-eric.dong@intel.com> X-Mailer: git-send-email 2.15.0.windows.1 In-Reply-To: <20180503031702.11296-1-eric.dong@intel.com> References: <20180503031702.11296-1-eric.dong@intel.com> Subject: [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: Thu, 03 May 2018 03:17:08 -0000 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(+) 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 // 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) +// ADMIN_SP +// Data Removal mechanism +#define OPAL_UID_ADMIN_SP_DATA_REMOVAL_MECHANISM TCG_TO_UID(0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x00, 0x01) // 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 +// 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 = 0, + BlockErase, + CryptoErase, + Unmap, + ResetWritePointers, + VendorSpecificErase, + ResearvedMechanism +} SUPPORTED_DATA_REMOVAL_MECHANISM; + #pragma pack(1) typedef struct _OPAL_GEOMETRY_REPORTING_FEATURE { @@ -162,6 +182,38 @@ typedef struct _PYRITE_SSC_FEATURE_DESCRIPTOR { UINT8 Future[5]; } PYRITE_SSC_FEATURE_DESCRIPTOR; +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; #pragma pack() -- 2.15.0.windows.1