diff options
author | Dino Li <Dino.Li@ite.com.tw> | 2017-01-05 11:07:33 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-01-05 23:47:15 -0800 |
commit | c6928bce0b896d6c34f386e72a859060cc59ac93 (patch) | |
tree | 9b49539a0a86e5840f002e306f526fd893ec8816 /core/nds32/ec.lds.S | |
parent | 8d73ccacaece31b06eee2c7db8eb77b7b774ad4d (diff) | |
download | chrome-ec-c6928bce0b896d6c34f386e72a859060cc59ac93.tar.gz |
nds32: lds: reduce gap of flash
- Before the change was made, the "__ro_end" was at 00013520h.
We change to 00012760h.
- Rename "CONFIG_IT83XX_ILM_BLOCK_SIZE" to "IT83XX_ILM_BLOCK_SIZE"
this is because we don't support reconfiguration at board-level.
- Put some task functions into "__ram_code" section to
fill the gap and improving performance of code-fetch.
Signed-off-by: Dino Li <dino.li@ite.com.tw>
BRANCH=none
BUG=none
TEST=console commands: flasherase, flashwrite, and flashread.
Change-Id: I2f2906a2a0b6971aadd00120c282801161447808
Reviewed-on: https://chromium-review.googlesource.com/424248
Commit-Ready: Dino Li <Dino.Li@ite.com.tw>
Tested-by: Dino Li <Dino.Li@ite.com.tw>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'core/nds32/ec.lds.S')
-rw-r--r-- | core/nds32/ec.lds.S | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/core/nds32/ec.lds.S b/core/nds32/ec.lds.S index 43b905c899..5955c24df1 100644 --- a/core/nds32/ec.lds.S +++ b/core/nds32/ec.lds.S @@ -28,6 +28,12 @@ MEMORY SECTIONS { .text : { + /* We put "__flash_dma_start" at the beginning of the text section + * to avoid gap. + */ + __flash_dma_start = .; + ASSERT((__flash_dma_start == 0), + "__flash_dma_start has to be 4k-byte aligned"); KEEP(STRINGIFY(OUTDIR/core/CORE/init.o) (.text.vecttable)) . = ALIGN(4); __version_struct_offset = .; @@ -35,17 +41,14 @@ SECTIONS . = ALIGN(4); KEEP(STRINGIFY(OUTDIR/core/CORE/init.o) (.text.vectirq)) KEEP(STRINGIFY(OUTDIR/core/CORE/init.o) (.text)) - *(.text*) - - . = ALIGN(CONFIG_IT83XX_ILM_BLOCK_SIZE); - __flash_dma_start = .; KEEP(*(.flash_direct_map)) . = ALIGN(16); KEEP(*(.ram_code)) __flash_dma_size = . - __flash_dma_start; - ASSERT((__flash_dma_size < CONFIG_IT83XX_ILM_BLOCK_SIZE), - "__flash_dma_size < CONFIG_IT83XX_ILM_BLOCK_SIZE"); - . = ALIGN(CONFIG_IT83XX_ILM_BLOCK_SIZE); + ASSERT((__flash_dma_size < IT83XX_ILM_BLOCK_SIZE), + "__flash_dma_size < IT83XX_ILM_BLOCK_SIZE"); + . = ALIGN(IT83XX_ILM_BLOCK_SIZE); + *(.text*) } > FLASH . = ALIGN(4); .rodata : { @@ -69,6 +72,11 @@ SECTIONS __hcmds_end = .; . = ALIGN(4); + __mkbp_evt_srcs = .; + KEEP(*(.rodata.evtsrcs)) + __mkbp_evt_srcs_end = .; + + . = ALIGN(4); __hooks_init = .; KEEP(*(.rodata.HOOK_INIT)) __hooks_init_end = .; |