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/inc/hf/ffa/ffa_memory.h b/inc/hf/ffa/ffa_memory.h
index ee00e14..ad0e9ad 100644
--- a/inc/hf/ffa/ffa_memory.h
+++ b/inc/hf/ffa/ffa_memory.h
@@ -9,6 +9,7 @@
#pragma once
#include "hf/ffa.h"
+#include "hf/mm.h"
#include "hf/vm.h"
/** Check validity of the FF-A memory send function attempt. */
@@ -41,7 +42,7 @@
* it. The SPMC will return MM_MODE_NS, and the hypervisor 0 as it only deals
* with NS accesses by default.
*/
-uint32_t ffa_memory_get_other_world_mode(void);
+mm_mode_t ffa_memory_get_other_world_mode(void);
bool ffa_memory_is_mem_perm_get_valid(const struct vcpu *current);
bool ffa_memory_is_mem_perm_set_valid(const struct vcpu *current);
@@ -74,4 +75,4 @@
* Set the security bit in `attributes` if specified by `mode`.
*/
ffa_memory_attributes_t ffa_memory_add_security_bit_from_mode(
- ffa_memory_attributes_t attributes, uint32_t mode);
+ ffa_memory_attributes_t attributes, mm_mode_t mode);