From 00c766d9a10ad288f3a88840121ac140672fb8da Mon Sep 17 00:00:00 2001 From: Yuval Peress Date: Mon, 15 Feb 2021 22:45:03 -0700 Subject: zephyr: enable sysjump console command Enables the sysjump console command. With this enabled, it is now possible to run `sysjump RW` and `sysjump RO` in the EC console and jump between images. BRANCH=none BUG=b:167392037 TEST=build/flash volteer, then run `sysjump` commands followed by both `sysinfo` and `version`. Signed-off-by: Yuval Peress Change-Id: If984ca6b78b01f6884f551c8af730632c340828f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2695958 --- zephyr/Kconfig | 12 ++++++++++++ zephyr/shim/include/config_chip.h | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/zephyr/Kconfig b/zephyr/Kconfig index 43a1919f80..76656db3e7 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -360,6 +360,18 @@ config PLATFORM_EC_CONSOLE_CMD_FLASH flashwp - change write-protection settings flashwrite - write memory to flash +config PLATFORM_EC_CONSOLE_CMD_SYSJUMP + bool "Console command: sysjump" + default y + help + Enables the sysjump console command used for testing and verifying + that we're able to jump between images. Normally, in an EC build, + there will exist 2 images (sometimes more): read-only (RO) and + read-write (RW). This console command allows us to manually jump + between the various images (or even to a random starting address) by + copying the image data from flash to ram, then jumping to the image's + entry point. + config PLATFORM_EC_EXTERNAL_STORAGE bool "Flash is stored external to the EC" default y if SOC_FAMILY_NPCX diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index 4298c5651d..fbc7689c34 100644 --- a/zephyr/shim/include/config_chip.h +++ b/zephyr/shim/include/config_chip.h @@ -1134,4 +1134,9 @@ enum battery_type { #define CONFIG_MPU #endif +#undef CONFIG_CMD_SYSJUMP +#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_SYSJUMP +#define CONFIG_CMD_SYSJUMP +#endif + #endif /* __CROS_EC_CONFIG_CHIP_H */ -- cgit v1.2.1