ivy: Introduce new test Secure Partition

In order to test multiple partitions it is needed to have at least two
different partitions with different services. This way it isn't possible
to accidentally call partition A with a service of partition B and have
it work correctly.

Cactus is meant to be the main test Secure Partition. It is the one
meant to have most of the tests that a Secure Partition has to do. Ivy
is meant to be more minimalistic. In the future, Cactus may be modified
to be a S-EL1 partition while Ivy will remain as a S-EL0 partition.

Change-Id: I29d09b9f9400b58568f9b90344a4034332a6e6e1
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
diff --git a/spm/ivy/ivy.dts b/spm/ivy/ivy.dts
new file mode 100644
index 0000000..4c5a11a
--- /dev/null
+++ b/spm/ivy/ivy.dts
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2018, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <sp_res_desc_def.h>
+
+#include "ivy_def.h"
+
+/* 4 KiB pages */
+#define PAGE_SIZE			U(0x1000)
+
+/*
+ * FVP platform layout. The defines are hardcoded here because including the
+ * platform headers have too many dependencies.
+ * TODO: Move this to the platform layer.
+ */
+#define V2M_IOFPGA_BASE			ULL(0x1c000000)
+#define V2M_IOFPGA_SIZE			ULL(0x03000000)
+
+/* Aggregate of all devices in the first GB. */
+#define DEVICE0_BASE			ULL(0x20000000)
+#define DEVICE0_SIZE			ULL(0x0c200000)
+
+/dts-v1/;
+
+/ {
+	compatible = "arm,sp_rd";
+
+	attribute {
+		version = <0x00000001>;
+		sp_type = <RD_ATTR_TYPE_UP_MIGRATABLE>;
+		pe_mpidr = <0>; /* Unused */
+		runtime_el = <RD_ATTR_RUNTIME_SEL0>;
+		exec_type = <RD_ATTR_RUNTIME>;
+		panic_policy = <RD_ATTR_PANIC_ONESHOT>;
+		xlat_granule = <RD_ATTR_XLAT_GRANULE_4KB>;
+		binary_size = <IVY_IMAGE_SIZE>;
+		load_address = <0x00000000 IVY_IMAGE_BASE>;
+		entrypoint = <0x00000000 IVY_IMAGE_BASE>;
+	};
+
+	memory_regions {
+		v2m_iofpga {
+			str = "V2M IOFPGA";
+			base = <0x00000000 V2M_IOFPGA_BASE>;
+			size = <0x00000000 V2M_IOFPGA_SIZE>;
+			attr = <RD_MEM_DEVICE>;
+		};
+
+		device0 {
+			str = "Device 0";
+			base = <0x00000000 DEVICE0_BASE>;
+			size = <0x00000000 DEVICE0_SIZE>;
+			attr = <RD_MEM_DEVICE>;
+		};
+
+		spm_buffer {
+			str = "SPM buffer";
+			base = <0x00000000 IVY_SPM_BUF_BASE>;
+			size = <0x00000000 IVY_SPM_BUF_SIZE>;
+			attr = <RD_MEM_NORMAL_SPM_SP_SHARED_MEM>;
+		};
+
+		ns_buffer {
+			str = "NS buffer";
+			base = <0x00000000 IVY_NS_BUF_BASE>;
+			size = <0x00000000 IVY_NS_BUF_SIZE>;
+			attr = <RD_MEM_NORMAL_CLIENT_SHARED_MEM>;
+		};
+	};
+
+	notifications {
+		notification_0 {
+			attr = <0>;
+			pe = <0>;
+		};
+	};
+
+	services {
+		test_service_1 {
+			uuid = <IVY_SERVICE1_UUID_RD>;
+
+			accessibility = <(RD_SERV_ACCESS_SECURE |
+					  RD_SERV_ACCESS_EL3 |
+					  RD_SERV_ACCESS_NORMAL)>;
+			request_type = <(RD_SERV_SUPPORT_BLOCKING |
+					 RD_SERV_SUPPORT_NON_BLOCKING)>;
+			connection_quota = <10>;
+			sec_mem_size = <0>;
+			interrupt_num = <0>;
+		};
+	};
+};