aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya Angadi <aditya.angadi@arm.com>2020-01-08 12:33:04 +0530
committerjimqui01 <54316584+jimqui01@users.noreply.github.com>2020-04-15 13:50:41 +0100
commit71ff2dec8a93048d1d1211fc2d285e1d7c98de23 (patch)
tree08492db0fcc9e7a7ebfebe049018fe31915bf511
parentd2c072cc872b72806119e218af602c237e466514 (diff)
product/rddanielxlr: add configuration data for AP context module
AP context module is used to zero out the shared memory region used by SCP and AP on every initializaion or interconnect reset. Provide the base address and size of the shared memory region and also the clock id of the interconnect to subscribe to. Change-Id: I6e4654689c6425aa533847d2865d23dcf47c1d11 Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
-rw-r--r--product/rddanielxlr/include/scp_software_mmap.h10
-rw-r--r--product/rddanielxlr/scp_ramfw/config_apcontext.c29
2 files changed, 39 insertions, 0 deletions
diff --git a/product/rddanielxlr/include/scp_software_mmap.h b/product/rddanielxlr/include/scp_software_mmap.h
index d7ef1883..0a324075 100644
--- a/product/rddanielxlr/include/scp_software_mmap.h
+++ b/product/rddanielxlr/include/scp_software_mmap.h
@@ -26,4 +26,14 @@
#define SCP_NONTRUSTED_RAM_BASE (SCP_SYSTEM_ACCESS_PORT1_BASE + \
0x06000000)
+/* Secure Shared memory between AP and SCP */
+#define SCP_AP_SHARED_SECURE_BASE (SCP_TRUSTED_RAM_BASE)
+#define SCP_AP_SHARED_SECURE_SIZE (4 * FWK_KIB)
+
+/* AP Context Area */
+#define SCP_AP_CONTEXT_BASE (SCP_AP_SHARED_SECURE_BASE + \
+ SCP_AP_SHARED_SECURE_SIZE - \
+ SCP_AP_CONTEXT_SIZE)
+#define SCP_AP_CONTEXT_SIZE (64)
+
#endif /* SCP_SOFTWARE_MMAP_H */
diff --git a/product/rddanielxlr/scp_ramfw/config_apcontext.c b/product/rddanielxlr/scp_ramfw/config_apcontext.c
new file mode 100644
index 00000000..5232cfc0
--- /dev/null
+++ b/product/rddanielxlr/scp_ramfw/config_apcontext.c
@@ -0,0 +1,29 @@
+/*
+ * Arm SCP/MCP Software
+ * Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include "clock_soc.h"
+#include "scp_software_mmap.h"
+
+#include <mod_apcontext.h>
+
+#include <fwk_id.h>
+#include <fwk_module.h>
+#include <fwk_module_idx.h>
+
+/*
+ * AP Context module configuration
+ */
+static const struct mod_apcontext_config apcontext_data = {
+ .base = SCP_AP_CONTEXT_BASE,
+ .size = SCP_AP_CONTEXT_SIZE,
+ .clock_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_CLOCK,
+ CLOCK_IDX_INTERCONNECT),
+};
+
+struct fwk_module_config config_apcontext = {
+ .data = &apcontext_data,
+};