public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Eric Dong <eric.dong@intel.com>
To: edk2-devel@lists.01.org, hao.a.wu@intel.com
Subject: [Patch 1/3] MdePkg: Add Feature definitions add in pyrite 2.0 spec.
Date: Thu,  3 May 2018 11:17:00 +0800	[thread overview]
Message-ID: <20180503031702.11296-2-eric.dong@intel.com> (raw)
In-Reply-To: <20180503031702.11296-1-eric.dong@intel.com>

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
---
 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



  reply	other threads:[~2018-05-03  3:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03  3:16 [Patch 0/3] Enable Pyrite 2.0 for opal driver Eric Dong
2018-05-03  3:17 ` Eric Dong [this message]
2018-05-07  3:08   ` [Patch 1/3] MdePkg: Add Feature definitions add in pyrite 2.0 spec Wu, Hao A
2018-05-03  3:17 ` [Patch 2/3] SecurityPkg/TcgStorageOpalLib: Add supports for " Eric Dong
2018-05-07  3:08   ` Wu, Hao A
2018-05-03  3:17 ` [Patch 3/3] SecurityPkg/OpalPassword: Add support for pyrite 2.0 devices Eric Dong
2018-05-07  3:08   ` Wu, Hao A
2018-05-07  5:33     ` Dong, Eric
2018-05-07  5:34       ` Wu, Hao A
2018-05-08  5:41 ` [Patch 0/3] Enable Pyrite 2.0 for opal driver Yao, Jiewen
2018-05-08  5:50   ` Dong, Eric
2018-05-08  6:01     ` Yao, Jiewen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180503031702.11296-2-eric.dong@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox