drivers/wifi: Remove unnecessary data structure copy
[coreboot2.git] / src / security / tpm / tss / tcg-1.2 / tss_structures.h
blob65b48f8f2e0fcc3ed04eb5247fcc8fd62f10b6b4
1 /* SPDX-License-Identifier: BSD-3-Clause */
3 /*
4 * Some TPM constants and type definitions for standalone compilation for use
5 * in the firmware
6 */
7 #ifndef TCG1_TSS_STRUCTURES_H_
8 #define TCG1_TSS_STRUCTURES_H_
10 #include <stdint.h>
11 #include <security/tpm/tss_errors.h>
13 #define TPM_MAX_COMMAND_SIZE 4096
14 #define TPM_LARGE_ENOUGH_COMMAND_SIZE 256 /* saves space in the firmware */
15 #define TPM_PUBEK_SIZE 256
17 #define TPM_NV_INDEX0 ((uint32_t)0x00000000)
18 #define TPM_NV_INDEX_LOCK ((uint32_t)0xffffffff)
19 #define TPM_NV_PER_GLOBALLOCK (((uint32_t)1)<<15)
20 #define TPM_NV_PER_PPWRITE (((uint32_t)1)<<0)
21 #define TPM_NV_PER_READ_STCLEAR (((uint32_t)1)<<31)
22 #define TPM_NV_PER_WRITE_STCLEAR (((uint32_t)1)<<14)
24 #define TPM_TAG_RQU_COMMAND ((uint16_t)0xc1)
25 #define TPM_TAG_RQU_AUTH1_COMMAND ((uint16_t)0xc2)
26 #define TPM_TAG_RQU_AUTH2_COMMAND ((uint16_t)0xc3)
28 #define TPM_TAG_RSP_COMMAND ((uint16_t)0xc4)
29 #define TPM_TAG_RSP_AUTH1_COMMAND ((uint16_t)0xc5)
30 #define TPM_TAG_RSP_AUTH2_COMMAND ((uint16_t)0xc6)
32 typedef uint8_t TSS_BOOL;
33 typedef uint16_t TPM_STRUCTURE_TAG;
35 typedef struct tdTPM_PERMANENT_FLAGS {
36 TPM_STRUCTURE_TAG tag;
37 TSS_BOOL disable;
38 TSS_BOOL ownership;
39 TSS_BOOL deactivated;
40 TSS_BOOL readPubek;
41 TSS_BOOL disableOwnerClear;
42 TSS_BOOL allowMaintenance;
43 TSS_BOOL physicalPresenceLifetimeLock;
44 TSS_BOOL physicalPresenceHWEnable;
45 TSS_BOOL physicalPresenceCMDEnable;
46 TSS_BOOL CEKPUsed;
47 TSS_BOOL TPMpost;
48 TSS_BOOL TPMpostLock;
49 TSS_BOOL FIPS;
50 TSS_BOOL Operator;
51 TSS_BOOL enableRevokeEK;
52 TSS_BOOL nvLocked;
53 TSS_BOOL readSRKPub;
54 TSS_BOOL tpmEstablished;
55 TSS_BOOL maintenanceDone;
56 TSS_BOOL disableFullDALogicInfo;
57 } TPM_PERMANENT_FLAGS;
59 typedef struct tdTPM_STCLEAR_FLAGS {
60 TPM_STRUCTURE_TAG tag;
61 TSS_BOOL deactivated;
62 TSS_BOOL disableForceClear;
63 TSS_BOOL physicalPresence;
64 TSS_BOOL physicalPresenceLock;
65 TSS_BOOL bGlobalLock;
66 } TPM_STCLEAR_FLAGS;
68 #endif /* TCG1_TSS_STRUCTURES_H_ */