Changeset 91005 in vbox for trunk/include
- Timestamp:
- Aug 30, 2021 4:32:25 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 146645
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/formats/tpm.h
r90588 r91005 37 37 #include <iprt/string.h> 38 38 39 #pragma pack(1) 39 40 40 /** 41 41 * TPM request header (everything big endian). 42 42 */ 43 #pragma pack(1) 43 44 typedef struct TPMREQHDR 44 45 { … … 50 51 uint32_t u32Ordinal; 51 52 } TPMREQHDR; 53 #pragma pack() 52 54 AssertCompileSize(TPMREQHDR, 2 + 4 + 4); 53 55 /** Pointer to a TPM request header. */ … … 57 59 58 60 59 /** @name TPM request ordinals. 61 /** @name TPM 1.2 request tags 62 * @{ */ 63 /** Command with no authentication. */ 64 #define TPM_TAG_RQU_COMMAND UINT16_C(0x00c1) 65 /** An authenticated command with one authentication handle. */ 66 #define TPM_TAG_RQU_AUTH1_COMMAND UINT16_C(0x00c2) 67 /** An authenticated command with two authentication handles. */ 68 #define TPM_TAG_RQU_AUTH2_COMMAND UINT16_C(0x00c3) 69 /** @} */ 70 71 72 /** @name TPM 2.0 request/response tags 73 * @{ */ 74 /** Command with no associated session. */ 75 #define TPM2_ST_NO_SESSIONS UINT16_C(0x8001) 76 /** Command with an associated session. */ 77 #define TPM2_ST_SESSIONS UINT16_C(0x8002) 78 /** @} */ 79 80 81 /** @name TPM 1.2 request ordinals. 60 82 * @{ */ 61 83 /** Perform a full self test. */ … … 65 87 /** Return the test result. */ 66 88 #define TPM_ORD_GETTESTRESULT UINT32_C(84) 89 /** Get a capability. */ 90 #define TPM_ORD_GETCAPABILITY UINT32_C(101) 91 /** @} */ 92 93 94 /** @name TPM 2.0 command codes. 95 * @{ */ 96 /** Get a capability. */ 97 #define TPM2_CC_GET_CAPABILITY UINT32_C(378) 98 /** @} */ 99 100 101 /** @name Defines related to TPM_ORD_GETCAPABILITY. 102 * @{ */ 103 /** Return a TPM related property. */ 104 #define TPM_CAP_PROPERTY UINT32_C(5) 105 106 /** Returns the size of the input buffer. */ 107 #define TPM_CAP_PROP_INPUT_BUFFER UINT32_C(0x124) 108 109 /** 110 * TPM_ORD_GETCAPABILITY request. 111 */ 112 #pragma pack(1) 113 typedef struct TPMREQGETCAPABILITY 114 { 115 /** Request header. */ 116 TPMREQHDR Hdr; 117 /** The capability group to query. */ 118 uint32_t u32Cap; 119 /** Length of the capability. */ 120 uint32_t u32Length; 121 /** The sub capability to query. */ 122 uint32_t u32SubCap; 123 } TPMREQGETCAPABILITY; 124 #pragma pack() 125 /** Pointer to a TPM_ORD_GETCAPABILITY request. */ 126 typedef TPMREQGETCAPABILITY *PTPMREQGETCAPABILITY; 127 /** Pointer to a const TPM_ORD_GETCAPABILITY request. */ 128 typedef const TPMREQGETCAPABILITY *PCTPMREQGETCAPABILITY; 129 /** @} */ 130 131 132 /** @name Defines related to TPM2_CC_GET_CAPABILITY. 133 * @{ */ 134 /** Return a TPM related property. */ 135 #define TPM2_CAP_TPM_PROPERTIES UINT32_C(6) 136 137 /** Returns the size of the input buffer. */ 138 #define TPM2_PT_INPUT_BUFFER UINT32_C(0x10d) 139 140 /** 141 * TPM2_CC_GET_CAPABILITY request. 142 */ 143 #pragma pack(1) 144 typedef struct TPM2REQGETCAPABILITY 145 { 146 /** Request header. */ 147 TPMREQHDR Hdr; 148 /** The capability group to query. */ 149 uint32_t u32Cap; 150 /** Property to query. */ 151 uint32_t u32Property; 152 /** Number of values to return. */ 153 uint32_t u32Count; 154 } TPM2REQGETCAPABILITY; 155 #pragma pack() 156 /** Pointer to a TPM2_CC_GET_CAPABILITY request. */ 157 typedef TPM2REQGETCAPABILITY *PTPM2REQGETCAPABILITY; 158 /** Pointer to a const TPM2_CC_GET_CAPABILITY request. */ 159 typedef const TPM2REQGETCAPABILITY *PCTPM2REQGETCAPABILITY; 67 160 /** @} */ 68 161 … … 71 164 * TPM response header (everything big endian). 72 165 */ 166 #pragma pack(1) 73 167 typedef struct TPMRESPHDR 74 168 { … … 80 174 uint32_t u32ErrCode; 81 175 } TPMRESPHDR; 176 #pragma pack() 82 177 AssertCompileSize(TPMRESPHDR, 2 + 4 + 4); 83 178 /** Pointer to a TPM response header. */ … … 85 180 /** Pointer to a const TPM response header. */ 86 181 typedef const TPMRESPHDR *PCTPMRESPHDR; 182 183 184 /** @name TPM 1.2 response tags 185 * @{ */ 186 /** A response from a command with no authentication. */ 187 #define TPM_TAG_RSP_COMMAND UINT16_C(0x00c4) 188 /** An authenticated response with one authentication handle. */ 189 #define TPM_TAG_RSP_AUTH1_COMMAND UINT16_C(0x00c5) 190 /** An authenticated response with two authentication handles. */ 191 #define TPM_TAG_RSP_AUTH2_COMMAND UINT16_C(0x00c6) 192 /** @} */ 87 193 88 194 … … 158 264 159 265 /** 160 * Returns the re quest size of the given TPM requestheader.266 * Returns the response size included in the given TPM response header. 161 267 * 162 268 * @returns TPM response size in bytes. … … 172 278 173 279 /** 174 * Returns the request ordinal of the given TPM requestheader.280 * Returns the error code of the given TPM response header. 175 281 * 176 282 * @returns TPM response error code. … … 184 290 } 185 291 186 #pragma pack()187 188 292 #endif /* !IPRT_INCLUDED_formats_tpm_h */ 189 293
Note:
See TracChangeset
for help on using the changeset viewer.