mm: function to get the mode of a range of memory.

This supersedes mm_vm_is_mapped() since that is checking that the range
was not mapped with MM_MODE_INVALID.

Change-Id: Ic3d5018a6d207d092a7f6bf853b015eba22945bb
diff --git a/inc/hf/addr.h b/inc/hf/addr.h
index c37601d..08c7e12 100644
--- a/inc/hf/addr.h
+++ b/inc/hf/addr.h
@@ -53,6 +53,14 @@
 }
 
 /**
+ * Advances a physical address.
+ */
+static inline paddr_t pa_add(paddr_t pa, size_t n)
+{
+	return pa_init(pa_addr(pa) + n);
+}
+
+/**
  * Initializes an intermeditate physical address.
  */
 static inline ipaddr_t ipa_init(uintvaddr_t v)
@@ -69,6 +77,14 @@
 }
 
 /**
+ * Advances an intermediate physical address.
+ */
+static inline ipaddr_t ipa_add(ipaddr_t ipa, size_t n)
+{
+	return ipa_init(ipa_addr(ipa) + n);
+}
+
+/**
  * Initializes a virtual address.
  */
 static inline vaddr_t va_init(uintvaddr_t v)
@@ -85,14 +101,6 @@
 }
 
 /**
- * Advances a physical address.
- */
-static inline paddr_t pa_add(paddr_t pa, size_t n)
-{
-	return pa_init(pa_addr(pa) + n);
-}
-
-/**
  * Casts a physical address to a virtual address.
  */
 static inline vaddr_t va_from_pa(paddr_t pa)