12 #define LOG(...) printk(BIOS_INFO, "CBnT: " __VA_ARGS__)
54 "Wrong size of cbnt_bootstatus");
77 "Wrong size of cbnt_errorcode");
103 "Wrong size of cbnt_biosacm_errorcode");
110 return "BIOS ACM Error";
112 return "SINIT ACM Error";
114 return "Boot Guard Error";
123 LOG(
"SACM INFO MSR (0x13A) raw: 0x%016llx\n", acm_info.
raw);
127 LOG(
" FACB: %u\n", acm_info.
facb);
137 LOG(
"BOOTSTATUS (0xA0) raw: 0x%016llx\n", btsts.
raw);
141 LOG(
" TXT ucode or ACM error: %u\n", btsts.
txt_err);
142 LOG(
" TXT measurement type 7: %u\n", btsts.
type7);
147 LOG(
"ERRORCODE (0x30) raw: 0x%08x\n", err.
raw);
149 const bool txt_err_valid = btsts.
txt_err ||
true;
152 LOG(
"ERRORCODE is ucode error\n");
156 LOG(
"ERRORCODE is SINIT error\n");
158 LOG(
" AC Module Type: %s\n",
type);
159 LOG(
" class: 0x%x\n", err.
sinit.class);
165 LOG(
"TXT disabled in Policy\n");
171 LOG(
"BIOSACM_ERRORCODE (0x328) raw: 0x%08x\n", biosacm_err.
raw);
172 if (txt_err_valid && biosacm_err.
txt.
valid) {
173 LOG(
"BIOSACM_ERRORCODE: TXT ucode or ACM error\n");
175 LOG(
" AC Module Type: %s\n",
type);
176 LOG(
" class: 0x%x\n", biosacm_err.
txt.class);
184 LOG(
"BIOSACM_ERRORCODE: Bootguard error\n");
186 LOG(
" AC Module Type: %s\n",
type);
187 LOG(
" class: 0x%x\n", biosacm_err.
btg.class);
191 LOG(
" BootPolicies: 0x%x\n", biosacm_err.
btg.
bp);
static const char * decode_err_type(uint8_t type)
_Static_assert(sizeof(union sacm_info)==sizeof(uint64_t), "Wrong size of sacm_info")
static const char *const tpm_type[]
void intel_cbnt_log_registers(void)
#define CBNT_BIOSACM_ERRORCODE
#define MSR_BOOT_GUARD_SACM_INFO
static __always_inline msr_t rdmsr(unsigned int index)
static __always_inline uint64_t read64p(const uintptr_t addr)
static __always_inline uint32_t read32p(const uintptr_t addr)
unsigned long long uint64_t
const char * intel_txt_processor_error_type(uint8_t type)
struct cbnt_biosacm_errorcode::@379 btg
struct cbnt_biosacm_errorcode::@378 txt
struct cbnt_errorcode::@377 sinit
struct cbnt_errorcode::@376 microcode