Joel Kitching has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33386
Change subject: vboot: use vboot2 API to set initial secdatak value
......................................................................
vboot: use vboot2 API to set initial secdatak value
Previously, the initial value for secdatak was embedded
in secdata_tpm.c as a uint8_t array. Switch to using
vb2api_secdatak_create instead, and write the value in
ctx->secdatak.
Remove an unnecessary call to vb2api_secdata_create in
_factory_initialize_tpm.
BUG=b:124141368
TEST=make clean && make test-abuild
BRANCH=none
Change-Id: I74261453df6cc55ef3f38d8fb922bcc604084c0a
Signed-off-by: Joel Kitching <kitching(a)google.com>
---
M src/security/vboot/secdata_tpm.c
1 file changed, 9 insertions(+), 21 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/86/33386/1
diff --git a/src/security/vboot/secdata_tpm.c b/src/security/vboot/secdata_tpm.c
index 39cd614..ff62185 100644
--- a/src/security/vboot/secdata_tpm.c
+++ b/src/security/vboot/secdata_tpm.c
@@ -149,18 +149,6 @@
}
/*
- * This is derived from rollback_index.h of vboot_reference. see struct
- * RollbackSpaceKernel for details.
- */
-static const uint8_t secdata_kernel[] = {
- 0x02,
- 0x4C, 0x57, 0x52, 0x47,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00,
- 0xE8,
-};
-
-/*
* This is used to initialize the TPM space for recovery hash after defining
* it. Since there is no data available to calculate hash at the point where TPM
* space is defined, initialize it to all 0s.
@@ -241,7 +229,7 @@
static uint32_t set_kernel_space(const void *kernel_blob)
{
return set_space("kernel", KERNEL_NV_INDEX, kernel_blob,
- sizeof(secdata_kernel), rw_space_attributes, NULL, 0);
+ VB2_SECDATAK_SIZE, rw_space_attributes, NULL, 0);
}
static uint32_t set_rec_hash_space(const uint8_t *data)
@@ -262,7 +250,7 @@
* indication that TPM factory initialization was successfully
* completed.
*/
- RETURN_ON_FAILURE(set_kernel_space(secdata_kernel));
+ RETURN_ON_FAILURE(set_kernel_space(ctx->secdatak));
if (CONFIG(VBOOT_HAS_REC_HASH_SPACE))
RETURN_ON_FAILURE(set_rec_hash_space(rec_hash_data));
@@ -366,16 +354,15 @@
VBDEBUG("TPM: Clearing owner\n");
RETURN_ON_FAILURE(tpm_clear_and_reenable());
- /* Define and initialize the kernel space */
+ /* Define and write secdatak kernel space. */
RETURN_ON_FAILURE(safe_define_space(KERNEL_NV_INDEX,
TPM_NV_PER_PPWRITE,
- sizeof(secdata_kernel)));
+ VB2_SECDATAK_SIZE));
RETURN_ON_FAILURE(write_secdata(KERNEL_NV_INDEX,
- secdata_kernel,
- sizeof(secdata_kernel)));
+ ctx->secdatak,
+ VB2_SECDATAK_SIZE));
- /* Defines and sets vb2 secdata space */
- vb2api_secdata_create(ctx);
+ /* Define and write secdata firmware space. */
RETURN_ON_FAILURE(safe_define_space(FIRMWARE_NV_INDEX,
TPM_NV_PER_GLOBALLOCK |
TPM_NV_PER_PPWRITE,
@@ -417,8 +404,9 @@
{
uint32_t result;
- /* Defines and sets vb2 secdata space */
+ /* Set initial values of secdata and secdatak spaces. */
vb2api_secdata_create(ctx);
+ vb2api_secdatak_create(ctx);
VBDEBUG("TPM: factory initialization\n");
--
To view, visit https://review.coreboot.org/c/coreboot/+/33386
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I74261453df6cc55ef3f38d8fb922bcc604084c0a
Gerrit-Change-Number: 33386
Gerrit-PatchSet: 1
Gerrit-Owner: Joel Kitching <kitching(a)google.com>
Gerrit-MessageType: newchange
Hello Chris Wang,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/34903
to review the following change.
Change subject: mb/google/kahlee/treeya: remove keyboard backlight support
......................................................................
mb/google/kahlee/treeya: remove keyboard backlight support
Treeya doesn't support the keyboard backlight.
BUG=b:135551210
BRANCH=grunt
TEST=emerge-grunt coreboot
Signed-off-by: Chris Wang <chris.wang(a)amd.corp-partner.google.com>
Change-Id: I02dfc77d3cb7ac00b3f10d577d92775db99c1bdf
---
M src/mainboard/google/kahlee/variants/treeya/include/variant/ec.h
1 file changed, 0 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/34903/1
diff --git a/src/mainboard/google/kahlee/variants/treeya/include/variant/ec.h b/src/mainboard/google/kahlee/variants/treeya/include/variant/ec.h
index 4a1c7fc..2d48018 100644
--- a/src/mainboard/google/kahlee/variants/treeya/include/variant/ec.h
+++ b/src/mainboard/google/kahlee/variants/treeya/include/variant/ec.h
@@ -15,9 +15,6 @@
#include <baseboard/ec.h>
-/* Enable EC backed Keyboard Backlight in ACPI */
-#define EC_ENABLE_KEYBOARD_BACKLIGHT
-
/* Enable Tablet switch */
#define EC_ENABLE_TBMC_DEVICE
--
To view, visit https://review.coreboot.org/c/coreboot/+/34903
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I02dfc77d3cb7ac00b3f10d577d92775db99c1bdf
Gerrit-Change-Number: 34903
Gerrit-PatchSet: 1
Gerrit-Owner: chris wang <Chris.Wang(a)amd.com>
Gerrit-Reviewer: Chris Wang <chris.wang(a)amd.corp-partner.google.com>
Gerrit-MessageType: newchange
Hello Chris Wang,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/34902
to review the following change.
Change subject: mb/google/kahlee/treeya: Use GPIO_10 for EC_SYNC_IRQ
......................................................................
mb/google/kahlee/treeya: Use GPIO_10 for EC_SYNC_IRQ
Use AGPIO 10 as the EC sync interrupt for MKBP events for sensor data.
Reference to Aleena project.
BUG=b:135551210
BRANCH=grunt
TEST=emerge-grunt coreboot
Signed-off-by: Chris Wang <chris.wang(a)amd.corp-partner.google.com>
Change-Id: Ie0b719ebce90710bca2109b7ff255e19329f9cac
---
M src/mainboard/google/kahlee/variants/treeya/include/variant/ec.h
M src/mainboard/google/kahlee/variants/treeya/include/variant/gpio.h
2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/02/34902/1
diff --git a/src/mainboard/google/kahlee/variants/treeya/include/variant/ec.h b/src/mainboard/google/kahlee/variants/treeya/include/variant/ec.h
index 73e07ae..4a1c7fc 100644
--- a/src/mainboard/google/kahlee/variants/treeya/include/variant/ec.h
+++ b/src/mainboard/google/kahlee/variants/treeya/include/variant/ec.h
@@ -20,3 +20,9 @@
/* Enable Tablet switch */
#define EC_ENABLE_TBMC_DEVICE
+
+/*
+ * Enable EC sync interrupt via GPIO controller, EC_SYNC_IRQ is defined in
+ * variant/gpio.h
+ */
+#define EC_ENABLE_SYNC_IRQ_GPIO
diff --git a/src/mainboard/google/kahlee/variants/treeya/include/variant/gpio.h b/src/mainboard/google/kahlee/variants/treeya/include/variant/gpio.h
index 5a6b540..3ddabb1 100644
--- a/src/mainboard/google/kahlee/variants/treeya/include/variant/gpio.h
+++ b/src/mainboard/google/kahlee/variants/treeya/include/variant/gpio.h
@@ -14,3 +14,6 @@
*/
#include <baseboard/gpio.h>
+
+/* EC sync irq is AGPIO 10 */
+#define EC_SYNC_IRQ 10
--
To view, visit https://review.coreboot.org/c/coreboot/+/34902
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie0b719ebce90710bca2109b7ff255e19329f9cac
Gerrit-Change-Number: 34902
Gerrit-PatchSet: 1
Gerrit-Owner: chris wang <Chris.Wang(a)amd.com>
Gerrit-Reviewer: Chris Wang <chris.wang(a)amd.corp-partner.google.com>
Gerrit-MessageType: newchange
Hello Chris Wang,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/34899
to review the following change.
Change subject: mb/google/kahlee/treeya: Add EC_ENABLE_TBMC_DEVICE
......................................................................
mb/google/kahlee/treeya: Add EC_ENABLE_TBMC_DEVICE
Enable ACPI TBMC notification on tablet mode change to support
convertible treeya devices.
BUG=b:135551210
BRANCH=grunt
TEST=emerge-grunt coreboot
Signed-off-by: Chris Wang <chris.wang(a)amd.corp-partner.google.com>
Change-Id: Id0618c8df66267b88008dc5057892de6b530629f
---
M src/mainboard/google/kahlee/variants/treeya/include/variant/ec.h
1 file changed, 18 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/34899/1
diff --git a/src/mainboard/google/kahlee/variants/treeya/include/variant/ec.h b/src/mainboard/google/kahlee/variants/treeya/include/variant/ec.h
index 96388ae..73e07ae 100644
--- a/src/mainboard/google/kahlee/variants/treeya/include/variant/ec.h
+++ b/src/mainboard/google/kahlee/variants/treeya/include/variant/ec.h
@@ -1,4 +1,22 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
#include <baseboard/ec.h>
/* Enable EC backed Keyboard Backlight in ACPI */
#define EC_ENABLE_KEYBOARD_BACKLIGHT
+
+/* Enable Tablet switch */
+#define EC_ENABLE_TBMC_DEVICE
--
To view, visit https://review.coreboot.org/c/coreboot/+/34899
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id0618c8df66267b88008dc5057892de6b530629f
Gerrit-Change-Number: 34899
Gerrit-PatchSet: 1
Gerrit-Owner: chris wang <Chris.Wang(a)amd.com>
Gerrit-Reviewer: Chris Wang <chris.wang(a)amd.corp-partner.google.com>
Gerrit-MessageType: newchange
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34227 )
Change subject: libpayload: usbmsc: Factor out usb_msc_force_init() function
......................................................................
Patch Set 3:
This change is ready for review.
--
To view, visit https://review.coreboot.org/c/coreboot/+/34227
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I50392128409cb2a879954f234149a5e3b060a229
Gerrit-Change-Number: 34227
Gerrit-PatchSet: 3
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Shelley Chen <shchen(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 21 Aug 2019 00:07:52 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment