cactus: add exception/interrupt framework

This patch adds following changes to cactus
 1. Set up exception vector base address.
 2. Add skeleton interrupt handler.
 3. Install default tftf cpu exception handler.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I265553918b45a0e7e80ef0d7c48c09abfbec1a5f
diff --git a/spm/cactus/aarch64/cactus_entrypoint.S b/spm/cactus/aarch64/cactus_entrypoint.S
index 4fe17e3..383c319 100644
--- a/spm/cactus/aarch64/cactus_entrypoint.S
+++ b/spm/cactus/aarch64/cactus_entrypoint.S
@@ -35,6 +35,12 @@
 	add	x1, x1, x0
 	bl	fixup_gdt_reloc
 
+	/* Set up exceptions vector table */
+	adrp	x0, tftf_vector
+	add	x0, x0, :lo12:tftf_vector
+	msr	vbar_el1, x0
+	isb
+
 	/* And jump to the C entrypoint. */
 	b	cactus_main
 
diff --git a/spm/cactus/cactus.mk b/spm/cactus/cactus.mk
index 60f6974..e6577c3 100644
--- a/spm/cactus/cactus.mk
+++ b/spm/cactus/cactus.mk
@@ -18,9 +18,10 @@
 	-Iinclude/lib/${ARCH}				\
 	-Iinclude/lib/utils				\
 	-Iinclude/lib/xlat_tables			\
+	-Iinclude/plat/common				\
 	-Iinclude/runtime_services			\
 	-Ispm/cactus					\
-	-Ispm/common					\
+	-Ispm/common
 
 CACTUS_SOURCES	:=					\
 	$(addprefix spm/cactus/,			\
@@ -38,7 +39,9 @@
 CACTUS_SOURCES	+=					\
 	tftf/framework/debug.c				\
 	tftf/framework/${ARCH}/asm_debug.S		\
-	tftf/tests/runtime_services/secure_service/ffa_helpers.c
+	tftf/tests/runtime_services/secure_service/ffa_helpers.c \
+	tftf/framework/${ARCH}/exceptions.S		\
+	tftf/framework/${ARCH}/exception_report.c
 
 CACTUS_SOURCES	+= 	drivers/arm/pl011/${ARCH}/pl011_console.S	\
 			lib/${ARCH}/cache_helpers.S			\
diff --git a/spm/cactus/cactus_main.c b/spm/cactus/cactus_main.c
index 5ca206b..0809716 100644
--- a/spm/cactus/cactus_main.c
+++ b/spm/cactus/cactus_main.c
@@ -147,6 +147,13 @@
 	init_xlat_tables();
 }
 
+int tftf_irq_handler_dispatcher(void)
+{
+	ERROR("%s\n", __func__);
+
+	return 0;
+}
+
 void __dead2 cactus_main(void)
 {
 	assert(IS_IN_EL1() != 0);