feat(fake_host): make shared buf init platform specific
Make the initialistaion of the shared buffer between EL2 and EL3
platform specific.
Change-Id: I6c6d2a5c2b020091014978c55129a74ee2e37a41
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
diff --git a/plat/common/src/plat_common_init.c b/plat/common/src/plat_common_init.c
index 03c2fa5..93664cd 100644
--- a/plat/common/src/plat_common_init.c
+++ b/plat/common/src/plat_common_init.c
@@ -10,7 +10,7 @@
#include <debug.h>
#include <errno.h>
#include <gic.h>
-#include <import_sym.h>
+#include <plat_import_sym.h>
#include <rmm_el3_ifc.h>
#include <sizes.h>
#include <stdint.h>
@@ -18,20 +18,6 @@
#include <xlat_contexts.h>
#include <xlat_tables.h>
-IMPORT_SYM(uintptr_t, rmm_text_start, RMM_CODE_START);
-IMPORT_SYM(uintptr_t, rmm_text_end, RMM_CODE_END);
-IMPORT_SYM(uintptr_t, rmm_ro_start, RMM_RO_START);
-IMPORT_SYM(uintptr_t, rmm_ro_end, RMM_RO_END);
-IMPORT_SYM(uintptr_t, rmm_rw_start, RMM_RW_START);
-IMPORT_SYM(uintptr_t, rmm_rw_end, RMM_RW_END);
-
-/*
- * Leave an invalid page between the end of RMM memory and the beginning
- * of the shared buffer VA. This will help to detect any memory access
- * underflow by RMM.
- */
-#define RMM_SHARED_BUFFER_START (RMM_RW_END + SZ_4K)
-
/*
* Memory map REGIONS used for the RMM runtime (static mappings)
*/
@@ -99,6 +85,11 @@
int ret;
unsigned int plat_offset, cmn_offset;
+ (void)x0;
+ (void)x1;
+ (void)x2;
+ (void)x3;
+
/* Common regions sorted by ascending VA */
struct xlat_mmap_region regions[COMMON_REGIONS] = {
RMM_CODE,
@@ -115,14 +106,6 @@
return -EINVAL;
}
- /* Initialize the RMM <-> EL3 interface */
- ret = rmm_el3_ifc_init(x0, x1, x2, x3, RMM_SHARED_BUFFER_START);
- if (ret != 0) {
- ERROR("%s (%u): Failed to initialize the RMM EL3 Interface\n",
- __func__, __LINE__);
- return ret;
- }
-
/* Setup the parameters of the shared area */
regions[3].base_pa = rmm_el3_ifc_get_shared_buf_pa();
regions[3].size = rmm_el3_ifc_get_shared_buf_size();