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/arch/mm.h b/inc/hf/arch/mm.h
index 714a6d5..ef64dd3 100644
--- a/inc/hf/arch/mm.h
+++ b/inc/hf/arch/mm.h
@@ -155,6 +155,11 @@
uint32_t arch_mm_stage2_attrs_to_mode(uint64_t attrs);
/**
+ * Converts the stage-1 block attributes back to the corresponding mode.
+ */
+uint32_t arch_mm_stage1_attrs_to_mode(uint64_t attrs);
+
+/**
* Initializes the arch specific memory management.
*/
bool arch_mm_init(paddr_t table);