Pratikkumar V Prajapati has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45088 )
Change subject: inteltool: Add support to print TME/MKTME status ......................................................................
Patch Set 6:
(4 comments)
https://review.coreboot.org/c/coreboot/+/45088/6/util/inteltool/cpu.c File util/inteltool/cpu.c:
https://review.coreboot.org/c/coreboot/+/45088/6/util/inteltool/cpu.c@228 PS6, Line 228:
remove blank line
Done
https://review.coreboot.org/c/coreboot/+/45088/6/util/inteltool/cpu.c@230 PS6, Line 230:
tab
Done
https://review.coreboot.org/c/coreboot/+/45088/6/util/inteltool/cpu.c@235 PS6, Line 235: msr_t data; : data = rdmsr_from_cpu(cpunum, IA32_TME_ACTIVATE);
if you could create a helper function then this two function can use mask alone
we want to print both lock and enable info separately. so i am not getting reason to create a helper function
https://review.coreboot.org/c/coreboot/+/45088/6/util/inteltool/cpu.c@256 PS6, Line 256: if (tme_supported) { : printf("TME locked : %s\n", is_tme_locked(0) ? "YES" : "NO"); : printf("TME enabled : %s\n", is_tme_enabled(0) ? "YES" : "NO"); : }
if (!tme_supported) […]
Then i have to print '====' line also, so below code would be same as existing. i think its better to keep existing code. its not creating nested if else and so it should be good.
int tme_supported = is_tme_supported();
printf("\n============= Dumping INTEL TME status =============\n");
printf("TME supported : %s\n", tme_supported ? "YES" : "NO");
if (!tme_supported) { printf("====================================================\n"); return; }
printf("TME locked : %s\n", is_tme_locked(0) ? "YES" : "NO"); printf("TME enabled : %s\n", is_tme_enabled(0) ? "YES" : "NO");