summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2017-01-31 22:12:51 -0800
committerVadim Bendebury <vbendeb@chromium.org>2017-02-01 06:35:57 +0000
commit9fc399a0aaa4a12591907b498d4826a35fe4a806 (patch)
tree6d22fc2bb889d80c2a666db471959f1e77218da7 /core
parent82656eac813753b8d7e64d31760a8a308e060e4c (diff)
downloadchrome-ec-9fc399a0aaa4a12591907b498d4826a35fe4a806.tar.gz
Revert "system: Use stored size in image_data for determining image_used"
This breaks header composition of g chip based boards. This reverts commit 93951a491dd00e20addc1ff99c2896bb9752e665. Change-Id: Ia52cf1d9c56fbb588317cec73487b2c9e89b7234 Reviewed-on: https://chromium-review.googlesource.com/435550 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org> Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/cortex-m/ec.lds.S8
-rw-r--r--core/cortex-m0/ec.lds.S8
-rw-r--r--core/nds32/ec.lds.S12
3 files changed, 27 insertions, 1 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index 0c570a0b14..803845c5a6 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -329,6 +329,14 @@ SECTIONS
* can expand to use all the remaining RAM. */
__shared_mem_buf = .;
+ /* Tag at end of firmware image so that we can find the image size.
+ * This may be overwritten by the shared memory buffer; that's ok
+ * because we only use it to find the image size in flash. */
+ . = ALIGN(4);
+ BYTE(0x45);
+ BYTE(0x4e);
+ BYTE(0x44);
+ BYTE(0xea);
/* NOTHING MAY GO AFTER THIS! */
} > IRAM
diff --git a/core/cortex-m0/ec.lds.S b/core/cortex-m0/ec.lds.S
index 495395a572..ee65cb31ce 100644
--- a/core/cortex-m0/ec.lds.S
+++ b/core/cortex-m0/ec.lds.S
@@ -217,6 +217,14 @@ SECTIONS
* can expand to use all the remaining RAM. */
__shared_mem_buf = .;
+ /* Tag at end of firmware image so that we can find the image size.
+ * This may be overwritten by the shared memory buffer; that's ok
+ * because we only use it to find the image size in flash. */
+ . = ALIGN(4);
+ BYTE(0x45);
+ BYTE(0x4e);
+ BYTE(0x44);
+ BYTE(0xea);
/* NOTHING MAY GO AFTER THIS! */
} > IRAM
diff --git a/core/nds32/ec.lds.S b/core/nds32/ec.lds.S
index 735d4e5c8b..978f652815 100644
--- a/core/nds32/ec.lds.S
+++ b/core/nds32/ec.lds.S
@@ -218,7 +218,17 @@ SECTIONS
} > IRAM
- /* TODO: Add __image_size. */
+ .flash.tag : {
+ /* Tag at end of firmware image so that we can find the image size.
+ * This may be overwritten by the shared memory buffer; that's ok
+ * because we only use it to find the image size in flash. */
+ . = ALIGN(4);
+ BYTE(0x45);
+ BYTE(0x4e);
+ BYTE(0x44);
+ BYTE(0xea);
+ /* NOTHING MAY GO IN FLASH AFTER THIS! */
+ } >FLASH
#ifdef CONFIG_LPC
.h2ram (NOLOAD) : {