inteltool: Add support to print TME/MKTME status
Print whether the SOC supports TME/MKTME. If the SOC supports the feature, print the status of enable and lock bit from TME_ACTIVATE MSR. -t option prints this status. Sample output: If TME/MKTME is supported: ============= Dumping INTEL TME/MKTME status ============= TME supported : YES TME locked : YES TME enabled : YES ==================================================== If TME/MKTME is not supported: ============= Dumping INTEL TME status ============= TME supported : NO ==================================================== Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com> Change-Id: I584ac4b045ba80998d454283e02d3f28ef45692d Reviewed-on: https://review.coreboot.org/c/coreboot/+/45088 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
committed by
Patrick Georgi
parent
41220cd245
commit
1e67816961
@ -515,6 +515,7 @@ static void print_usage(const char *name)
|
||||
" -M | --msrs: dump CPU MSRs\n"
|
||||
" -A | --ambs: dump AMB registers\n"
|
||||
" -x | --sgx: dump SGX status\n"
|
||||
" -t | --tme: dump TME status\n"
|
||||
" -a | --all: dump all known (safe) registers\n"
|
||||
" --pcr=PORT_ID: dump all registers of a PCR port\n"
|
||||
" (may be specified max %d times)\n"
|
||||
@ -575,7 +576,7 @@ int main(int argc, char *argv[])
|
||||
int dump_gpios = 0, dump_mchbar = 0, dump_rcba = 0;
|
||||
int dump_pmbase = 0, dump_epbar = 0, dump_dmibar = 0;
|
||||
int dump_pciexbar = 0, dump_coremsrs = 0, dump_ambs = 0;
|
||||
int dump_spi = 0, dump_gfx = 0, dump_ahci = 0, dump_sgx = 0;
|
||||
int dump_spi = 0, dump_gfx = 0, dump_ahci = 0, dump_sgx = 0, dump_tme = 0;
|
||||
int dump_lpc = 0;
|
||||
int show_gpio_diffs = 0;
|
||||
size_t pcr_count = 0;
|
||||
@ -602,10 +603,11 @@ int main(int argc, char *argv[])
|
||||
{"ahci", 0, 0, 'R'},
|
||||
{"sgx", 0, 0, 'x'},
|
||||
{"pcr", required_argument, 0, LONG_OPT_PCR},
|
||||
{"tme", 0, 0, 't'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
while ((opt = getopt_long(argc, argv, "vh?gGrplmedPMaAsfRS:x",
|
||||
while ((opt = getopt_long(argc, argv, "vh?gGrplmedPMaAsfRS:xt",
|
||||
long_options, &option_index)) != EOF) {
|
||||
switch (opt) {
|
||||
case 'v':
|
||||
@ -667,6 +669,7 @@ int main(int argc, char *argv[])
|
||||
dump_spi = 1;
|
||||
dump_ahci = 1;
|
||||
dump_sgx = 1;
|
||||
dump_tme = 1;
|
||||
break;
|
||||
case 'A':
|
||||
dump_ambs = 1;
|
||||
@ -677,6 +680,9 @@ int main(int argc, char *argv[])
|
||||
case 'x':
|
||||
dump_sgx = 1;
|
||||
break;
|
||||
case 't':
|
||||
dump_tme = 1;
|
||||
break;
|
||||
case LONG_OPT_PCR:
|
||||
if (pcr_count < MAX_PCR_PORTS) {
|
||||
errno = 0;
|
||||
@ -869,6 +875,9 @@ int main(int argc, char *argv[])
|
||||
if (dump_sgx)
|
||||
print_sgx();
|
||||
|
||||
if (dump_tme)
|
||||
print_tme();
|
||||
|
||||
if (pcr_count)
|
||||
print_pcr_ports(sb, dump_pcr, pcr_count);
|
||||
|
||||
|
Reference in New Issue
Block a user