plat/arm/sgi: Add initial platform support for SGI platforms
System Guidance for Infrastructure are Arm's reference server
platforms. Add mandatory functions and macros required by all
SGI platforms to execute the TF-A tests. The common files
are placed in plat/arm/sgi/common/ folder.
Change-Id: Iaf9f3fa9dfa8d95c883bcab7c1ef00ea228b6b67
Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
diff --git a/plat/arm/sgi/common/plat_setup.c b/plat/arm/sgi/common/plat_setup.c
new file mode 100644
index 0000000..211e8d4
--- /dev/null
+++ b/plat/arm/sgi/common/plat_setup.c
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2018, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <arm_gic.h>
+#include <xlat_tables_v2.h>
+
+static const mmap_region_t mmap[] = {
+ MAP_REGION_FLAT(SGI_DEVICE0_BASE, SGI_DEVICE0_SIZE,
+ MT_DEVICE | MT_RW | MT_NS),
+ MAP_REGION_FLAT(SGI_DEVICE1_BASE, SGI_DEVICE1_SIZE,
+ MT_DEVICE | MT_RW | MT_NS),
+ MAP_REGION_FLAT(DRAM_BASE, TFTF_BASE - DRAM_BASE,
+ MT_MEMORY | MT_RW | MT_NS),
+ {0}
+};
+
+const mmap_region_t *tftf_platform_get_mmap(void)
+{
+ return mmap;
+}
+
+void plat_arm_gic_init(void)
+{
+ arm_gic_init(SGI_GICC_BASE, SGI_GICD_BASE, SGI_GICR_BASE);
+}