summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDino Li <Dino.Li@ite.com.tw>2023-03-01 16:18:07 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-03-02 01:31:15 +0000
commita1d45ab6536b24cc0b0e5a3b9746f0bc96b69e85 (patch)
tree8113d9638ef5fc5ed2fd0395811f27679c554be3
parenta3a39796d3c5b21923e18b37b3d7f6030ef3805a (diff)
downloadchrome-ec-firmware-skyrim-15369.B-main.tar.gz
zephyr/it8xxx2: RO flash region excludes the PSTATE bankfirmware-skyrim-15369.B-main
Since it8xxx2 uses a dedicated flash bank to store persistent state, this change excludes the PSTATE bank from the RO flash region. This configuration is the as same CrOS EC OS. BRANCH=none BUG=b:270589902 TEST=Updating EC FW using flashrom utility without verify failure on PSTATE region. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: Iea5a4fbfde43675af58acbb85023d18503d3c3c9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4297063 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/shim/chip/it8xxx2/include/flash_chip.h3
-rw-r--r--zephyr/shim/include/config_chip.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/zephyr/shim/chip/it8xxx2/include/flash_chip.h b/zephyr/shim/chip/it8xxx2/include/flash_chip.h
index 00aaba05fd..b3f51ba378 100644
--- a/zephyr/shim/chip/it8xxx2/include/flash_chip.h
+++ b/zephyr/shim/chip/it8xxx2/include/flash_chip.h
@@ -27,7 +27,6 @@
* register with persistent state.
*/
#define CONFIG_FW_PSTATE_SIZE CONFIG_FLASH_BANK_SIZE
-#define CONFIG_FW_PSTATE_OFF \
- (CONFIG_RO_STORAGE_OFF + CONFIG_RO_SIZE - CONFIG_FW_PSTATE_SIZE)
+#define CONFIG_FW_PSTATE_OFF (CONFIG_RO_STORAGE_OFF + CONFIG_RO_SIZE)
#endif /* __CROS_EC_FLASH_CHIP_H */
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 9cc4b8510c..28adf77077 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -547,7 +547,11 @@ extern char mock_jump_data[CONFIG_PLATFORM_EC_PRESERVED_END_OF_RAM_SIZE];
#define CONFIG_WP_STORAGE_OFF CONFIG_EC_PROTECTED_STORAGE_OFF
#define CONFIG_WP_STORAGE_SIZE CONFIG_EC_PROTECTED_STORAGE_SIZE
+#if defined(CONFIG_PLATFORM_EC_FLASH_PSTATE)
+#define CONFIG_RO_SIZE (CONFIG_CROS_EC_RO_SIZE - CONFIG_FW_PSTATE_SIZE)
+#else
#define CONFIG_RO_SIZE CONFIG_CROS_EC_RO_SIZE
+#endif
#define CONFIG_RW_SIZE CONFIG_CROS_EC_RW_SIZE
/*