summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2015-11-06 08:50:27 -0800
committerchrome-bot <chrome-bot@chromium.org>2015-11-10 06:54:43 -0800
commitb895b9e933714f17b24f9f080b20ea4e62c124dc (patch)
treee0d51ba4fe977559d75d69d3940602c036a6b2a8
parent725bef1b3b04761e0b385ba6757d0f8b100bebcf (diff)
downloadchrome-ec-b895b9e933714f17b24f9f080b20ea4e62c124dc.tar.gz
cr50: allocate signature headers in both RO and RW images
With the proper RO in place, RW must be signed in the same manner, as RO. This patch makes sure that there is room in the RW header for the signature. BRANCH=none BUG=chrome-os-partner:43025 TEST=with the rest of the patches applies the RO successfully boots up the RW. Change-Id: I1538195e0181c23c874ddd300887cf5da8c5a867 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/311421 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r--chip/g/config_chip.h1
-rw-r--r--core/cortex-m/ec.lds.S3
2 files changed, 4 insertions, 0 deletions
diff --git a/chip/g/config_chip.h b/chip/g/config_chip.h
index 50655d5e22..1818fbce60 100644
--- a/chip/g/config_chip.h
+++ b/chip/g/config_chip.h
@@ -25,6 +25,7 @@
#define CONFIG_PROGRAM_MEMORY_BASE 0x40000
#define CONFIG_FLASH_SIZE (512 * 1024)
#define CONFIG_RO_HEAD_ROOM 1024 /* Room for ROM signature. */
+#define CONFIG_RW_HEAD_ROOM CONFIG_RO_HEAD_ROOM /* same for RW */
/* Memory-mapped internal flash */
#define CONFIG_INTERNAL_STORAGE
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index 9fe53747b2..38a235d53f 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -67,6 +67,9 @@ SECTIONS
#if defined(SECTION_IS_RO) && defined(CONFIG_RO_HEAD_ROOM)
. = . + CONFIG_RO_HEAD_ROOM;
#endif
+#if defined(SECTION_IS_RW) && defined(CONFIG_RW_HEAD_ROOM)
+ . = . + CONFIG_RW_HEAD_ROOM;
+#endif
OUTDIR/core/CORE/init.o (.text.vecttable)
. = ALIGN(4);
__version_struct_offset = .;