Reviewed-by: Hao Wu <[email protected]>

Best Regards,
Hao Wu


> -----Original Message-----
> From: Dong, Eric
> Sent: Thursday, May 03, 2018 11:17 AM
> To: [email protected]; Wu, Hao A
> Subject: [Patch 1/3] MdePkg: Add Feature definitions add in pyrite 2.0 spec.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Eric Dong <[email protected]>
> ---
>  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

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to