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/include/runtime_services/spm_common.h b/include/runtime_services/spm_common.h
index 6c01751..3fe154a 100644
--- a/include/runtime_services/spm_common.h
+++ b/include/runtime_services/spm_common.h
@@ -113,7 +113,8 @@
 bool memory_retrieve(struct mailbox_buffers *mb,
 		     struct ffa_memory_region **retrieved, uint64_t handle,
 		     ffa_id_t sender, struct ffa_memory_access receivers[],
-		     uint32_t receiver_count, ffa_memory_region_flags_t flags);
+		     uint32_t receiver_count, ffa_memory_region_flags_t flags,
+		     bool is_normal_memory);
 
 bool hypervisor_retrieve_request(struct mailbox_buffers *mb, uint64_t handle,
 				 void *out, uint32_t out_size);