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 This program and the accompanying materials
20 are licensed and made available under the terms and conditions of the BSD License
21 which accompanies this distribution. The full text of the license may be found at
22 http://opensource.org/licenses/bsd-license.php
24 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
25 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
29 #ifndef _TCG_STORAGE_OPAL_H_
30 #define _TCG_STORAGE_OPAL_H_
32 #include <IndustryStandard/TcgStorageCore.h>
34 #define OPAL_UID_ADMIN_SP TCG_TO_UID(0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00, 0x01)
35 #define OPAL_UID_ADMIN_SP_C_PIN_MSID TCG_TO_UID(0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x84, 0x02)
36 #define OPAL_UID_ADMIN_SP_C_PIN_SID TCG_TO_UID(0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x01)
37 #define OPAL_UID_LOCKING_SP TCG_TO_UID(0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00, 0x02)
41 #define OPAL_ADMIN_SP_ANYBODY_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01)
42 #define OPAL_ADMIN_SP_ADMINS_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x02)
43 #define OPAL_ADMIN_SP_MAKERS_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03)
44 #define OPAL_ADMIN_SP_SID_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06)
45 #define OPAL_ADMIN_SP_ADMIN1_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x02, 0x01)
46 #define OPAL_ADMIN_SP_PSID_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x01, 0xFF, 0x01)
48 #define OPAL_ADMIN_SP_ACTIVATE_METHOD TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x02, 0x03)
49 #define OPAL_ADMIN_SP_REVERT_METHOD TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x02, 0x02)
52 // Data Removal mechanism
53 #define OPAL_UID_ADMIN_SP_DATA_REMOVAL_MECHANISM TCG_TO_UID(0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x00, 0x01)
57 #define OPAL_LOCKING_SP_ANYBODY_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01)
58 #define OPAL_LOCKING_SP_ADMINS_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x02)
59 #define OPAL_LOCKING_SP_ADMIN1_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x01, 0x00, 0x01)
60 #define OPAL_LOCKING_SP_USERS_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00)
61 #define OPAL_LOCKING_SP_USER1_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x03, 0x00, 0x01)
63 #define OPAL_LOCKING_SP_REVERTSP_METHOD TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11)
66 #define OPAL_LOCKING_SP_C_PIN_ADMIN1 TCG_TO_UID( 0x00, 0x00, 0x00, 0x0B, 0x00, 0x01, 0x00, 0x01 )
67 #define OPAL_LOCKING_SP_C_PIN_USER1 TCG_TO_UID( 0x00, 0x00, 0x00, 0x0B, 0x00, 0x03, 0x00, 0x01 )
70 #define OPAL_LOCKING_SP_LOCKING_GLOBALRANGE TCG_TO_UID( 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0x01 )
71 #define OPAL_LOCKING_SP_LOCKING_RANGE1 TCG_TO_UID( 0x00, 0x00, 0x08, 0x02, 0x00, 0x03, 0x00, 0x01 )
74 // LOCKING SP ACE Table Preconfiguration
75 #define OPAL_LOCKING_SP_ACE_LOCKING_GLOBALRANGE_GET_ALL TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xD0, 0x00 )
76 #define OPAL_LOCKING_SP_ACE_LOCKING_GLOBALRANGE_SET_RDLOCKED TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xE0, 0x00 )
77 #define OPAL_LOCKING_SP_ACE_LOCKING_GLOBALRANGE_SET_WRLOCKED TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xE8, 0x00 )
79 #define OPAL_LOCKING_SP_ACE_K_AES_256_GLOBALRANGE_GENKEY TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xB8, 0x00 )
80 #define OPAL_LOCKING_SP_ACE_K_AES_128_GLOBALRANGE_GENKEY TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xB0, 0x00 )
83 // LOCKING SP LockingInfo Table Preconfiguration
84 #define OPAL_LOCKING_SP_LOCKING_INFO TCG_TO_UID( 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x01 )
86 #define OPAL_LOCKING_SP_LOCKINGINFO_ALIGNMENTREQUIRED_COL 0x7
87 #define OPAL_LOCKING_SP_LOCKINGINFO_LOGICALBLOCKSIZE_COL 0x8
88 #define OPAL_LOCKING_SP_LOCKINGINFO_ALIGNMENTGRANULARITY_COL 0x9
89 #define OPAL_LOCKING_SP_LOCKINGINFO_LOWESTALIGNEDLBA_COL 0xA
91 // K_AES_256 Table Preconfiguration
92 #define OPAL_LOCKING_SP_K_AES_256_GLOBALRANGE_KEY TCG_TO_UID( 0x00, 0x00, 0x08, 0x06, 0x00, 0x00, 0x00, 0x01 )
94 // K_AES_128 Table Preconfiguration
95 #define OPAL_LOCKING_SP_K_AES_128_GLOBALRANGE_KEY TCG_TO_UID( 0x00, 0x00, 0x08, 0x05, 0x00, 0x00, 0x00, 0x01 )
97 // Minimum Properties that an Opal Compliant SD Shall support
98 #define OPAL_MIN_MAX_COM_PACKET_SIZE 2048
99 #define OPAL_MIN_MAX_REPONSE_COM_PACKET_SIZE 2048
100 #define OPAL_MIN_MAX_PACKET_SIZE 2028
101 #define OPAL_MIN_MAX_IND_TOKEN_SIZE 1992
102 #define OPAL_MIN_MAX_PACKETS 1
103 #define OPAL_MIN_MAX_SUBPACKETS 1
104 #define OPAL_MIN_MAX_METHODS 1
105 #define OPAL_MIN_MAX_SESSIONS 1
106 #define OPAL_MIN_MAX_AUTHENTICATIONS 2
107 #define OPAL_MIN_MAX_TRANSACTION_LIMIT 1
109 #define OPAL_ADMIN_SP_PIN_COL 3
110 #define OPAL_LOCKING_SP_C_PIN_TRYLIMIT_COL 5
111 #define OPAL_RANDOM_METHOD_MAX_COUNT_SIZE 32
113 // Data Removal Mechanism column.
114 #define OPAL_ADMIN_SP_ACTIVE_DATA_REMOVAL_MECHANISM_COL 1
117 // Supported Data Removal Mechanism.
118 // Detail see Pyrite SSC v2 spec.
121 OverwriteDataErase
= 0,
128 } SUPPORTED_DATA_REMOVAL_MECHANISM
;
132 typedef struct _OPAL_GEOMETRY_REPORTING_FEATURE
{
133 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
135 UINT32 LogicalBlockSizeBE
;
136 UINT64 AlignmentGranularityBE
;
137 UINT64 LowestAlignedLBABE
;
138 } OPAL_GEOMETRY_REPORTING_FEATURE
;
140 typedef struct _OPAL_SINGLE_USER_MODE_FEATURE
{
141 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
142 UINT32 NumLockingObjectsSupportedBE
;
148 } OPAL_SINGLE_USER_MODE_FEATURE
;
150 typedef struct _OPAL_DATASTORE_TABLE_FEATURE
{
151 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
153 UINT16 MaxNumTablesBE
;
154 UINT32 MaxTotalSizeBE
;
155 UINT32 SizeAlignmentBE
;
156 } OPAL_DATASTORE_TABLE_FEATURE
;
158 typedef struct _OPAL_SSCV1_FEATURE_DESCRIPTOR
{
159 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
162 UINT8 RangeCrossing
: 1;
165 } OPAL_SSCV1_FEATURE_DESCRIPTOR
;
167 typedef struct _OPAL_SSCV2_FEATURE_DESCRIPTOR
{
168 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
172 UINT16 NumLockingSpAdminAuthoritiesSupportedBE
;
173 UINT16 NumLockingSpUserAuthoritiesSupportedBE
;
174 UINT8 InitialCPINSIDPIN
;
175 UINT8 CPINSIDPINRevertBehavior
;
177 } OPAL_SSCV2_FEATURE_DESCRIPTOR
;
179 typedef struct _OPAL_SSCLITE_FEATURE_DESCRIPTOR
{
180 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
184 UINT8 InitialCPINSIDPIN
;
185 UINT8 CPINSIDPINRevertBehavior
;
187 } OPAL_SSCLITE_FEATURE_DESCRIPTOR
;
189 typedef struct _PYRITE_SSC_FEATURE_DESCRIPTOR
{
190 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
194 UINT8 InitialCPINSIDPIN
;
195 UINT8 CPINSIDPINRevertBehavior
;
197 } PYRITE_SSC_FEATURE_DESCRIPTOR
;
199 typedef struct _PYRITE_SSCV2_FEATURE_DESCRIPTOR
{
200 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
204 UINT8 InitialCPINSIDPIN
;
205 UINT8 CPINSIDPINRevertBehavior
;
207 } PYRITE_SSCV2_FEATURE_DESCRIPTOR
;
209 typedef struct _DATA_REMOVAL_FEATURE_DESCRIPTOR
{
210 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header
;
212 UINT8 OperationProcessing
: 1;
214 UINT8 RemovalMechanism
;
215 UINT8 FormatBit0
: 1; // Data Removal Time Format for Bit 0
216 UINT8 FormatBit1
: 1; // Data Removal Time Format for Bit 1
217 UINT8 FormatBit2
: 1; // Data Removal Time Format for Bit 2
218 UINT8 FormatBit3
: 1; // Data Removal Time Format for Bit 3
219 UINT8 FormatBit4
: 1; // Data Removal Time Format for Bit 4
220 UINT8 FormatBit5
: 1; // Data Removal Time Format for Bit 5
222 UINT16 TimeBit0
; // Data Removal Time for Supported Data Removal Mechanism Bit 0
223 UINT16 TimeBit1
; // Data Removal Time for Supported Data Removal Mechanism Bit 1
224 UINT16 TimeBit2
; // Data Removal Time for Supported Data Removal Mechanism Bit 2
225 UINT16 TimeBit3
; // Data Removal Time for Supported Data Removal Mechanism Bit 3
226 UINT16 TimeBit4
; // Data Removal Time for Supported Data Removal Mechanism Bit 4
227 UINT16 TimeBit5
; // Data Removal Time for Supported Data Removal Mechanism Bit 5
229 } DATA_REMOVAL_FEATURE_DESCRIPTOR
;
232 TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER CommonHeader
;
233 TCG_TPER_FEATURE_DESCRIPTOR Tper
;
234 TCG_LOCKING_FEATURE_DESCRIPTOR Locking
;
235 OPAL_GEOMETRY_REPORTING_FEATURE Geometry
;
236 OPAL_SINGLE_USER_MODE_FEATURE SingleUser
;
237 OPAL_DATASTORE_TABLE_FEATURE DataStore
;
238 OPAL_SSCV1_FEATURE_DESCRIPTOR OpalSscV1
;
239 OPAL_SSCV2_FEATURE_DESCRIPTOR OpalSscV2
;
240 OPAL_SSCLITE_FEATURE_DESCRIPTOR OpalSscLite
;
241 PYRITE_SSC_FEATURE_DESCRIPTOR PyriteSsc
;
242 PYRITE_SSCV2_FEATURE_DESCRIPTOR PyriteSscV2
;
243 TCG_BLOCK_SID_FEATURE_DESCRIPTOR BlockSid
;
244 DATA_REMOVAL_FEATURE_DESCRIPTOR DataRemoval
;
245 } OPAL_LEVEL0_FEATURE_DESCRIPTOR
;