diff options
author | Dino Li <Dino.Li@ite.com.tw> | 2022-06-08 11:09:35 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-06-09 14:23:19 +0000 |
commit | 9e82920e70ea835ec0744eb666a108f265f287fb (patch) | |
tree | 209438b3e3a66a163e403a4d5eee93a857d9047d | |
parent | adae86b9387e261919d5e9921814f0d8f31f49fa (diff) | |
download | chrome-ec-9e82920e70ea835ec0744eb666a108f265f287fb.tar.gz |
riscv: it8xxx2: pull __switch_task function into ram_code_ilm0 section
The ram_code section will out of space once mul instruction workaround
is enabled.
This change pulls the function into the second ram code section.
BUG=b:235297478
BRANCH=asurada,cherry,icarus
TEST=- buildall
- Check map file, the function is in the ram_code_ilm0 section.
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Change-Id: I236caf2261a16edf25185b2442d126ec6ed7ef41
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3686728
Reviewed-by: Eric Yilun Lin <yllin@google.com>
-rw-r--r-- | chip/it83xx/config_chip_it8xxx2.h | 2 | ||||
-rw-r--r-- | core/riscv-rv32i/ec.lds.S | 1 | ||||
-rw-r--r-- | core/riscv-rv32i/switch.S | 4 |
3 files changed, 5 insertions, 2 deletions
diff --git a/chip/it83xx/config_chip_it8xxx2.h b/chip/it83xx/config_chip_it8xxx2.h index d06aa8d204..8716380f29 100644 --- a/chip/it83xx/config_chip_it8xxx2.h +++ b/chip/it83xx/config_chip_it8xxx2.h @@ -6,6 +6,8 @@ #ifndef __CROS_EC_CONFIG_CHIP_IT8XXX2_H #define __CROS_EC_CONFIG_CHIP_IT8XXX2_H +#define __RAM_CODE_ILM0_SECTION_NAME ".ram_code_ilm0" + /* CPU core BFD configuration */ #include "core/riscv-rv32i/config_core.h" diff --git a/core/riscv-rv32i/ec.lds.S b/core/riscv-rv32i/ec.lds.S index 21c3de1143..1e629a5779 100644 --- a/core/riscv-rv32i/ec.lds.S +++ b/core/riscv-rv32i/ec.lds.S @@ -83,6 +83,7 @@ SECTIONS "__flash_dma_size < IT83XX_ILM_BLOCK_SIZE"); . = ALIGN(IT83XX_ILM_BLOCK_SIZE); __ilm0_ram_code = .; + KEEP(*(.ram_code_ilm0)) OUTDIR/chip/it83xx/i2c.o (.text*) OUTDIR/chip/it83xx/i2c.o (.rodata) OUTDIR/chip/it83xx/hwtimer.o (.text*) diff --git a/core/riscv-rv32i/switch.S b/core/riscv-rv32i/switch.S index 8760667c6b..f58ac26e63 100644 --- a/core/riscv-rv32i/switch.S +++ b/core/riscv-rv32i/switch.S @@ -8,8 +8,8 @@ #include "config.h" #include "cpu.h" -#ifdef __RAM_CODE_SECTION_NAME -.section __RAM_CODE_SECTION_NAME +#ifdef __RAM_CODE_ILM0_SECTION_NAME +.section __RAM_CODE_ILM0_SECTION_NAME #endif /** |