Paul Menzel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38057 )
Change subject: security: Move TS_{START,END}_TPMINIT out of vboot
......................................................................
security: Move TS_{START,END}_TPMINIT out of vboot
These are generic timestamps, and not vboot specific. Therefore, move
them to `tpm_setup()`, so that these timestamps are added in all cases.
(vboot timestamps should be namespaced with VBOOT anyway.)
Change-Id: Ib1048f7b7a5903d186cdd750822b4bc8ea7dc665
Signed-off-by: Paul Menzel <pmenzel(a)molgen.mpg.de>
---
M src/security/tpm/tspi/tspi.c
M src/security/vboot/vboot_logic.c
2 files changed, 5 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/38057/1
diff --git a/src/security/tpm/tspi/tspi.c b/src/security/tpm/tspi/tspi.c
index 5fcf92d..9ca9f98 100644
--- a/src/security/tpm/tspi/tspi.c
+++ b/src/security/tpm/tspi/tspi.c
@@ -19,6 +19,7 @@
#include <console/console.h>
#include <security/tpm/tspi.h>
#include <security/tpm/tss.h>
+#include <timestamp.h>
#if CONFIG(VBOOT)
#include <vb2_api.h>
#include <vb2_sha.h>
@@ -127,6 +128,8 @@
{
uint32_t result;
+ timestamp_add_now(TS_START_TPMINIT);
+
result = tlcl_lib_init();
if (result != TPM_SUCCESS) {
printk(BIOS_ERR, "TPM: Can't initialize.\n");
@@ -174,6 +177,8 @@
result = tpm1_invoke_state_machine();
#endif
+ timestamp_add_now(TS_END_TPMINIT);
+
return tpm_setup_epilogue(result);
}
diff --git a/src/security/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c
index 1d17a17..c65ea3a 100644
--- a/src/security/vboot/vboot_logic.c
+++ b/src/security/vboot/vboot_logic.c
@@ -320,10 +320,8 @@
/* Read secdata from TPM. Initialize TPM if secdata not found. We don't
* check the return value here because vb2api_fw_phase1 will catch
* invalid secdata and tell us what to do (=reboot). */
- timestamp_add_now(TS_START_TPMINIT);
if (vboot_setup_tpm(ctx) == TPM_SUCCESS)
antirollback_read_space_firmware(ctx);
- timestamp_add_now(TS_END_TPMINIT);
/* Enable measured boot mode */
if (CONFIG(VBOOT_MEASURED_BOOT) &&
--
To view, visit https://review.coreboot.org/c/coreboot/+/38057
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib1048f7b7a5903d186cdd750822b4bc8ea7dc665
Gerrit-Change-Number: 38057
Gerrit-PatchSet: 1
Gerrit-Owner: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newchange
Maccraft123 has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38681 )
Change subject: mb/lenovo/x201: Kconfig option to disable Q50 ACPI Method
......................................................................
mb/lenovo/x201: Kconfig option to disable Q50 ACPI Method
Q50 Method can cause data loss in some circumstances,
therefore I think there should be Kconfig option to disable it.
EC triggers _Q50 when machine is docked and AC power supply is
removed. If OS hasn't unmounted drive that is connected via USB or
Ultrabay this behaviour causes data loss.
Change-Id: I522ff7769267c88125397b7df75d313d92d5622f
Signed-off-by: Maciej Matuszczyk <maccraft123mc(a)gmail.com>
---
M src/mainboard/lenovo/x201/Kconfig
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/38681/1
diff --git a/src/mainboard/lenovo/x201/Kconfig b/src/mainboard/lenovo/x201/Kconfig
index a94d24e..3e83bdc 100644
--- a/src/mainboard/lenovo/x201/Kconfig
+++ b/src/mainboard/lenovo/x201/Kconfig
@@ -42,6 +42,15 @@
string
default "src/mainboard/$(CONFIG_MAINBOARD_DIR)/vboot-rwa.fmd" if VBOOT
+config DISABLE_Q50
+ bool "Disable _Q50 ACPI Method"
+ default n
+ help
+ This option disabled _Q50 Method that causes undock on removal of
+ AC power adapter. This behaviour can cause data loss by disconnecting
+ Ultrabay device without unmounting it first.
+ This option also disables the undock button on X200 Ultrabase.
+
config MAINBOARD_DIR
string
default "lenovo/x201"
--
To view, visit https://review.coreboot.org/c/coreboot/+/38681
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I522ff7769267c88125397b7df75d313d92d5622f
Gerrit-Change-Number: 38681
Gerrit-PatchSet: 1
Gerrit-Owner: Maccraft123 <maccraft123mc(a)gmail.com>
Gerrit-MessageType: newchange