diff options
author | Fabio Baltieri <fabiobaltieri@google.com> | 2021-02-05 19:03:15 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-05 21:59:18 +0000 |
commit | a419b3c01f7377d673ab6eaa80b28daddedd4d34 (patch) | |
tree | 7446b7de0ca746a837c87a97956a993453e2b464 | |
parent | aae5ec5caa8b19342893bfaef24ae82b96c9ae25 (diff) | |
download | chrome-ec-a419b3c01f7377d673ab6eaa80b28daddedd4d34.tar.gz |
zephyr: Kconfig: add an option for CONFIG_SYSTEM_UNLOCKED
Add a Kconfig and matching option for CONFIG_SYSTEM_UNLOCKED, default it
to enabled since that's how most boards are setup in ECOS.
BUG=b:177604307
BRANCH=none
TEST=build and run a Volteer P2
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: Ib85b134fd013654e6be6d758fe999a3e11a59594
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2679522
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
-rw-r--r-- | zephyr/Kconfig | 15 | ||||
-rw-r--r-- | zephyr/shim/include/config_chip.h | 5 |
2 files changed, 20 insertions, 0 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig index 5b8bfc1f56..4e825c878e 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -734,4 +734,19 @@ config PLATFORM_EC_VSTORE_SLOT_COUNT used only for recording a hash of the read-write AP firmware for checking on resume. For this, one slot is enough. +config PLATFORM_EC_SYSTEM_UNLOCKED + bool "System unlocked: allow dangerous commands while in development" + default y if PLATFORM_EC_BRINGUP + help + System should remain unlocked even if write protect is enabled. + + NOTE: This should ONLY be defined during bringup, and should never be + defined on a shipping / released platform. + + When defined, CBI allows ectool to reprogram all the fields. + Normally, it refuses to change certain fields. (e.g. board version, + OEM ID) + + Also, this enables PD in RO for TCPMv2. + endif # PLATFORM_EC diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index be86913b63..9e60b9e8e7 100644 --- a/zephyr/shim/include/config_chip.h +++ b/zephyr/shim/include/config_chip.h @@ -1000,4 +1000,9 @@ enum battery_type { #define CONFIG_SHA256_HW_ACCELERATE #endif +#undef CONFIG_SYSTEM_UNLOCKED +#ifdef CONFIG_PLATFORM_EC_SYSTEM_UNLOCKED +#define CONFIG_SYSTEM_UNLOCKED +#endif + #endif /* __CROS_EC_CONFIG_CHIP_H */ |