feat(iommu): map memory regions into dma page tables

In order to enforce access control for each dma device upstream of an
IOMMU, SPMC maintains a set of page tables for each dma device and maps
the memory region with specified attributes into the above set of
dedicated page tables.

This ensures that each DMA device has only access to limited set of
memory regions as defined in the partition manifest.

Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
Change-Id: I7061d06256fe6fc632f6e2a7d6ff53a2484ec64a
diff --git a/src/vm.c b/src/vm.c
index 57353a3..266c3bc 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -17,6 +17,7 @@
 #include "hf/dlog.h"
 #include "hf/ffa.h"
 #include "hf/layout.h"
+#include "hf/plat/iommu.h"
 #include "hf/std.h"
 
 #include "vmapi/hf/call.h"
@@ -381,6 +382,14 @@
 	return arch_vm_mem_get_mode(vm_locked, begin, end, mode);
 }
 
+bool vm_iommu_mm_identity_map(struct vm_locked vm_locked, paddr_t begin,
+			      paddr_t end, uint32_t mode, struct mpool *ppool,
+			      ipaddr_t *ipa, uint8_t dma_device_id)
+{
+	return arch_vm_iommu_mm_identity_map(vm_locked, begin, end, mode, ppool,
+					     ipa, dma_device_id);
+}
+
 bool vm_mailbox_state_busy(struct vm_locked vm_locked)
 {
 	return vm_locked.vm->mailbox.state != MAILBOX_STATE_EMPTY ||