summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu-Ping Wu <yupingso@chromium.org>2020-01-02 17:00:00 +0800
committerCommit Bot <commit-bot@chromium.org>2020-01-09 09:31:55 +0000
commit400c1b75b9eee97ee2484ae7ba801fe852c7b828 (patch)
tree7967bda937498bb6ad281f5d0ba549e0afde6af5
parent3270d9b5b3859065743e1248c85d17fde33423c6 (diff)
downloadvboot-400c1b75b9eee97ee2484ae7ba801fe852c7b828.tar.gz
vboot: Deprecate VBSD_EC_EFS
Replace VbSharedDataHeader flag VBSD_EC_EFS with compile-time macro EC_EFS. BRANCH=none BUG=chromium:1038259 TEST=FEATURES=test emerge-nami vboot_reference Cq-Depend: chromium:1985550 Change-Id: I0c4dc9b096daf3343881df5bd4181b410979eb0d Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1985548 Reviewed-by: Joel Kitching <kitching@chromium.org>
-rw-r--r--Makefile7
-rw-r--r--firmware/include/vboot_struct.h5
-rw-r--r--firmware/lib/vboot_api_kernel.c2
3 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index fe74fc00..d368e60f 100644
--- a/Makefile
+++ b/Makefile
@@ -197,6 +197,13 @@ else
CFLAGS += -DEC_SLOW_UPDATE=0
endif
+# Enable EC early firmware selection.
+ifneq ($(filter-out 0,${EC_EFS}),)
+CFLAGS += -DEC_EFS=1
+else
+CFLAGS += -DEC_EFS=0
+endif
+
# Some tests need to be disabled when using mocked_secdata_tpm.
ifneq (${MOCK_TPM},)
CFLAGS += -DMOCK_TPM
diff --git a/firmware/include/vboot_struct.h b/firmware/include/vboot_struct.h
index c63edb10..6334b99b 100644
--- a/firmware/include/vboot_struct.h
+++ b/firmware/include/vboot_struct.h
@@ -90,8 +90,9 @@ extern "C" {
#define VBSD_DEPRECATED_OPROM_LOADED 0x00020000
/* Don't try for boot failures */
#define VBSD_NOFAIL_BOOT 0x00040000
-/* VbInit() was told that the EC firmware supports EFS */
-#define VBSD_EC_EFS 0x00080000
+/* VbInit() was told that the EC firmware supports EFS
+ Deprecated as part of chromium:1038259 */
+#define VBSD_DEPRECATED_EC_EFS 0x00080000
/* NvStorage uses 64-byte record, not 16-byte */
#define VBSD_NVDATA_V2 0x00100000
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
index 1e15e309..46c268a8 100644
--- a/firmware/lib/vboot_api_kernel.c
+++ b/firmware/lib/vboot_api_kernel.c
@@ -247,7 +247,7 @@ static vb2_error_t vb2_kernel_setup(struct vb2_context *ctx,
ctx->flags |= VB2_CONTEXT_EC_SYNC_SUPPORTED;
if (EC_SLOW_UPDATE)
ctx->flags |= VB2_CONTEXT_EC_SYNC_SLOW;
- if (shared->flags & VBSD_EC_EFS)
+ if (EC_EFS)
ctx->flags |= VB2_CONTEXT_EC_EFS;
if (shared->flags & VBSD_NVDATA_V2)
ctx->flags |= VB2_CONTEXT_NVDATA_V2;