sec/intel/txt: Allow skipping ACM NOP function
This is merely used to test whether the BIOS ACM calling code is working properly. There's no need to do this on production platforms. Testing on Haswell showed that running this NOP function breaks S3 resume with TXT. Add a Kconfig bool to control whether the NOP function is to be invoked. Change-Id: Ibf461c18a96f1add7867e1320726fadec65b7184 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46496 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
parent
c037695c19
commit
8a285fd8a5
|
@ -40,6 +40,12 @@ config INTEL_TXT_DPR_SIZE
|
||||||
the MRC does not have an input to specify the size of DPR, so this
|
the MRC does not have an input to specify the size of DPR, so this
|
||||||
field is only used to check if the programmed size is large enough.
|
field is only used to check if the programmed size is large enough.
|
||||||
|
|
||||||
|
config INTEL_TXT_TEST_BIOS_ACM_CALLING_CODE
|
||||||
|
bool "Test BIOS ACM calling code with NOP function"
|
||||||
|
help
|
||||||
|
Run a NOP function of the BIOS ACM to check that the ACM calling code
|
||||||
|
is functioning properly. Use in pre-production environments only!
|
||||||
|
|
||||||
config INTEL_TXT_LOGGING
|
config INTEL_TXT_LOGGING
|
||||||
bool "Enable verbose logging"
|
bool "Enable verbose logging"
|
||||||
help
|
help
|
||||||
|
|
|
@ -151,6 +151,7 @@ static void init_intel_txt(void *unused)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CONFIG(INTEL_TXT_TEST_BIOS_ACM_CALLING_CODE)) {
|
||||||
printk(BIOS_INFO, "TEE-TXT: Testing BIOS ACM calling code...\n");
|
printk(BIOS_INFO, "TEE-TXT: Testing BIOS ACM calling code...\n");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -160,9 +161,11 @@ static void init_intel_txt(void *unused)
|
||||||
* Use special function "NOP" that does 'nothing'.
|
* Use special function "NOP" that does 'nothing'.
|
||||||
*/
|
*/
|
||||||
if (intel_txt_run_bios_acm(ACMINPUT_NOP) < 0) {
|
if (intel_txt_run_bios_acm(ACMINPUT_NOP) < 0) {
|
||||||
printk(BIOS_ERR, "TEE-TXT: Error calling BIOS ACM with NOP function.\n");
|
printk(BIOS_ERR,
|
||||||
|
"TEE-TXT: Error calling BIOS ACM with NOP function.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (status & (ACMSTS_BIOS_TRUSTED | ACMSTS_IBB_MEASURED)) {
|
if (status & (ACMSTS_BIOS_TRUSTED | ACMSTS_IBB_MEASURED)) {
|
||||||
log_ibb_measurements();
|
log_ibb_measurements();
|
||||||
|
|
Loading…
Reference in New Issue