60 return success && eax & 1;
66 if (!
CONFIG(INTEL_TXT_LOGGING))
69 printk(
BIOS_EMERG,
"FATAL: Cannot run SCLEAN. Memory will remain locked.\n");
109 if (
CONFIG(INTEL_TXT_LOGGING)) {
112 establishment ?
"true" :
"false");
115 if (establishment && is_wake_error) {
117 printk(
BIOS_ERR,
"TEE-TXT: Secrets remain in memory. SCLEAN is required.\n");
120 printk(
BIOS_ERR,
"TEE-TXT: TXT_RESET bit set, doing global reset!\n");
133 die(
"Could not execute BIOS ACM to unlock the memory.\n");
static uint8_t read8(const void *addr)
#define printk(level,...)
void __noreturn die(const char *fmt,...)
uint32_t cpu_get_feature_flags_ecx(void)
static __always_inline void write_cr4(CRx_TYPE data)
static __always_inline CRx_TYPE read_cr4(void)
bool getsec_capabilities(uint32_t *eax)
Get capabilities as returned by getsec[CAPABILITIES].
static int stopwatch_expired(struct stopwatch *sw)
static void stopwatch_init_msecs_expire(struct stopwatch *sw, long ms)
#define BIOS_INFO
BIOS_INFO - Expected events.
#define BIOS_EMERG
BIOS_EMERG - Emergency / Fatal.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
u32 read_pmbase32(const u8 addr)
void write_pmbase32(const u8 addr, const u32 val)
void __noreturn txt_reset_platform(void)
void intel_txt_run_sclean(void)
void intel_txt_romstage_init(void)
static bool is_establishment_bit_asserted(void)
static void print_memory_is_locked(void)
static bool is_txt_chipset(void)
static bool is_txt_cpu(void)
@ TPM_ACCESS_ESTABLISHMENT
#define TXT_ESTS_WAKE_ERROR_STS
#define TXT_ESTS_TXT_RESET_STS