2 Opal Specification defined values and structures.
4 (TCG Storage Architecture Core Specification, Version 2.01, Revision 1.00,
5 https://trustedcomputinggroup.org/tcg-storage-architecture-core-specification/
7 Storage Work Group Storage Security Subsystem Class: Pyrite, Version 1.00 Final, Revision 1.00,
8 https://trustedcomputinggroup.org/tcg-storage-security-subsystem-class-pyrite/
10 Storage Work Group Storage Security Subsystem Class: Opal, Version 2.01 Final, Revision 1.00,
11 https://trustedcomputinggroup.org/storage-work-group-storage-security-subsystem-class-opal/
13 TCG Storage Security Subsystem Class: Opalite Version 1.00 Revision 1.00,
14 https://trustedcomputinggroup.org/tcg-storage-security-subsystem-class-opalite/)
16 Check http://trustedcomputinggroup.org for latest specification updates.
18 Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
19 SPDX-License-Identifier: BSD-2-Clause-Patent
23 #ifndef _TCG_STORAGE_OPAL_H_
24 #define _TCG_STORAGE_OPAL_H_
26 #include <IndustryStandard/TcgStorageCore.h>
28 #define OPAL_UID_ADMIN_SP TCG_TO_UID(0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00, 0x01)
29 #define OPAL_UID_ADMIN_SP_C_PIN_MSID TCG_TO_UID(0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x84, 0x02)
30 #define OPAL_UID_ADMIN_SP_C_PIN_SID TCG_TO_UID(0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x01)
31 #define OPAL_UID_LOCKING_SP TCG_TO_UID(0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00, 0x02)
35 #define OPAL_ADMIN_SP_ANYBODY_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01)
36 #define OPAL_ADMIN_SP_ADMINS_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x02)
37 #define OPAL_ADMIN_SP_MAKERS_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03)
38 #define OPAL_ADMIN_SP_SID_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06)
39 #define OPAL_ADMIN_SP_ADMIN1_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x02, 0x01)
40 #define OPAL_ADMIN_SP_PSID_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x01, 0xFF, 0x01)
42 #define OPAL_ADMIN_SP_ACTIVATE_METHOD TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x02, 0x03)
43 #define OPAL_ADMIN_SP_REVERT_METHOD TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x02, 0x02)
46 // Data Removal mechanism
47 #define OPAL_UID_ADMIN_SP_DATA_REMOVAL_MECHANISM TCG_TO_UID(0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x00, 0x01)
51 #define OPAL_LOCKING_SP_ANYBODY_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01)
52 #define OPAL_LOCKING_SP_ADMINS_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x02)
53 #define OPAL_LOCKING_SP_ADMIN1_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x01, 0x00, 0x01)
54 #define OPAL_LOCKING_SP_USERS_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00)
55 #define OPAL_LOCKING_SP_USER1_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x03, 0x00, 0x01)
57 #define OPAL_LOCKING_SP_REVERTSP_METHOD TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11)
60 #define OPAL_LOCKING_SP_C_PIN_ADMIN1 TCG_TO_UID( 0x00, 0x00, 0x00, 0x0B, 0x00, 0x01, 0x00, 0x01 )
61 #define OPAL_LOCKING_SP_C_PIN_USER1 TCG_TO_UID( 0x00, 0x00, 0x00, 0x0B, 0x00, 0x03, 0x00, 0x01 )
64 #define OPAL_LOCKING_SP_LOCKING_GLOBALRANGE TCG_TO_UID( 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0x01 )
65 #define OPAL_LOCKING_SP_LOCKING_RANGE1 TCG_TO_UID( 0x00, 0x00, 0x08, 0x02, 0x00, 0x03, 0x00, 0x01 )
67 // LOCKING SP ACE Table Preconfiguration
68 #define OPAL_LOCKING_SP_ACE_LOCKING_GLOBALRANGE_GET_ALL TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xD0, 0x00 )
69 #define OPAL_LOCKING_SP_ACE_LOCKING_GLOBALRANGE_SET_RDLOCKED TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xE0, 0x00 )
70 #define OPAL_LOCKING_SP_ACE_LOCKING_GLOBALRANGE_SET_WRLOCKED TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xE8, 0x00 )
72 #define OPAL_LOCKING_SP_ACE_K_AES_256_GLOBALRANGE_GENKEY TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xB8, 0x00 )
73 #define OPAL_LOCKING_SP_ACE_K_AES_128_GLOBALRANGE_GENKEY TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xB0, 0x00 )
75 // LOCKING SP LockingInfo Table Preconfiguration
76 #define OPAL_LOCKING_SP_LOCKING_INFO TCG_TO_UID( 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x01 )
78 #define OPAL_LOCKING_SP_LOCKINGINFO_ALIGNMENTREQUIRED_COL 0x7
79 #define OPAL_LOCKING_SP_LOCKINGINFO_LOGICALBLOCKSIZE_COL 0x8
80 #define OPAL_LOCKING_SP_LOCKINGINFO_ALIGNMENTGRANULARITY_COL 0x9
81 #define OPAL_LOCKING_SP_LOCKINGINFO_LOWESTALIGNEDLBA_COL 0xA
83 // K_AES_256 Table Preconfiguration
84 #define OPAL_LOCKING_SP_K_AES_256_GLOBALRANGE_KEY TCG_TO_UID( 0x00, 0x00, 0x08, 0x06, 0x00, 0x00, 0x00, 0x01 )
86 // K_AES_128 Table Preconfiguration
87 #define OPAL_LOCKING_SP_K_AES_128_GLOBALRANGE_KEY TCG_TO_UID( 0x00, 0x00, 0x08, 0x05, 0x00, 0x00, 0x00, 0x01 )
89 // Minimum Properties that an Opal Compliant SD Shall support
90 #define OPAL_MIN_MAX_COM_PACKET_SIZE 2048
91 #define OPAL_MIN_MAX_REPONSE_COM_PACKET_SIZE 2048
92 #define OPAL_MIN_MAX_PACKET_SIZE 2028
93 #define OPAL_MIN_MAX_IND_TOKEN_SIZE 1992
94 #define OPAL_MIN_MAX_PACKETS 1
95 #define OPAL_MIN_MAX_SUBPACKETS 1
96 #define OPAL_MIN_MAX_METHODS 1
97 #define OPAL_MIN_MAX_SESSIONS 1
98 #define OPAL_MIN_MAX_AUTHENTICATIONS 2
99 #define OPAL_MIN_MAX_TRANSACTION_LIMIT 1
101 #define OPAL_ADMIN_SP_PIN_COL 3
102 #define OPAL_LOCKING_SP_C_PIN_TRYLIMIT_COL 5
103 #define OPAL_RANDOM_METHOD_MAX_COUNT_SIZE 32
105 // Data Removal Mechanism column.
106 #define OPAL_ADMIN_SP_ACTIVE_DATA_REMOVAL_MECHANISM_COL 1
109 // Supported Data Removal Mechanism.
110 // Detail see Pyrite SSC v2 spec.
113 OverwriteDataErase
= 0,
120 } SUPPORTED_DATA_REMOVAL_MECHANISM
;
124 typedef struct _OPAL_GEOMETRY_REPORTING_FEATURE
{
125 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
127 UINT32 LogicalBlockSizeBE
;
128 UINT64 AlignmentGranularityBE
;
129 UINT64 LowestAlignedLBABE
;
130 } OPAL_GEOMETRY_REPORTING_FEATURE
;
132 typedef struct _OPAL_SINGLE_USER_MODE_FEATURE
{
133 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
134 UINT32 NumLockingObjectsSupportedBE
;
140 } OPAL_SINGLE_USER_MODE_FEATURE
;
142 typedef struct _OPAL_DATASTORE_TABLE_FEATURE
{
143 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
145 UINT16 MaxNumTablesBE
;
146 UINT32 MaxTotalSizeBE
;
147 UINT32 SizeAlignmentBE
;
148 } OPAL_DATASTORE_TABLE_FEATURE
;
150 typedef struct _OPAL_SSCV1_FEATURE_DESCRIPTOR
{
151 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
154 UINT8 RangeCrossing
: 1;
157 } OPAL_SSCV1_FEATURE_DESCRIPTOR
;
159 typedef struct _OPAL_SSCV2_FEATURE_DESCRIPTOR
{
160 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
164 UINT16 NumLockingSpAdminAuthoritiesSupportedBE
;
165 UINT16 NumLockingSpUserAuthoritiesSupportedBE
;
166 UINT8 InitialCPINSIDPIN
;
167 UINT8 CPINSIDPINRevertBehavior
;
169 } OPAL_SSCV2_FEATURE_DESCRIPTOR
;
171 typedef struct _OPAL_SSCLITE_FEATURE_DESCRIPTOR
{
172 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
176 UINT8 InitialCPINSIDPIN
;
177 UINT8 CPINSIDPINRevertBehavior
;
179 } OPAL_SSCLITE_FEATURE_DESCRIPTOR
;
181 typedef struct _PYRITE_SSC_FEATURE_DESCRIPTOR
{
182 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
186 UINT8 InitialCPINSIDPIN
;
187 UINT8 CPINSIDPINRevertBehavior
;
189 } PYRITE_SSC_FEATURE_DESCRIPTOR
;
191 typedef struct _PYRITE_SSCV2_FEATURE_DESCRIPTOR
{
192 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
196 UINT8 InitialCPINSIDPIN
;
197 UINT8 CPINSIDPINRevertBehavior
;
199 } PYRITE_SSCV2_FEATURE_DESCRIPTOR
;
201 typedef struct _DATA_REMOVAL_FEATURE_DESCRIPTOR
{
202 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
204 UINT8 OperationProcessing
: 1;
206 UINT8 RemovalMechanism
;
207 UINT8 FormatBit0
: 1; // Data Removal Time Format for Bit 0
208 UINT8 FormatBit1
: 1; // Data Removal Time Format for Bit 1
209 UINT8 FormatBit2
: 1; // Data Removal Time Format for Bit 2
210 UINT8 FormatBit3
: 1; // Data Removal Time Format for Bit 3
211 UINT8 FormatBit4
: 1; // Data Removal Time Format for Bit 4
212 UINT8 FormatBit5
: 1; // Data Removal Time Format for Bit 5
214 UINT16 TimeBit0
; // Data Removal Time for Supported Data Removal Mechanism Bit 0
215 UINT16 TimeBit1
; // Data Removal Time for Supported Data Removal Mechanism Bit 1
216 UINT16 TimeBit2
; // Data Removal Time for Supported Data Removal Mechanism Bit 2
217 UINT16 TimeBit3
; // Data Removal Time for Supported Data Removal Mechanism Bit 3
218 UINT16 TimeBit4
; // Data Removal Time for Supported Data Removal Mechanism Bit 4
219 UINT16 TimeBit5
; // Data Removal Time for Supported Data Removal Mechanism Bit 5
221 } DATA_REMOVAL_FEATURE_DESCRIPTOR
;
224 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER CommonHeader
;
225 TCG_TPER_FEATURE_DESCRIPTOR Tper
;
226 TCG_LOCKING_FEATURE_DESCRIPTOR Locking
;
227 OPAL_GEOMETRY_REPORTING_FEATURE Geometry
;
228 OPAL_SINGLE_USER_MODE_FEATURE SingleUser
;
229 OPAL_DATASTORE_TABLE_FEATURE DataStore
;
230 OPAL_SSCV1_FEATURE_DESCRIPTOR OpalSscV1
;
231 OPAL_SSCV2_FEATURE_DESCRIPTOR OpalSscV2
;
232 OPAL_SSCLITE_FEATURE_DESCRIPTOR OpalSscLite
;
233 PYRITE_SSC_FEATURE_DESCRIPTOR PyriteSsc
;
234 PYRITE_SSCV2_FEATURE_DESCRIPTOR PyriteSscV2
;
235 TCG_BLOCK_SID_FEATURE_DESCRIPTOR BlockSid
;
236 DATA_REMOVAL_FEATURE_DESCRIPTOR DataRemoval
;
237 } OPAL_LEVEL0_FEATURE_DESCRIPTOR
;