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/tftf/tests/tests-memory-access.xml b/tftf/tests/tests-memory-access.xml
index 49965a0..200c5dd 100644
--- a/tftf/tests/tests-memory-access.xml
+++ b/tftf/tests/tests-memory-access.xml
@@ -18,6 +18,8 @@
function="test_mem_share_sp" />
<testcase name="Donate Memory to Secure World"
function="test_mem_donate_sp"/>
+ <testcase name="Lend Device Memory to Secure World"
+ function="test_ffa_mem_lend_device_memory_sp" />
<testcase name="Request Share Memory SP-to-SP"
function="test_req_mem_share_sp_to_sp" />
<testcase name="Request Lend Memory SP-to-SP"