fix(lib/xlat): Assertions for `is_mmu_enabled`.
The runtime checks for some of the xlat APIs for
is_mmu_enabled() are replaced with assertions so as to make it
consistent across the RMM codebase.
Also, added assertions to some APIs to ensure that the
preconditions for calling the API are adhered to.
Modified the unit tests to check the above added assertion.
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: I03aecef79a8dd259a0755808b16f0218d44f4180
diff --git a/plat/arm/src/arm_memory.c b/plat/arm/src/arm_memory.c
index 01783df..f534572 100644
--- a/plat/arm/src/arm_memory.c
+++ b/plat/arm/src/arm_memory.c
@@ -16,6 +16,8 @@
struct ns_dram_bank *bank_ptr;
struct arm_dram_layout *dram_ptr = arm_get_dram_layout();
+ assert(!is_mmu_enabled());
+
/* Number of banks */
num_banks = plat_dram->num_banks;
assert(num_banks <= MAX_DRAM_NUM_BANKS);