summaryrefslogtreecommitdiff
path: root/zephyr/include/cros/binman.dtsi
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2023-01-06 11:54:29 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-01-13 16:30:37 +0000
commit9c9d316599737caf8751baa3ffa7a578ae84fb49 (patch)
tree63011e8bdfb165a747cff620bdeb48f5563080ca /zephyr/include/cros/binman.dtsi
parentc9292d8582f8e1e02cf8458ce9969027d7d42241 (diff)
downloadchrome-ec-firmware-nissa-15217.45.B-main.tar.gz
zephyr: fwid: Move RW FWID to end of the flashfirmware-nissa-15217.45.B-main
Force the RW_FWID to always reside in the last 32 bytes of the flash. This ensures that the RW_FW and RW_FWID sections never move within the full EC binary. The FMAP is only stored in RO, so this ensures future compatibility with RW firmware image size changes. BUG=b:264229880 BRANCH=none TEST=Run "futility dump_fmap ec.bin" and verify RW_FWID is located in last 32-bytes. TEST=On Herobrine, validate EC sync and validate FMAP manifest when the RO and RW images are different versions. Change-Id: I2d96d602f37ca9fafe4d01cbf1a578e20861abaa Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4143799 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> (cherry picked from commit 83870209314421d0114f868f8f4a92578310e87d) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4164577 Tested-by: Shou-Chieh Hsu <shouchieh@chromium.org> Reviewed-by: Andrew McRae <amcrae@google.com> Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com> Commit-Queue: Shou-Chieh Hsu <shouchieh@chromium.org>
Diffstat (limited to 'zephyr/include/cros/binman.dtsi')
-rw-r--r--zephyr/include/cros/binman.dtsi24
1 files changed, 17 insertions, 7 deletions
diff --git a/zephyr/include/cros/binman.dtsi b/zephyr/include/cros/binman.dtsi
index 167fd69d1c..1ba7a3bde6 100644
--- a/zephyr/include/cros/binman.dtsi
+++ b/zephyr/include/cros/binman.dtsi
@@ -36,13 +36,23 @@
offset = <0x40000>;
size = <0x40000>;
rw-fw {
- type = "blob";
- filename = "zephyr_rw.bin";
- };
- rw-fwid {
- type = "text";
- size = <32>;
- text-label = "version";
+ type = "section";
+ zephyr-rw {
+ type = "blob";
+ filename = "zephyr_rw.bin";
+ };
+ rw-fwid {
+ /* Fix the lcoation of the FWID to the
+ * last 32 bytes of the flash. This
+ * ensures the RW entries in the FMAP
+ * stored in the RO section of flash
+ * are always correct.
+ */
+ offset = <(0x40000 - 32)>;
+ type = "text";
+ size = <32>;
+ text-label = "version";
+ };
};
};
};