test(memory share): lend device memory region to sp

Add test to check that a device memory region can be successfully
lent to an sp.

This requires some refactoring of the memory sharing test flow so
as to use the correct memory type and cachebility attributes for
the memory being lent. Also limit the words being written to 1
word for device memory so we only write to the data register of the
device.

Also only map device regions from UART2 so that UART0 can be used
by TFTF in the device sharing test.

Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Change-Id: I9f31769679883f34e0444db75a873765776a85e9
diff --git a/spm/cactus/cactus_main.c b/spm/cactus/cactus_main.c
index 1d5cd97..cc17da9 100644
--- a/spm/cactus/cactus_main.c
+++ b/spm/cactus/cactus_main.c
@@ -111,9 +111,9 @@
 }
 
 static const mmap_region_t cactus_mmap[] __attribute__((used)) = {
-	/* PLAT_ARM_DEVICE0 area includes UART2 necessary to console */
-	MAP_REGION_FLAT(PLAT_ARM_DEVICE0_BASE, PLAT_ARM_DEVICE0_SIZE,
+	MAP_REGION_FLAT(PLAT_CACTUS_DEVICE_BASE, PLAT_CACTUS_DEVICE_SIZE,
 			MT_DEVICE | MT_RW),
+
 	/* scratch memory allocated to be used for running SMMU tests */
 	MAP_REGION_FLAT(PLAT_CACTUS_MEMCPY_BASE, PLAT_CACTUS_MEMCPY_RANGE,
 			MT_MEMORY | MT_RW),