summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYilun Lin <yllin@google.com>2019-03-18 16:05:30 +0800
committerchrome-bot <chrome-bot@chromium.org>2019-03-21 03:31:43 -0700
commit8b8a84434a84e576ff17d3c258bd7420d4fc66dc (patch)
tree23b8f4ec93302d9173422139f33a071844dd6682
parent51c89799e029ded73601181eabe285ccdbc86888 (diff)
downloadchrome-ec-8b8a84434a84e576ff17d3c258bd7420d4fc66dc.tar.gz
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 <yllin@google.com> Reviewed-on: https://chromium-review.googlesource.com/1530262 Commit-Ready: Yilun Lin <yllin@chromium.org> Tested-by: Yilun Lin <yllin@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
-rw-r--r--board/kukui_scp/board.h25
-rw-r--r--chip/mt_scp/config_chip.h27
2 files changed, 26 insertions, 26 deletions
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
diff --git a/chip/mt_scp/config_chip.h b/chip/mt_scp/config_chip.h
index cc6a95af0a..91ee880985 100644
--- a/chip/mt_scp/config_chip.h
+++ b/chip/mt_scp/config_chip.h
@@ -25,27 +25,8 @@
#define MAX_NUM_EINT 8
#define MAX_EINT_PORT (MAX_NUM_EINT / 32)
-/* 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
- * | 8KB D-CACHE
- * +-------------------- 0x80000
- */
+/* RW only, no flash */
#undef CONFIG_FW_INCLUDE_RO
-#define CONFIG_RAM_BASE 0x00800
-#define CONFIG_RAM_SIZE 0x7B000
#define CONFIG_RO_MEM_OFF 0
#define CONFIG_RO_SIZE 0
#define CONFIG_RW_MEM_OFF 0
@@ -74,12 +55,6 @@
#define LARGER_TASK_STACK_SIZE 640
#define VENTI_TASK_STACK_SIZE 768
-/* IPI */
-#define CONFIG_IPC_SHARED_OBJ_BUF_SIZE 288
-#define CONFIG_IPC_SHARED_OBJ_ADDR \
- (CONFIG_RAM_BASE - \
- (CONFIG_IPC_SHARED_OBJ_BUF_SIZE + 2 * sizeof(int32_t)) * 2)
-
#define CONFIG_CHIP_PRE_INIT
#define GPIO_PIN(num) ((num) / 32), ((num) % 32)