qemu_v8: S-EL2 SPMC: increase non-secure memory to 3GB

For SPMC at S-EL2 (Hafnium), increase non-secure memory to 3GB and keep
it in sync with the amount of memory used in a Xen configuration.

Hafnium configures memory based on it's manifest rather than the DTB
generated by QEMU, so update the manifest accordingly.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
diff --git a/qemu_v8.mk b/qemu_v8.mk
index 04eaa28..8f2b2f0 100644
--- a/qemu_v8.mk
+++ b/qemu_v8.mk
@@ -535,17 +535,17 @@
 
 ifeq ($(XEN_BOOT),y)
 QEMU_VIRT	= true
+QEMU_XEN	?= -drive if=none,file=$(XEN_EXT4),format=raw,id=hd1 \
+		   -device virtio-blk-device,drive=hd1
 else ifeq ($(SPMC_AT_EL),2)
 QEMU_VIRT	= true
 else
 QEMU_VIRT	= false
 endif
 
-ifeq ($(XEN_BOOT),y)
+ifeq ($(QEMU_VIRT),true)
 QEMU_MEM 	?= 3072
 QEMU_SMP	?= 4
-QEMU_XEN	?= -drive if=none,file=$(XEN_EXT4),format=raw,id=hd1 \
-		   -device virtio-blk-device,drive=hd1
 else
 QEMU_SMP 	?= 2
 QEMU_MEM 	?= 1057
diff --git a/qemu_v8/spmc_el2_manifest.dts b/qemu_v8/spmc_el2_manifest.dts
index c2f802d..2f898d4 100644
--- a/qemu_v8/spmc_el2_manifest.dts
+++ b/qemu_v8/spmc_el2_manifest.dts
@@ -11,7 +11,7 @@
 / {
 	compatible = "arm,ffa-core-manifest-1.0";
 	#address-cells = <2>;
-	#size-cells = <1>;
+	#size-cells = <2>;
 
 	attribute {
 		spmc_id = <0x8000>;
@@ -62,18 +62,18 @@
 	/* VIRT_SECURE_MEM */
 	memory@0 {
 		device_type = "memory";
-		reg = <0x0 0xe000000 0x1000000>;
+		reg = <0x0 0xe000000 0x0 0x1000000>;
 	};
 
 	/* NS memory */
 	memory@1 {
 		device_type = "ns-memory";
-		reg = <0x0 0x40000000 0x80000000>;
+		reg = <0x0 0x40000000 0x1 0x0>;
 	};
 
 	/* Device memory */
 	memory@2 {
 		device_type = "device-memory";
-		reg = <0x0 0x0 0xe000000>;
+		reg = <0x0 0x0 0x0 0xe000000>;
 	};
 };