refactor(mm): use typedefs

* Add typedefs for memory modes and attrs
* Add typedef for page table levels
* Add typedef for the ptable ASID
* Rewrite `MM_MODE_` macros to use shifts instead of writing the
  value manually.

Change-Id: I783825777b4897692d48287fc689026a04ecba50
Signed-off-by: Karl Meakin <karl.meakin@arm.com>
diff --git a/src/ipi_test.cc b/src/ipi_test.cc
index 984c28b..91cc229 100644
--- a/src/ipi_test.cc
+++ b/src/ipi_test.cc
@@ -9,8 +9,11 @@
 #include <gmock/gmock.h>
 
 extern "C" {
+#include "hf/arch/mm.h"
+
 #include "hf/check.h"
 #include "hf/hf_ipi.h"
+#include "hf/mm.h"
 }
 
 #include <map>
@@ -32,7 +35,7 @@
  */
 
 constexpr size_t TEST_HEAP_SIZE = PAGE_SIZE * 64;
-const int TOP_LEVEL = arch_mm_stage2_max_level();
+const mm_level_t TOP_LEVEL = arch_mm_stage2_max_level();
 class ipi : public ::testing::Test
 {
        protected: