summaryrefslogtreecommitdiff
path: root/common/firmware_image.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 /common/firmware_image.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 'common/firmware_image.lds.S')
-rw-r--r--common/firmware_image.lds.S10
1 files changed, 7 insertions, 3 deletions
diff --git a/common/firmware_image.lds.S b/common/firmware_image.lds.S
index c282e7ac28..3b2ef7f561 100644
--- a/common/firmware_image.lds.S
+++ b/common/firmware_image.lds.S
@@ -16,15 +16,19 @@ SECTIONS
. = ALIGN(CONFIG_FLASH_BANK_SIZE);
.image.RO : AT(CONFIG_FW_RO_OFF) {
*(.image.RO)
- } > FLASH
+ } > FLASH =0xff
. = ALIGN(CONFIG_FLASH_BANK_SIZE);
.image.A : AT(CONFIG_FW_A_OFF) {
*(.image.A)
- } > FLASH
+ } > FLASH =0xff
#ifndef CONFIG_NO_RW_B
. = ALIGN(CONFIG_FLASH_BANK_SIZE);
.image.B : AT(CONFIG_FW_B_OFF) {
*(.image.B)
- } > FLASH
+ } > FLASH =0xff
#endif
+ /* NOTE: EC implementation reserves one bank for itself */
+ .padding : AT(CONFIG_FLASH_SIZE - CONFIG_FLASH_BANK_SIZE - 1) {
+ BYTE(0xff);
+ } > FLASH =0xff
}