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>
This commit is contained in:
Arthur Heymans 2021-02-02 19:21:24 +01:00 committed by Angel Pons
parent 8c6ee91fcd
commit 9d8a4558e3
1 changed files with 6 additions and 0 deletions

View File

@ -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);