From f4fb44573738fcbc393b5d16c90ccf9d570480b0 Mon Sep 17 00:00:00 2001 From: Tzung-Bi Shih Date: Wed, 18 Nov 2020 17:32:06 +0800 Subject: core/riscv-rv32i: move essential code to ram_code only if supports Commit "it83xx: pull more functions into __ram_code section" (https://crrev.com/c/2535899) breaks Asurada SCP. It moves some essential code to .ram_code section but only IT8XXX2 family includes .ram_code in linker script. Moves the context switch code to ram_code only if it supports. BRANCH=none BUG=none TEST=make BOARD=asurada_scp && make BOARD=asurada Signed-off-by: Tzung-Bi Shih Change-Id: I8602f7ef0103282feeddbfe1757f7cf7fb5512dc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2546722 Reviewed-by: Eric Yilun Lin --- chip/it83xx/registers.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'chip') diff --git a/chip/it83xx/registers.h b/chip/it83xx/registers.h index ea344b35ec..9c3583ca4e 100644 --- a/chip/it83xx/registers.h +++ b/chip/it83xx/registers.h @@ -11,7 +11,8 @@ #include "common.h" #include "compile_time_macros.h" -#define __ram_code __attribute__((section(".ram_code"))) +#define __RAM_CODE_SECTION_NAME ".ram_code" +#define __ram_code __attribute__((section(__RAM_CODE_SECTION_NAME))) /* IRQ numbers */ /* Group 0 */ -- cgit v1.2.1