VHE: Add helper to get attributes of a stage 1 va range.
This patch adds a new helper function mm_get_mode, similar to
mm_vm_get_mode, to get the attributes of a stage 1 va range. This is
useful to be able to get memory attributes of a EL0 partitions va range
for example. This patchset modifies the existing function
mm_vm_get_attrs to take flags as an argument so that the same function
can work with stage 1 tables as well. Also added helper function to
convert attributes to mode for stage 1 similar to stage 2 helper
function.
Change-Id: I9dd23a7728830641bec46970fb6fa711240f8516
Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
diff --git a/inc/hf/mm.h b/inc/hf/mm.h
index 54d9f94..4bdae13 100644
--- a/inc/hf/mm.h
+++ b/inc/hf/mm.h
@@ -131,6 +131,8 @@
void mm_vm_dump(struct mm_ptable *t);
bool mm_vm_get_mode(struct mm_ptable *t, ipaddr_t begin, ipaddr_t end,
uint32_t *mode);
+bool mm_get_mode(struct mm_ptable *t, vaddr_t begin, vaddr_t end,
+ uint32_t *mode);
struct mm_stage1_locked mm_lock_ptable_unsafe(struct mm_ptable *ptable);
struct mm_stage1_locked mm_lock_stage1(void);