Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions soc/ite/ec/it8xxx2/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ config SOC_IT8XXX2_LIBRARY_TO_RAM
If this is selected it means that there is a library that needs to be excluded
from the text section.

config SOC_IT8XXX2_SWITCH_IN_RAM
bool "Place switch handling code in RAM"
select SOC_IT8XXX2_USE_ILM
select SOC_IT8XXX2_LIBRARY_TO_RAM
help
Place content switching code in ILM for better performance.

config SOC_IT8XXX2_SERIAL_IN_RAM
bool "Place serial handling code in RAM"
select SOC_IT8XXX2_USE_ILM
Expand Down
9 changes: 9 additions & 0 deletions soc/ite/ec/it8xxx2/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ SECTIONS
#ifdef CONFIG_SOC_IT8XXX2_LIBRARY_TO_RAM
*(EXCLUDE_FILE (
#endif
#ifdef CONFIG_SOC_IT8XXX2_SWITCH_IN_RAM
*libarch__riscv__core.a:*
#endif
#ifdef CONFIG_SOC_IT8XXX2_SERIAL_IN_RAM
*libdrivers__serial.a:*
#endif
Expand All @@ -191,6 +194,9 @@ SECTIONS
#ifdef CONFIG_SOC_IT8XXX2_LIBRARY_TO_RAM
*(EXCLUDE_FILE (
#endif
#ifdef CONFIG_SOC_IT8XXX2_SWITCH_IN_RAM
*libarch__riscv__core.a:*
#endif
#ifdef CONFIG_SOC_IT8XXX2_SERIAL_IN_RAM
*libdrivers__serial.a:*
#endif
Expand Down Expand Up @@ -227,6 +233,9 @@ SECTIONS
KEEP(*(".exception.entry.*"))
*(".exception.other.*")
#endif
#ifdef CONFIG_SOC_IT8XXX2_SWITCH_IN_RAM
*libarch__riscv__core.a:*(.text .text.*)
#endif
#ifdef CONFIG_SOC_IT8XXX2_SERIAL_IN_RAM
*libdrivers__serial.a:*(.text .text.*)
*libdrivers__serial.a:*(.rodata .rodata.*)
Expand Down