diff --git a/soc/ite/ec/it8xxx2/Kconfig b/soc/ite/ec/it8xxx2/Kconfig index 6ddf099d026..74d16b92756 100644 --- a/soc/ite/ec/it8xxx2/Kconfig +++ b/soc/ite/ec/it8xxx2/Kconfig @@ -204,6 +204,13 @@ config SOC_IT8XXX2_KERNEL_IN_RAM help Place kernel handling code in ILM. This can significantly improve performance. +config SOC_IT8XXX2_ZEPHYR_IN_RAM + bool "Place zephyr handling code in RAM" + select SOC_IT8XXX2_USE_ILM + select SOC_IT8XXX2_LIBRARY_TO_RAM + help + Place zephyr handling code in ILM. This can significantly improve performance. + config SOC_IT8XXX2_SHA256_HW_ACCELERATE bool "HW SHA256 calculation" help diff --git a/soc/ite/ec/it8xxx2/linker.ld b/soc/ite/ec/it8xxx2/linker.ld index 6f1577a7930..b5b0f686d73 100644 --- a/soc/ite/ec/it8xxx2/linker.ld +++ b/soc/ite/ec/it8xxx2/linker.ld @@ -179,6 +179,9 @@ SECTIONS #ifdef CONFIG_SOC_IT8XXX2_KERNEL_IN_RAM *libkernel.a:* #endif +#ifdef CONFIG_SOC_IT8XXX2_ZEPHYR_IN_RAM + *libzephyr.a:* +#endif #ifdef CONFIG_SOC_IT8XXX2_LIBRARY_TO_RAM ) .text @@ -194,6 +197,9 @@ SECTIONS #ifdef CONFIG_SOC_IT8XXX2_KERNEL_IN_RAM *libkernel.a:* #endif +#ifdef CONFIG_SOC_IT8XXX2_ZEPHYR_IN_RAM + *libzephyr.a:* +#endif #ifdef CONFIG_SOC_IT8XXX2_LIBRARY_TO_RAM ) .text.* @@ -230,6 +236,11 @@ SECTIONS *libkernel.a:*(.text .text.*) *libkernel.a:*(.rodata .rodata.*) *libkernel.a:*(.srodata .srodata.*) +#endif +#ifdef CONFIG_SOC_IT8XXX2_ZEPHYR_IN_RAM + *libzephyr.a:*(.text .text.*) + *libzephyr.a:*(.rodata .rodata.*) + *libzephyr.a:*(.srodata .srodata.*) #endif __ilm_flash_end = .; /* ILM mapping is always a multiple of 4k size; ensure following