summaryrefslogtreecommitdiff
path: root/core/cortex-m/ec.lds.S
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2012-04-27 10:23:14 -0700
committerBill Richardson <wfrichar@chromium.org>2012-05-01 15:54:39 -0700
commit8d921af0bb4f189c10d11bb0bfce286fb92d348c (patch)
tree31dd1245146630cf90d10bdb96ef8013236ecaf0 /core/cortex-m/ec.lds.S
parenta5027ece4cb02a736db3db1e971bffd699422dec (diff)
downloadchrome-ec-8d921af0bb4f189c10d11bb0bfce286fb92d348c.tar.gz
Add basic FMAP to EC firmware image.
This is very basic, so you can only rely on RO_SECTION, RW_SECTION_A, and RW_SECTION_B for now. We'll fill in more regions as we add vboot stuff. Still, you should be able to do things like this: flashrom -p internal:bus=lpc -r ec.bin flashrom -p internal:bus=lpc -w ec.bin -i RW_SECTION:ec.B.flat BUG=chrome-os-partner:8198 TEST=manual Build the image, look for the FMAP in it. cd src/platform/ec make BOARD=link dump_fmap ./build/link/ec.bin Change-Id: I0adbbfb8e975faae805bda271873fcef46590cf4 Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'core/cortex-m/ec.lds.S')
-rw-r--r--core/cortex-m/ec.lds.S13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index 32114b59da..00e7cf9e68 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -78,6 +78,18 @@ SECTIONS
. = ALIGN(4);
__data_end = .;
} > IRAM
+#ifdef SECTION_IS_RO
+ .google CONFIG_FW_RO_GBB_OFF : AT(CONFIG_FW_RO_GBB_OFF) {
+ *(.google)
+ . += 16;
+ } > FLASH
+ ASSERT(SIZEOF(.text) + SIZEOF(.rodata) + SIZEOF(.data) + SIZEOF(.google)
+ <= CONFIG_FW_IMAGE_SIZE, "Too much stuff to fit in the image")
+#else
+ /DISCARD/ : {
+ *(.google)
+ }
+#endif
.bss : {
. = ALIGN(4);
__bss_start = .;
@@ -89,5 +101,6 @@ SECTIONS
* can expand to use all the remaining RAM. */
__shared_mem_buf = .;
} > IRAM
+
/DISCARD/ : { *(.ARM.*) }
}