3 #ifndef SECURITY_INTEL_TXT_REGISTER_H_
4 #define SECURITY_INTEL_TXT_REGISTER_H_
14 #define TXT_BASE 0xfed30000UL
16 #define TXT_STS (TXT_BASE + 0)
17 #define TXT_ESTS (TXT_BASE + 8)
18 #define TXT_ESTS_TXT_RESET_STS (1 << 0)
23 #define TXT_ESTS_WAKE_ERROR_STS (1 << 6)
25 #define TXT_ERROR (TXT_BASE + 0x30)
26 #define ACMERROR_TXT_VALID (1ul << 31)
27 #define ACMERROR_TXT_EXTERNAL (1ul << 30)
29 #define ACMERROR_TXT_PROGRESS_SHIFT 16
30 #define ACMERROR_TXT_MINOR_SHIFT 15
31 #define ACMERROR_TXT_MAJOR_SHIFT 10
32 #define ACMERROR_TXT_CLASS_SHIFT 4
33 #define ACMERROR_TXT_TYPE_SHIFT 0
35 #define ACMERROR_TXT_PROGRESS_CODE (0xffull << ACMERROR_TXT_PROGRESS_SHIFT)
36 #define ACMERROR_TXT_MINOR_CODE (0x01ull << ACMERROR_TXT_MINOR_SHIFT)
37 #define ACMERROR_TXT_MAJOR_CODE (0x1full << ACMERROR_TXT_MAJOR_SHIFT)
38 #define ACMERROR_TXT_CLASS_CODE (0x3full << ACMERROR_TXT_CLASS_SHIFT)
39 #define ACMERROR_TXT_TYPE_CODE (0x0full << ACMERROR_TXT_TYPE_SHIFT)
41 #define ACMERROR_TXT_AC_MODULE_TYPE_BIOS 0
42 #define ACMERROR_TXT_AC_MODULE_TYPE_SINIT 1
44 #define TXT_ERROR_MASK (0x3ff << 0)
46 #define TXT_CMD_RESET (TXT_BASE + 0x38)
47 #define TXT_CMD_CLOSE_PRIVATE (TXT_BASE + 0x48)
50 #define TXT_SPAD (TXT_BASE + 0xa0)
51 #define ACMSTS_IBB_MEASURED (1ull << 63)
52 #define ACMSTS_VERIFICATION_ERROR (1ull << 62)
53 #define ACMSTS_BG_STARTUP_ERROR (1ull << 61)
54 #define ACMSTS_TXT_DISABLED (1ull << 60)
55 #define ACMSTS_BIOS_TRUSTED (1ull << 59)
56 #define ACMSTS_MEM_CLEAR_POWER_DOWN (1ull << 47)
57 #define ACMSTS_TXT_STARTUP_SUCCESS (1ull << 30)
59 #define TXT_VER_FSBIF (TXT_BASE + 0x100)
60 #define TXT_VER_PRODUCTION_FUSED (1ull << 31)
62 #define TXT_DIDVID (TXT_BASE + 0x110)
68 #define TXT_CAPABILITIES (TXT_BASE + 0x200)
69 #define TXT_CAPABILITIES_DPR (1ull << 26)
70 #define TXT_CAPABILITIES_PMRC (1ull << 19)
72 #define TXT_VER_QPIIF (TXT_BASE + 0x200)
74 #define TXT_SINIT_BASE (TXT_BASE + 0x270)
75 #define TXT_SINIT_SIZE (TXT_BASE + 0x278)
76 #define TXT_MLE_JOIN (TXT_BASE + 0x290)
78 #define TXT_HEAP_BASE (TXT_BASE + 0x300)
79 #define TXT_HEAP_SIZE (TXT_BASE + 0x308)
84 #define TXT_MSEG_BASE (TXT_BASE + 0x310)
85 #define TXT_MSEG_SIZE (TXT_BASE + 0x318)
91 #define TXT_BIOSACM_ERRORCODE (TXT_BASE + 0x328)
93 #define TXT_DPR (TXT_BASE + 0x330)
95 #define TXT_ACM_KEY_HASH (TXT_BASE + 0x400)
96 #define TXT_ACM_KEY_HASH_LEN 0x4
98 #define TXT_E2STS (TXT_BASE + 0x8f0)
99 #define TXT_E2STS_SECRET_STS (1ull << 1)
107 #define TPM_BASE 0xfed40000UL
109 #define TPM_ACCESS_REG (TPM_BASE + 0x00)
116 #define TXT_PRIVATE_SPACE 0xfed20000UL
117 #define TXT_PUBLIC_SPACE 0xfed30000UL
118 #define TXT_TPM_DECODE_AREA 0xfed40000UL
119 #define TXT_RESERVED_SPACE 0xfed50000UL
121 #define TXT_RESERVED_SPACE_SIZE 0x3ffff
124 #define ACMINPUT_SCLEAN 0
125 #define ACMINPUT_RESET_TPM_AUXILIARY_INDICIES 2
126 #define ACMINPUT_NOP 3
127 #define ACMINPUT_SCHECK 4
128 #define ACMINPUT_CLEAR_SECRETS 5
129 #define ACMINPUT_LOCK_CONFIG 6
137 #define IA32_GETSEC_CAPABILITIES 0
138 #define IA32_GETSEC_ENTERACCS 2
139 #define IA32_GETSEC_SENTER 4
140 #define IA32_GETSEC_SEXIT 5
141 #define IA32_GETSEC_PARAMETERS 6
142 #define IA32_GETSEC_SMCTRL 7
143 #define IA32_GETSEC_WAKEUP 8
145 #define GETSEC_PARAMS_TXT_EXT_CRTM_SUPPORT (1ul << 5)
146 #define GETSEC_PARAMS_TXT_EXT_MACHINE_CHECK (1ul << 6)
149 #define INTEL_ACM_VENDOR 0x00008086
151 #define ACM_FORMAT_FLAGS_PW 0x00000000
152 #define ACM_FORMAT_FLAGS_NPW (1 << 14)
153 #define ACM_FORMAT_FLAGS_DEBUG (1 << 15)
156 #define ACM_FORMAT_SIZE_64KB (64 * KiB / 4)
157 #define ACM_FORMAT_SIZE_128KB (128 * KiB / 4)
158 #define ACM_FORMAT_SIZE_256KB (256 * KiB / 4)
161 #define IA32_MCG_STATUS 0x17a
243 #define HEAP_EXTDATA_TYPE_END 0
244 #define HEAP_EXTDATA_TYPE_BIOS_SPEC_VER 1
245 #define HEAP_EXTDATA_TYPE_ACM 2
246 #define HEAP_EXTDATA_TYPE_CUSTOM 4
288 u8 extended_data_elements[0];
unsigned long long uint64_t
uint32_t os_sinit_data_ver
uint32_t no_logical_procs
uint32_t support_acpi_ppi
void txt_dump_regions(void)
void txt_dump_getsec_parameters(void)
void txt_dump_chipset_info(void)
Dump information about the chipset's TXT capabilities.
void txt_dump_acm_info(const struct acm_header_v0 *acm_header)
Dump information about the provided ACM.