diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2021-02-02 19:21:24 +0100 |
---|---|---|
committer | Angel Pons <th3fanbus@gmail.com> | 2021-05-20 16:22:11 +0000 |
commit | 9d8a4558e30845ff9ae421c551b4fa51dcfeec93 (patch) | |
tree | 8def4a1cf685ea2526136d3615238629b5628841 /src/soc/intel/xeon_sp | |
parent | 8c6ee91fcd610db197167310a660cc451c764f55 (diff) |
soc/intel/xeon_sp: Skip locking down TXT related registers
When locking down TXT is skipped, e.g. to do error injection, locking
down DMI3 and IIO DFX related TXT registers should also be skipped.
Change-Id: Ieef25c02ec103eaef65d8b44467ccb9e6917bb6c
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50238
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
Reviewed-by: Rocky Phagura
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/xeon_sp')
-rw-r--r-- | src/soc/intel/xeon_sp/uncore.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/soc/intel/xeon_sp/uncore.c b/src/soc/intel/xeon_sp/uncore.c index dede931fe0..4f509809d7 100644 --- a/src/soc/intel/xeon_sp/uncore.c +++ b/src/soc/intel/xeon_sp/uncore.c @@ -12,6 +12,7 @@ #include <soc/util.h> #include <fsp/util.h> #include <security/intel/txt/txt_platform.h> +#include <security/intel/txt/txt.h> struct map_entry { uint32_t reg; @@ -350,6 +351,8 @@ static const struct pci_driver vtd_driver __pci_driver = { static void dmi3_init(struct device *dev) { + if (CONFIG(INTEL_TXT) && skip_intel_txt_lockdown()) + return; /* Disable error injection */ pci_or_config16(dev, ERRINJCON, 1 << 0); @@ -376,6 +379,9 @@ static const struct pci_driver dmi3_driver __pci_driver = { static void iio_dfx_global_init(struct device *dev) { + if (CONFIG(INTEL_TXT) && skip_intel_txt_lockdown()) + return; + uint16_t reg16; pci_or_config16(dev, IIO_DFX_LCK_CTL, 0x3ff); reg16 = pci_read_config16(dev, IIO_DFX_TSWCTL0); |