From 8b8a84434a84e576ff17d3c258bd7420d4fc66dc Mon Sep 17 00:00:00 2001 From: Yilun Lin Date: Mon, 18 Mar 2019 16:05:30 +0800 Subject: mt_scp: Move some configs to board/config.h. The memory layout of mt_scp is highly configurable, and it may vary from board to board. We move RAM layout from chip config to board config. BRANCH=None TEST=make BOARD=kukui_scp -j -B BUG=b:123269246 Change-Id: I9780a0de50e380533a668fd99302c78cf5fc3e91 Signed-off-by: Yilun Lin Reviewed-on: https://chromium-review.googlesource.com/1530262 Commit-Ready: Yilun Lin Tested-by: Yilun Lin Reviewed-by: Nicolas Boichat --- board/kukui_scp/board.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'board/kukui_scp') diff --git a/board/kukui_scp/board.h b/board/kukui_scp/board.h index a2eeb86dee..4f45bde98f 100644 --- a/board/kukui_scp/board.h +++ b/board/kukui_scp/board.h @@ -15,6 +15,27 @@ /* Sent MKBP event via IPI. */ #define CONFIG_MKBP_USE_CUSTOM +/* + * RW only, no flash + * +-------------------- 0x0 + * | ptr to stack_top 0x0 + * | ptr to reset func 0x04 + * |-------------------- 0x08 + * | free shared space with AP + * +-------------------- 0x005B0 + * | IPI shared buffer with AP (288 + 8) * 2 + * +-------------------- 0x00800 + * | scp.img, exception vectors starting location. + * +-------------------- 0x7B800 + * | free shared space with AP 2KB + * +-------------------- 0x7C000 + * | 8KB I-CACHE + * +-------------------- 0x7E000 + */ +#define CONFIG_RAM_BASE 0x00800 +#define CONFIG_RAM_SIZE 0x7B000 +#define CONFIG_RO_MEM_OFF 0 + /* Access DRAM through cached access */ #define CONFIG_DRAM_BASE 0x10000000 /* Shared memory address in AP physical address space. */ @@ -22,6 +43,10 @@ #define CONFIG_DRAM_SIZE 0x01400000 /* 20 MB */ /* IPI configs */ +#define CONFIG_IPC_SHARED_OBJ_BUF_SIZE 288 +#define CONFIG_IPC_SHARED_OBJ_ADDR \ + (CONFIG_RAM_BASE - \ + (CONFIG_IPC_SHARED_OBJ_BUF_SIZE + 2 * 4 /* int32_t */) * 2) #define CONFIG_IPI #define CONFIG_RPMSG_NAME_SERVICE -- cgit v1.2.1