coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
txt_register.h File Reference
#include <types.h>
Include dependency graph for txt_register.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  dpr_register
 
struct  acm_header_v0
 
struct  acm_info_table
 
struct  txt_extended_data_element_header
 
struct  txt_bios_spec_ver_element
 
struct  txt_heap_acm_element1
 
struct  txt_heap_acm_element2
 
struct  txt_biosdataregion
 

Macros

#define TXT_BASE   0xfed30000UL
 
#define TXT_STS   (TXT_BASE + 0)
 
#define TXT_ESTS   (TXT_BASE + 8)
 
#define TXT_ESTS_TXT_RESET_STS   (1 << 0)
 
#define TXT_ESTS_WAKE_ERROR_STS   (1 << 6)
 
#define TXT_ERROR   (TXT_BASE + 0x30)
 
#define ACMERROR_TXT_VALID   (1ul << 31)
 
#define ACMERROR_TXT_EXTERNAL   (1ul << 30)
 
#define ACMERROR_TXT_PROGRESS_SHIFT   16
 
#define ACMERROR_TXT_MINOR_SHIFT   15
 
#define ACMERROR_TXT_MAJOR_SHIFT   10
 
#define ACMERROR_TXT_CLASS_SHIFT   4
 
#define ACMERROR_TXT_TYPE_SHIFT   0
 
#define ACMERROR_TXT_PROGRESS_CODE   (0xffull << ACMERROR_TXT_PROGRESS_SHIFT)
 
#define ACMERROR_TXT_MINOR_CODE   (0x01ull << ACMERROR_TXT_MINOR_SHIFT)
 
#define ACMERROR_TXT_MAJOR_CODE   (0x1full << ACMERROR_TXT_MAJOR_SHIFT)
 
#define ACMERROR_TXT_CLASS_CODE   (0x3full << ACMERROR_TXT_CLASS_SHIFT)
 
#define ACMERROR_TXT_TYPE_CODE   (0x0full << ACMERROR_TXT_TYPE_SHIFT)
 
#define ACMERROR_TXT_AC_MODULE_TYPE_BIOS   0
 
#define ACMERROR_TXT_AC_MODULE_TYPE_SINIT   1
 
#define TXT_ERROR_MASK   (0x3ff << 0)
 
#define TXT_CMD_RESET   (TXT_BASE + 0x38)
 
#define TXT_CMD_CLOSE_PRIVATE   (TXT_BASE + 0x48)
 
#define TXT_SPAD   (TXT_BASE + 0xa0)
 
#define ACMSTS_IBB_MEASURED   (1ull << 63)
 
#define ACMSTS_VERIFICATION_ERROR   (1ull << 62)
 
#define ACMSTS_BG_STARTUP_ERROR   (1ull << 61) /* CBnT platforms only */
 
#define ACMSTS_TXT_DISABLED   (1ull << 60) /* disabled by FIT type 0xA record */
 
#define ACMSTS_BIOS_TRUSTED   (1ull << 59)
 
#define ACMSTS_MEM_CLEAR_POWER_DOWN   (1ull << 47)
 
#define ACMSTS_TXT_STARTUP_SUCCESS   (1ull << 30)
 
#define TXT_VER_FSBIF   (TXT_BASE + 0x100)
 
#define TXT_VER_PRODUCTION_FUSED   (1ull << 31)
 
#define TXT_DIDVID   (TXT_BASE + 0x110)
 
#define TXT_CAPABILITIES   (TXT_BASE + 0x200)
 
#define TXT_CAPABILITIES_DPR   (1ull << 26)
 
#define TXT_CAPABILITIES_PMRC   (1ull << 19)
 
#define TXT_VER_QPIIF   (TXT_BASE + 0x200)
 
#define TXT_SINIT_BASE   (TXT_BASE + 0x270)
 
#define TXT_SINIT_SIZE   (TXT_BASE + 0x278)
 
#define TXT_MLE_JOIN   (TXT_BASE + 0x290)
 
#define TXT_HEAP_BASE   (TXT_BASE + 0x300)
 
#define TXT_HEAP_SIZE   (TXT_BASE + 0x308)
 
#define TXT_MSEG_BASE   (TXT_BASE + 0x310)
 
#define TXT_MSEG_SIZE   (TXT_BASE + 0x318)
 
#define TXT_BIOSACM_ERRORCODE   (TXT_BASE + 0x328)
 
#define TXT_DPR   (TXT_BASE + 0x330)
 
#define TXT_ACM_KEY_HASH   (TXT_BASE + 0x400)
 
#define TXT_ACM_KEY_HASH_LEN   0x4
 
#define TXT_E2STS   (TXT_BASE + 0x8f0)
 
#define TXT_E2STS_SECRET_STS   (1ull << 1)
 
#define TPM_BASE   0xfed40000UL
 
#define TPM_ACCESS_REG   (TPM_BASE + 0x00)
 
#define TXT_PRIVATE_SPACE   0xfed20000UL
 
#define TXT_PUBLIC_SPACE   0xfed30000UL
 
#define TXT_TPM_DECODE_AREA   0xfed40000UL
 
#define TXT_RESERVED_SPACE   0xfed50000UL
 
#define TXT_RESERVED_SPACE_SIZE   0x3ffff
 
#define ACMINPUT_SCLEAN   0
 
#define ACMINPUT_RESET_TPM_AUXILIARY_INDICIES   2
 
#define ACMINPUT_NOP   3
 
#define ACMINPUT_SCHECK   4
 
#define ACMINPUT_CLEAR_SECRETS   5
 
#define ACMINPUT_LOCK_CONFIG   6
 
#define IA32_GETSEC_CAPABILITIES   0
 
#define IA32_GETSEC_ENTERACCS   2
 
#define IA32_GETSEC_SENTER   4
 
#define IA32_GETSEC_SEXIT   5
 
#define IA32_GETSEC_PARAMETERS   6
 
#define IA32_GETSEC_SMCTRL   7
 
#define IA32_GETSEC_WAKEUP   8
 
#define GETSEC_PARAMS_TXT_EXT_CRTM_SUPPORT   (1ul << 5)
 
#define GETSEC_PARAMS_TXT_EXT_MACHINE_CHECK   (1ul << 6)
 
#define INTEL_ACM_VENDOR   0x00008086
 
#define ACM_FORMAT_FLAGS_PW   0x00000000
 
#define ACM_FORMAT_FLAGS_NPW   (1 << 14)
 
#define ACM_FORMAT_FLAGS_DEBUG   (1 << 15)
 
#define ACM_FORMAT_SIZE_64KB   (64 * KiB / 4)
 
#define ACM_FORMAT_SIZE_128KB   (128 * KiB / 4)
 
#define ACM_FORMAT_SIZE_256KB   (256 * KiB / 4)
 
#define IA32_MCG_STATUS   0x17a
 
#define HEAP_EXTDATA_TYPE_END   0
 
#define HEAP_EXTDATA_TYPE_BIOS_SPEC_VER   1
 
#define HEAP_EXTDATA_TYPE_ACM   2
 
#define HEAP_EXTDATA_TYPE_CUSTOM   4
 

Enumerations

enum  acm_module_type { CHIPSET_ACM = 2 }
 
enum  acm_module_sub_type { BIOS = 0 , SINIT = 1 }
 

Functions

void txt_dump_regions (void)
 
void txt_dump_chipset_info (void)
 Dump information about the chipset's TXT capabilities. More...
 
void txt_dump_acm_info (const struct acm_header_v0 *acm_header)
 Dump information about the provided ACM. More...
 
void txt_dump_getsec_parameters (void)
 

Macro Definition Documentation

◆ ACM_FORMAT_FLAGS_DEBUG

#define ACM_FORMAT_FLAGS_DEBUG   (1 << 15)

Definition at line 153 of file txt_register.h.

◆ ACM_FORMAT_FLAGS_NPW

#define ACM_FORMAT_FLAGS_NPW   (1 << 14)

Definition at line 152 of file txt_register.h.

◆ ACM_FORMAT_FLAGS_PW

#define ACM_FORMAT_FLAGS_PW   0x00000000

Definition at line 151 of file txt_register.h.

◆ ACM_FORMAT_SIZE_128KB

#define ACM_FORMAT_SIZE_128KB   (128 * KiB / 4)

Definition at line 157 of file txt_register.h.

◆ ACM_FORMAT_SIZE_256KB

#define ACM_FORMAT_SIZE_256KB   (256 * KiB / 4)

Definition at line 158 of file txt_register.h.

◆ ACM_FORMAT_SIZE_64KB

#define ACM_FORMAT_SIZE_64KB   (64 * KiB / 4)

Definition at line 156 of file txt_register.h.

◆ ACMERROR_TXT_AC_MODULE_TYPE_BIOS

#define ACMERROR_TXT_AC_MODULE_TYPE_BIOS   0

Definition at line 41 of file txt_register.h.

◆ ACMERROR_TXT_AC_MODULE_TYPE_SINIT

#define ACMERROR_TXT_AC_MODULE_TYPE_SINIT   1

Definition at line 42 of file txt_register.h.

◆ ACMERROR_TXT_CLASS_CODE

#define ACMERROR_TXT_CLASS_CODE   (0x3full << ACMERROR_TXT_CLASS_SHIFT)

Definition at line 38 of file txt_register.h.

◆ ACMERROR_TXT_CLASS_SHIFT

#define ACMERROR_TXT_CLASS_SHIFT   4

Definition at line 32 of file txt_register.h.

◆ ACMERROR_TXT_EXTERNAL

#define ACMERROR_TXT_EXTERNAL   (1ul << 30)

Definition at line 27 of file txt_register.h.

◆ ACMERROR_TXT_MAJOR_CODE

#define ACMERROR_TXT_MAJOR_CODE   (0x1full << ACMERROR_TXT_MAJOR_SHIFT)

Definition at line 37 of file txt_register.h.

◆ ACMERROR_TXT_MAJOR_SHIFT

#define ACMERROR_TXT_MAJOR_SHIFT   10

Definition at line 31 of file txt_register.h.

◆ ACMERROR_TXT_MINOR_CODE

#define ACMERROR_TXT_MINOR_CODE   (0x01ull << ACMERROR_TXT_MINOR_SHIFT)

Definition at line 36 of file txt_register.h.

◆ ACMERROR_TXT_MINOR_SHIFT

#define ACMERROR_TXT_MINOR_SHIFT   15

Definition at line 30 of file txt_register.h.

◆ ACMERROR_TXT_PROGRESS_CODE

#define ACMERROR_TXT_PROGRESS_CODE   (0xffull << ACMERROR_TXT_PROGRESS_SHIFT)

Definition at line 35 of file txt_register.h.

◆ ACMERROR_TXT_PROGRESS_SHIFT

#define ACMERROR_TXT_PROGRESS_SHIFT   16

Definition at line 29 of file txt_register.h.

◆ ACMERROR_TXT_TYPE_CODE

#define ACMERROR_TXT_TYPE_CODE   (0x0full << ACMERROR_TXT_TYPE_SHIFT)

Definition at line 39 of file txt_register.h.

◆ ACMERROR_TXT_TYPE_SHIFT

#define ACMERROR_TXT_TYPE_SHIFT   0

Definition at line 33 of file txt_register.h.

◆ ACMERROR_TXT_VALID

#define ACMERROR_TXT_VALID   (1ul << 31)

Definition at line 26 of file txt_register.h.

◆ ACMINPUT_CLEAR_SECRETS

#define ACMINPUT_CLEAR_SECRETS   5

Definition at line 128 of file txt_register.h.

◆ ACMINPUT_LOCK_CONFIG

#define ACMINPUT_LOCK_CONFIG   6

Definition at line 129 of file txt_register.h.

◆ ACMINPUT_NOP

#define ACMINPUT_NOP   3

Definition at line 126 of file txt_register.h.

◆ ACMINPUT_RESET_TPM_AUXILIARY_INDICIES

#define ACMINPUT_RESET_TPM_AUXILIARY_INDICIES   2

Definition at line 125 of file txt_register.h.

◆ ACMINPUT_SCHECK

#define ACMINPUT_SCHECK   4

Definition at line 127 of file txt_register.h.

◆ ACMINPUT_SCLEAN

#define ACMINPUT_SCLEAN   0

Definition at line 124 of file txt_register.h.

◆ ACMSTS_BG_STARTUP_ERROR

#define ACMSTS_BG_STARTUP_ERROR   (1ull << 61) /* CBnT platforms only */

Definition at line 53 of file txt_register.h.

◆ ACMSTS_BIOS_TRUSTED

#define ACMSTS_BIOS_TRUSTED   (1ull << 59)

Definition at line 55 of file txt_register.h.

◆ ACMSTS_IBB_MEASURED

#define ACMSTS_IBB_MEASURED   (1ull << 63)

Definition at line 51 of file txt_register.h.

◆ ACMSTS_MEM_CLEAR_POWER_DOWN

#define ACMSTS_MEM_CLEAR_POWER_DOWN   (1ull << 47)

Definition at line 56 of file txt_register.h.

◆ ACMSTS_TXT_DISABLED

#define ACMSTS_TXT_DISABLED   (1ull << 60) /* disabled by FIT type 0xA record */

Definition at line 54 of file txt_register.h.

◆ ACMSTS_TXT_STARTUP_SUCCESS

#define ACMSTS_TXT_STARTUP_SUCCESS   (1ull << 30)

Definition at line 57 of file txt_register.h.

◆ ACMSTS_VERIFICATION_ERROR

#define ACMSTS_VERIFICATION_ERROR   (1ull << 62)

Definition at line 52 of file txt_register.h.

◆ GETSEC_PARAMS_TXT_EXT_CRTM_SUPPORT

#define GETSEC_PARAMS_TXT_EXT_CRTM_SUPPORT   (1ul << 5)

Definition at line 145 of file txt_register.h.

◆ GETSEC_PARAMS_TXT_EXT_MACHINE_CHECK

#define GETSEC_PARAMS_TXT_EXT_MACHINE_CHECK   (1ul << 6)

Definition at line 146 of file txt_register.h.

◆ HEAP_EXTDATA_TYPE_ACM

#define HEAP_EXTDATA_TYPE_ACM   2

Definition at line 245 of file txt_register.h.

◆ HEAP_EXTDATA_TYPE_BIOS_SPEC_VER

#define HEAP_EXTDATA_TYPE_BIOS_SPEC_VER   1

Definition at line 244 of file txt_register.h.

◆ HEAP_EXTDATA_TYPE_CUSTOM

#define HEAP_EXTDATA_TYPE_CUSTOM   4

Definition at line 246 of file txt_register.h.

◆ HEAP_EXTDATA_TYPE_END

#define HEAP_EXTDATA_TYPE_END   0

Definition at line 243 of file txt_register.h.

◆ IA32_GETSEC_CAPABILITIES

#define IA32_GETSEC_CAPABILITIES   0

Definition at line 137 of file txt_register.h.

◆ IA32_GETSEC_ENTERACCS

#define IA32_GETSEC_ENTERACCS   2

Definition at line 138 of file txt_register.h.

◆ IA32_GETSEC_PARAMETERS

#define IA32_GETSEC_PARAMETERS   6

Definition at line 141 of file txt_register.h.

◆ IA32_GETSEC_SENTER

#define IA32_GETSEC_SENTER   4

Definition at line 139 of file txt_register.h.

◆ IA32_GETSEC_SEXIT

#define IA32_GETSEC_SEXIT   5

Definition at line 140 of file txt_register.h.

◆ IA32_GETSEC_SMCTRL

#define IA32_GETSEC_SMCTRL   7

Definition at line 142 of file txt_register.h.

◆ IA32_GETSEC_WAKEUP

#define IA32_GETSEC_WAKEUP   8

Definition at line 143 of file txt_register.h.

◆ IA32_MCG_STATUS

#define IA32_MCG_STATUS   0x17a

Definition at line 161 of file txt_register.h.

◆ INTEL_ACM_VENDOR

#define INTEL_ACM_VENDOR   0x00008086

Definition at line 149 of file txt_register.h.

◆ TPM_ACCESS_REG

#define TPM_ACCESS_REG   (TPM_BASE + 0x00)

Definition at line 109 of file txt_register.h.

◆ TPM_BASE

#define TPM_BASE   0xfed40000UL

Definition at line 107 of file txt_register.h.

◆ TXT_ACM_KEY_HASH

#define TXT_ACM_KEY_HASH   (TXT_BASE + 0x400)

Definition at line 95 of file txt_register.h.

◆ TXT_ACM_KEY_HASH_LEN

#define TXT_ACM_KEY_HASH_LEN   0x4

Definition at line 96 of file txt_register.h.

◆ TXT_BASE

#define TXT_BASE   0xfed30000UL

Definition at line 14 of file txt_register.h.

◆ TXT_BIOSACM_ERRORCODE

#define TXT_BIOSACM_ERRORCODE   (TXT_BASE + 0x328)

Definition at line 91 of file txt_register.h.

◆ TXT_CAPABILITIES

#define TXT_CAPABILITIES   (TXT_BASE + 0x200)

Definition at line 68 of file txt_register.h.

◆ TXT_CAPABILITIES_DPR

#define TXT_CAPABILITIES_DPR   (1ull << 26)

Definition at line 69 of file txt_register.h.

◆ TXT_CAPABILITIES_PMRC

#define TXT_CAPABILITIES_PMRC   (1ull << 19)

Definition at line 70 of file txt_register.h.

◆ TXT_CMD_CLOSE_PRIVATE

#define TXT_CMD_CLOSE_PRIVATE   (TXT_BASE + 0x48)

Definition at line 47 of file txt_register.h.

◆ TXT_CMD_RESET

#define TXT_CMD_RESET   (TXT_BASE + 0x38)

Definition at line 46 of file txt_register.h.

◆ TXT_DIDVID

#define TXT_DIDVID   (TXT_BASE + 0x110)

Definition at line 62 of file txt_register.h.

◆ TXT_DPR

#define TXT_DPR   (TXT_BASE + 0x330)

Definition at line 93 of file txt_register.h.

◆ TXT_E2STS

#define TXT_E2STS   (TXT_BASE + 0x8f0)

Definition at line 98 of file txt_register.h.

◆ TXT_E2STS_SECRET_STS

#define TXT_E2STS_SECRET_STS   (1ull << 1)

Definition at line 99 of file txt_register.h.

◆ TXT_ERROR

#define TXT_ERROR   (TXT_BASE + 0x30)

Definition at line 25 of file txt_register.h.

◆ TXT_ERROR_MASK

#define TXT_ERROR_MASK   (0x3ff << 0)

Definition at line 44 of file txt_register.h.

◆ TXT_ESTS

#define TXT_ESTS   (TXT_BASE + 8)

Definition at line 17 of file txt_register.h.

◆ TXT_ESTS_TXT_RESET_STS

#define TXT_ESTS_TXT_RESET_STS   (1 << 0)

Definition at line 18 of file txt_register.h.

◆ TXT_ESTS_WAKE_ERROR_STS

#define TXT_ESTS_WAKE_ERROR_STS   (1 << 6)

Definition at line 23 of file txt_register.h.

◆ TXT_HEAP_BASE

#define TXT_HEAP_BASE   (TXT_BASE + 0x300)

Definition at line 78 of file txt_register.h.

◆ TXT_HEAP_SIZE

#define TXT_HEAP_SIZE   (TXT_BASE + 0x308)

Definition at line 79 of file txt_register.h.

◆ TXT_MLE_JOIN

#define TXT_MLE_JOIN   (TXT_BASE + 0x290)

Definition at line 76 of file txt_register.h.

◆ TXT_MSEG_BASE

#define TXT_MSEG_BASE   (TXT_BASE + 0x310)

Definition at line 84 of file txt_register.h.

◆ TXT_MSEG_SIZE

#define TXT_MSEG_SIZE   (TXT_BASE + 0x318)

Definition at line 85 of file txt_register.h.

◆ TXT_PRIVATE_SPACE

#define TXT_PRIVATE_SPACE   0xfed20000UL

Definition at line 116 of file txt_register.h.

◆ TXT_PUBLIC_SPACE

#define TXT_PUBLIC_SPACE   0xfed30000UL

Definition at line 117 of file txt_register.h.

◆ TXT_RESERVED_SPACE

#define TXT_RESERVED_SPACE   0xfed50000UL

Definition at line 119 of file txt_register.h.

◆ TXT_RESERVED_SPACE_SIZE

#define TXT_RESERVED_SPACE_SIZE   0x3ffff

Definition at line 121 of file txt_register.h.

◆ TXT_SINIT_BASE

#define TXT_SINIT_BASE   (TXT_BASE + 0x270)

Definition at line 74 of file txt_register.h.

◆ TXT_SINIT_SIZE

#define TXT_SINIT_SIZE   (TXT_BASE + 0x278)

Definition at line 75 of file txt_register.h.

◆ TXT_SPAD

#define TXT_SPAD   (TXT_BASE + 0xa0)

Definition at line 50 of file txt_register.h.

◆ TXT_STS

#define TXT_STS   (TXT_BASE + 0)

Definition at line 16 of file txt_register.h.

◆ TXT_TPM_DECODE_AREA

#define TXT_TPM_DECODE_AREA   0xfed40000UL

Definition at line 118 of file txt_register.h.

◆ TXT_VER_FSBIF

#define TXT_VER_FSBIF   (TXT_BASE + 0x100)

Definition at line 59 of file txt_register.h.

◆ TXT_VER_PRODUCTION_FUSED

#define TXT_VER_PRODUCTION_FUSED   (1ull << 31)

Definition at line 60 of file txt_register.h.

◆ TXT_VER_QPIIF

#define TXT_VER_QPIIF   (TXT_BASE + 0x200)

Definition at line 72 of file txt_register.h.

Enumeration Type Documentation

◆ acm_module_sub_type

Enumerator
BIOS 
SINIT 

Definition at line 181 of file txt_register.h.

◆ acm_module_type

Enumerator
CHIPSET_ACM 

Definition at line 177 of file txt_register.h.

Function Documentation

◆ txt_dump_acm_info()

◆ txt_dump_chipset_info()

void txt_dump_chipset_info ( void  )

Dump information about the chipset's TXT capabilities.

Definition at line 177 of file logging.c.

References BIOS_INFO, intel_txt_chipset_is_production_fused(), printk, read32(), read64(), TXT_ACM_KEY_HASH, TXT_ACM_KEY_HASH_LEN, and TXT_DIDVID.

Referenced by init_intel_txt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ txt_dump_getsec_parameters()

void txt_dump_getsec_parameters ( void  )

Definition at line 225 of file logging.c.

References BIOS_DEBUG, BIOS_WARNING, getsec_parameter(), GETSEC_PARAMS_TXT_EXT_CRTM_SUPPORT, GETSEC_PARAMS_TXT_EXT_MACHINE_CHECK, and printk.

Referenced by intel_txt_prepare_txt_env().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ txt_dump_regions()

void txt_dump_regions ( void  )