refactor(smmu): secure side DMA rand and memcpy
Add operation, source and size parameters to the cactus command
initiating an operation to the DMA test engine through the SMMU.
Add RAND48 operation support to the DMA test engine.
Refactor to a common run_testengine helper exercised by MEMCPY
and RAND48 SMMU operations.
Cactus SP dispatches either one of the operation based on the
operation id passed from TFTF.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I2ca7c303e8fef6baf99fe4b64b33102546b9ff30
diff --git a/include/runtime_services/cactus_test_cmds.h b/include/runtime_services/cactus_test_cmds.h
index 5f3d0d2..af5d066 100644
--- a/include/runtime_services/cactus_test_cmds.h
+++ b/include/runtime_services/cactus_test_cmds.h
@@ -394,10 +394,12 @@
#define CACTUS_DMA_SMMUv3_CMD (0x534d4d55)
static inline struct ffa_value cactus_send_dma_cmd(
- ffa_id_t source, ffa_id_t dest)
+ ffa_id_t source, ffa_id_t dest, uint32_t operation,
+ uintptr_t base, size_t range, uint32_t attributes)
{
- return cactus_send_cmd(source, dest, CACTUS_DMA_SMMUv3_CMD, 0, 0, 0,
- 0);
+ return cactus_send_cmd(source, dest, CACTUS_DMA_SMMUv3_CMD,
+ (uint64_t)operation, (uint64_t)base,
+ (uint64_t)range, attributes);
}
/*