depthcharge: introduce EC_EFS from coreboot
Introduce the EC_EFS option into vboot Kconfig,
set the option on appropriate devices, and check for
the option in order to set proper VBSD flags.
BUG=b:124141368, b:124192753, chromium:943511
TEST=Build and deploy to eve
TEST=/work/vboot/src/repohooks/pre-upload.py
BRANCH=none
Change-Id: I031c73ac060f6695a3fcfc521c3d7b15e1fa533d
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1523248
Commit-Ready: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
diff --git a/board/fizz/defconfig b/board/fizz/defconfig
index c9e4088..f3f8264 100644
--- a/board/fizz/defconfig
+++ b/board/fizz/defconfig
@@ -9,6 +9,7 @@
# Vboot
CONFIG_EC_SOFTWARE_SYNC=y
+CONFIG_EC_EFS=y
CONFIG_VIRTUAL_DEV_SWITCH=y
CONFIG_CROSSYSTEM_ACPI=y
CONFIG_NV_STORAGE_CMOS=y
diff --git a/src/vboot/Kconfig b/src/vboot/Kconfig
index 73bb2ab..13dc1d7 100644
--- a/src/vboot/Kconfig
+++ b/src/vboot/Kconfig
@@ -38,6 +38,15 @@
firmware similar to how vboot verifies the main system firmware. This
option selects whether depthcharge should support EC software sync.
+config EC_EFS
+ bool
+ default n
+ depends on EC_SOFTWARE_SYNC
+ help
+ CrosEC can support EFS: Early Firmware Selection. If it's enabled,
+ software sync need to also support it. This setting tells vboot to
+ perform EFS software sync.
+
config VIRTUAL_DEV_SWITCH
bool "Virtual developer switch support"
default n
diff --git a/src/vboot/main.c b/src/vboot/main.c
index ebdcb72..b4f6e8f 100644
--- a/src/vboot/main.c
+++ b/src/vboot/main.c
@@ -72,6 +72,9 @@
if (!flag_fetch(FLAG_LIDSW))
vb_sd->flags |= VBSD_NOFAIL_BOOT;
+ if (IS_ENABLED(CONFIG_EC_EFS))
+ vb_sd->flags |= VBSD_EC_EFS;
+
return 0;
}