fix(mm): extend Stage 1 mapping limit
As Stage 1 mappings are limited to 512GB, registering FF-A RxTx buffers
fails when the physical address of these buffers exceeds 512GB. This
fix removes the limitation and allows Stage 1 mapping up to the
supported PA range.
Make necessary changes in hftest, to initialize stage-1 page table
maximum level for test running in VM and non-VM case. Also retain the
stage-1 PA range as 512GB for test running in VM.
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I4cb8d68fc18e0edf4a7ee06ae636849d552d72a9
diff --git a/src/mm.c b/src/mm.c
index 8075d02..2f07d2f 100644
--- a/src/mm.c
+++ b/src/mm.c
@@ -1117,6 +1117,11 @@
return false;
}
+ /* Initialize arch_mm before calling below mapping routines */
+ if (!arch_mm_init(ptable.root)) {
+ return false;
+ }
+
/* Let console driver map pages for itself. */
plat_console_mm_init(stage1_locked, ppool);
@@ -1130,5 +1135,5 @@
mm_identity_map(stage1_locked, layout_data_begin(), layout_data_end(),
MM_MODE_R | MM_MODE_W, ppool);
- return arch_mm_init(ptable.root);
+ return true;
}