Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46495 )
Change subject: sec/intel/txt/ramstage.c: Do not init the heap on S3 resume
......................................................................
sec/intel/txt/ramstage.c: Do not init the heap on S3 resume
It causes problems on Haswell: SINIT detects that the heap tables differ
in size, and then issues a Class Code 9, Major Error Code 1 TXT reset.
Change-Id: I26f3d291abc7b2263e0b115e94426ac6ec8e5c48
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M src/security/intel/txt/ramstage.c
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/95/46495/1
diff --git a/src/security/intel/txt/ramstage.c b/src/security/intel/txt/ramstage.c
index 2d56d1f..00e9ce7 100644
--- a/src/security/intel/txt/ramstage.c
+++ b/src/security/intel/txt/ramstage.c
@@ -407,7 +407,9 @@
write64((void *)TXT_MSEG_SIZE, 0);
write64((void *)TXT_MSEG_BASE, 0);
- txt_initialize_heap();
+ /* Only initialize the heap on regular boots */
+ if (!acpi_is_wakeup_s3())
+ txt_initialize_heap();
if (CONFIG(INTEL_TXT_LOGGING))
txt_dump_regions();
--
To view, visit https://review.coreboot.org/c/coreboot/+/46495
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I26f3d291abc7b2263e0b115e94426ac6ec8e5c48
Gerrit-Change-Number: 46495
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newchange
Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46492 )
Change subject: sec/intel/txt/common.c: Only log ACM error on failure
......................................................................
sec/intel/txt/common.c: Only log ACM error on failure
The TXT_BIOSACM_ERRORCODE register is only valid if bit 62 is set, or if
CBnT is supported and bit 61 is set. Moreover, it is specific to LT-SX.
This allows TXT to work on client platforms, where these registers are
regular scratchpads and are not necessarily written to by the BIOS ACM.
Change-Id: If047ad79f12de5e0f34227198ee742b9e2b5eb54
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M src/security/intel/txt/common.c
1 file changed, 0 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/46492/1
diff --git a/src/security/intel/txt/common.c b/src/security/intel/txt/common.c
index 5f8a976..737ab0a 100644
--- a/src/security/intel/txt/common.c
+++ b/src/security/intel/txt/common.c
@@ -303,8 +303,6 @@
intel_txt_log_acm_error(read32((void *)TXT_BIOSACM_ERRORCODE));
return -1;
}
- if (intel_txt_log_acm_error(read32((void *)TXT_BIOSACM_ERRORCODE)) != 1)
- return -1;
return 0;
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/46492
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If047ad79f12de5e0f34227198ee742b9e2b5eb54
Gerrit-Change-Number: 46492
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newchange
Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46491 )
Change subject: sec/intel/txt: Move DPR size to Kconfig
......................................................................
sec/intel/txt: Move DPR size to Kconfig
Instead of hardcoding the size in code, expose it as a Kconfig symbol.
This allows platform code to program the size in the MCH DPR register.
Change-Id: I9b9bcfc7ceefea6882f8133a6c3755da2e64a80c
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M src/security/intel/txt/Kconfig
M src/security/intel/txt/ramstage.c
2 files changed, 10 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/46491/1
diff --git a/src/security/intel/txt/Kconfig b/src/security/intel/txt/Kconfig
index 3dd912e..c69a217 100644
--- a/src/security/intel/txt/Kconfig
+++ b/src/security/intel/txt/Kconfig
@@ -31,6 +31,15 @@
access to Intel resources. Or for some platforms found inside the
blob repository.
+config INTEL_TXT_DPR_SIZE
+ int "DMA Protected Region size in MiB"
+ range 0 255
+ default 3
+ help
+ Specify the size the DPR region needs to have. On at least Haswell,
+ 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.
+
config INTEL_TXT_LOGGING
bool "Enable verbose logging"
help
diff --git a/src/security/intel/txt/ramstage.c b/src/security/intel/txt/ramstage.c
index f532a2f..8d9f5d9 100644
--- a/src/security/intel/txt/ramstage.c
+++ b/src/security/intel/txt/ramstage.c
@@ -254,7 +254,7 @@
return;
}
- if (dpr.size < 3) {
+ if (dpr.size < CONFIG_INTEL_TXT_DPR_SIZE) {
printk(BIOS_ERR, "TEE-TXT: MCH DPR configured size is too small.\n");
return;
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/46491
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9b9bcfc7ceefea6882f8133a6c3755da2e64a80c
Gerrit-Change-Number: 46491
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newchange
Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46489 )
Change subject: configs: Add TXT-enabled config for Asrock B85M Pro4
......................................................................
configs: Add TXT-enabled config for Asrock B85M Pro4
This config selects the necessary options to enable Intel TXT on the
Asrock B85M Pro4, and allows the code to be build-tested. Note that the
current TXT code will not work, as it was written for Broadwell-DE.
Subsequent commits will adapt the code as necessary to work on Haswell.
Compatible BIOS and SINIT ACMs can be retrieved from a firmware update
for the Supermicro X10SLH. As they are not in the blobs repository, use
the STM binary as a placeholder so as to allow build-testing the code.
Change-Id: Ibf8db5fdfac5b527520023277c6370f6efa71717
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
A configs/config.asrock_b85m_pro4.tpm2_txt_placeholder_acms
1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/46489/1
diff --git a/configs/config.asrock_b85m_pro4.tpm2_txt_placeholder_acms b/configs/config.asrock_b85m_pro4.tpm2_txt_placeholder_acms
new file mode 100644
index 0000000..856701f
--- /dev/null
+++ b/configs/config.asrock_b85m_pro4.tpm2_txt_placeholder_acms
@@ -0,0 +1,10 @@
+# Known-working configuration to boot with TXT enabled. Since BIOS
+# and SINIT ACM blobs are missing, use something else as placeholder.
+# Used ACMs were extracted from a Supermicro X10SLH firmware update.
+CONFIG_VENDOR_ASROCK=y
+CONFIG_BOARD_ASROCK_B85M_PRO4=y
+CONFIG_USER_TPM2=y
+CONFIG_INTEL_TXT=y
+CONFIG_INTEL_TXT_BIOSACM_FILE="3rdparty/blobs/cpu/intel/stm/stm.bin"
+CONFIG_INTEL_TXT_SINITACM_FILE="3rdparty/blobs/cpu/intel/stm/stm.bin"
+CONFIG_INTEL_TXT_LOGGING=y
--
To view, visit https://review.coreboot.org/c/coreboot/+/46489
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibf8db5fdfac5b527520023277c6370f6efa71717
Gerrit-Change-Number: 46489
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newchange
Karthik Ramasubramanian has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46653 )
Change subject: Revert "soc/intel/jasperlake: Allow mainboard to override chip configuration"
......................................................................
Set Ready For Review
--
To view, visit https://review.coreboot.org/c/coreboot/+/46653
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I166ba7e5ee50a6329032eae8e17b9a554b094e2e
Gerrit-Change-Number: 46653
Gerrit-PatchSet: 2
Gerrit-Owner: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Thu, 22 Oct 2020 19:47:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Karthik Ramasubramanian has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46652 )
Change subject: Revert "mb/google/dedede: Add mainboard acpi support for GPIO PM configuration"
......................................................................
Set Ready For Review
--
To view, visit https://review.coreboot.org/c/coreboot/+/46652
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I8e3be42cd82fd3ae919d23d6f19c84a90b9c737a
Gerrit-Change-Number: 46652
Gerrit-PatchSet: 2
Gerrit-Owner: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Thu, 22 Oct 2020 19:47:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Hello Martin Roth, Marc Jones, Johnny Lin, Angel Pons,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/45771
to review the following change.
Change subject: [RFC] console/init: Drop get_console_loglevel() API
......................................................................
[RFC] console/init: Drop get_console_loglevel() API
It's not used anymore. We keep the CONSOLE_OVERRIDE_LOGLEVEL Kconfig,
though, as it provides some user Kconfig comfort (we can hide unneces-
sary prompts).
Change-Id: Id6dd54534267c5419cbe81ee4b66f7b753a6e6cf
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M src/console/Kconfig
M src/console/init.c
M src/include/console/console.h
3 files changed, 4 insertions(+), 15 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/45771/1
diff --git a/src/console/Kconfig b/src/console/Kconfig
index bad6c56..57b932d 100644
--- a/src/console/Kconfig
+++ b/src/console/Kconfig
@@ -312,8 +312,9 @@
config CONSOLE_OVERRIDE_LOGLEVEL
bool
help
- Set to "y" when the platform overrides the loglevel by providing
- a get_console_loglevel routine.
+ Set to "y" when the platform unconditionally overrides the
+ loglevel default. Then we don't need to present the choice
+ below.
if !CONSOLE_OVERRIDE_LOGLEVEL
diff --git a/src/console/init.c b/src/console/init.c
index 9776e2a..2be2e5a 100644
--- a/src/console/init.c
+++ b/src/console/init.c
@@ -21,7 +21,7 @@
static void init_log_level(void)
{
- int debug_level = get_console_loglevel();
+ int debug_level = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
get_option(&debug_level, "debug_level");
diff --git a/src/include/console/console.h b/src/include/console/console.h
index a96eb15..bb19cb7 100644
--- a/src/include/console/console.h
+++ b/src/include/console/console.h
@@ -49,18 +49,6 @@
enum { CONSOLE_LOG_NONE = 0, CONSOLE_LOG_FAST, CONSOLE_LOG_ALL };
-#if CONFIG(CONSOLE_OVERRIDE_LOGLEVEL)
-/*
- * This function should be implemented at mainboard level.
- * The returned value will _replace_ the loglevel value;
- */
-int get_console_loglevel(void);
-#else
-static inline int get_console_loglevel(void)
-{
- return CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
-}
-#endif
#else
static inline void console_init(void) {}
static inline int console_log_level(int msg_level) { return 0; }
--
To view, visit https://review.coreboot.org/c/coreboot/+/45771
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id6dd54534267c5419cbe81ee4b66f7b753a6e6cf
Gerrit-Change-Number: 45771
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Johnny Lin <Johnny_Lin(a)wiwynn.com>
Gerrit-Reviewer: Marc Jones <marc.jones(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-MessageType: newchange