summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zephyr/linker/end-of-ram.ld2
-rw-r--r--zephyr/linker/image_size.ld3
2 files changed, 2 insertions, 3 deletions
diff --git a/zephyr/linker/end-of-ram.ld b/zephyr/linker/end-of-ram.ld
index e03de7481d..91e8385950 100644
--- a/zephyr/linker/end-of-ram.ld
+++ b/zephyr/linker/end-of-ram.ld
@@ -12,7 +12,7 @@ SECTION_PROLOGUE(.end_of_ram_info, 0, )
{
ASSERT(DEFINED(_image_ram_end) && _image_ram_end > 0, "Error: _image_ram_end is not defined");
-#if defined(RAM_ADDR) && defined(RAM_SIZE)
+#if defined(RAM_ADDR) && defined(RAM_SIZE) && defined(CONFIG_PLATFORM_EC_PRESERVED_END_OF_RAM_SIZE)
PROVIDE(__unused_ram_start = _image_ram_end);
PROVIDE(__unused_ram_end = RAM_ADDR + RAM_SIZE);
PROVIDE(__unused_ram_size = __unused_ram_end - __unused_ram_start);
diff --git a/zephyr/linker/image_size.ld b/zephyr/linker/image_size.ld
index 170daf141d..efeeafa3d4 100644
--- a/zephyr/linker/image_size.ld
+++ b/zephyr/linker/image_size.ld
@@ -3,8 +3,7 @@
* found in the LICENSE file.
*/
-#if defined(CONFIG_CPU_CORTEX_M) || defined(CONFIG_CPU_CORTEX_R) || \
- defined(CONFIG_CPU_CORTEX_A) || defined (CONFIG_RISCV)
+#if defined(CONFIG_PLATFORM_EC_RW_TOTAL_IMAGE_SIZE)
__image_size = CONFIG_PLATFORM_EC_RW_TOTAL_IMAGE_SIZE;
#else
/*