coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
tss_structures.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 
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_
9 
10 #include <stdint.h>
11 #include "../common/tss_common.h"
12 
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
16 
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)
23 
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)
27 
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)
31 
32 typedef uint8_t TSS_BOOL;
34 
35 typedef struct tdTPM_PERMANENT_FLAGS {
58 
59 typedef struct tdTPM_STCLEAR_FLAGS {
67 
68 #endif /* TCG1_TSS_STRUCTURES_H_ */
unsigned short uint16_t
Definition: stdint.h:11
unsigned char uint8_t
Definition: stdint.h:8
TSS_BOOL disableFullDALogicInfo
TSS_BOOL physicalPresenceLifetimeLock
TSS_BOOL physicalPresenceHWEnable
TSS_BOOL physicalPresenceCMDEnable
TPM_STRUCTURE_TAG tag
TSS_BOOL disableForceClear
TPM_STRUCTURE_TAG tag
TSS_BOOL physicalPresenceLock
struct tdTPM_STCLEAR_FLAGS TPM_STCLEAR_FLAGS
uint8_t TSS_BOOL
struct tdTPM_PERMANENT_FLAGS TPM_PERMANENT_FLAGS
uint16_t TPM_STRUCTURE_TAG