summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNamyoon Woo <namyoon@google.com>2021-05-12 11:01:03 -0700
committerCommit Bot <commit-bot@chromium.org>2021-06-16 21:51:26 +0000
commit5fdf0294794606773b2403b708e3947a45e7b666 (patch)
treed1929f86a1f20c181e7a1e0b4798886f48e742b1 /include
parent98e4da99997a020f8aba11b2cfc7edaf67376677 (diff)
downloadchrome-ec-5fdf0294794606773b2403b708e3947a45e7b666.tar.gz
cr50: support EC-EFS 2.1
This patch adds the codes that support EC-EFS 2.1. However, it is not enabled. EC-EFS 2.0 is still enabled as default. BUG=b:187953899 TEST=built cr50 image, and ran it on hatch with CONFIG_EC_EFS2_VERSION defined as 0 and 1 respectively. For both cases, CrOS booted good. Also checked CrOS recovery was done good with corrupted TPM secdata, and booted good at the end. > ec_comm corrupt > ecrst pulse Ran the unittest for both version as well. $ make run-ec_comm $ make run-ec_comm21 Signed-off-by: Namyoon Woo <namyoon@google.com> Change-Id: I7623fa56dd44a01002628685826105afe76e034f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2891925 Tested-by: Namyoon Woo <namyoon@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org> Commit-Queue: Namyoon Woo <namyoon@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/config.h6
-rw-r--r--include/vboot.h9
2 files changed, 10 insertions, 5 deletions
diff --git a/include/config.h b/include/config.h
index 7008774812..8f7abdec59 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1322,6 +1322,12 @@
#undef CONFIG_EC_EFS_SUPPORT
/*
+ * Version of EC-EFS: 0 (for 2.0) or 1 (for 2.1).
+ * This is for CR50 config only
+ */
+#undef CONFIG_EC_EFS2_VERSION
+
+/*
* Enable the experimental console.
*
* NOTE: If you enable this experimental console, you will need to run the
diff --git a/include/vboot.h b/include/vboot.h
index ba924508c7..a9eb8692ae 100644
--- a/include/vboot.h
+++ b/include/vboot.h
@@ -59,14 +59,13 @@ struct cr50_comm_packet {
#define CR50_COMM_ERROR_BAD_PAYLOAD CR50_COMM_RESPONSE(0x07)
#define CR50_COMM_ERROR_STRUCT_VERSION CR50_COMM_RESPONSE(0x08)
#define CR50_COMM_ERROR_NVMEM CR50_COMM_RESPONSE(0x09)
+#define CR50_COMM_ERROR_BAD_PARAM CR50_COMM_RESPONSE(0x0a)
-/*
- * BIT(0) : NO_BOOT flag
- * BIT(1) : RECOVERY flag
- */
enum ec_efs_boot_mode {
- EC_EFS_BOOT_MODE_NORMAL = 0x00,
+ EC_EFS_BOOT_MODE_NORMAL = 0x00, /* in 2.0 */
+ EC_EFS_BOOT_MODE_VERIFIED = 0x00, /* in 2.1 */
EC_EFS_BOOT_MODE_NO_BOOT = 0x01,
+ EC_EFS_BOOT_MODE_TRUSTED_RO = 0x02, /* in 2.1 */
/* boot_mode is uint8_t */
EC_EFS_BOOT_MODE_LIMIT = 255,