mm: treat level 0 page entries as blocks.
This simplifies the abstraction so all page table levels have entries
that are:
1. absent
2. tables -- references a next level table
3. block -- references a memory block, including a basic page
The arch implementation is left to handle the differences in
representation at the different levels.
Change-Id: If0d65d6ee727a699eb60d2375e1fda282e8ee3a8
diff --git a/src/load.c b/src/load.c
index b55455a..cd81237 100644
--- a/src/load.c
+++ b/src/load.c
@@ -123,11 +123,12 @@
/* Map the 1TB of memory. */
/* TODO: We should do a whitelist rather than a blacklist. */
- if (!mm_vm_identity_map(&primary_vm.ptable, pa_init(0),
- pa_init(1024ull * 1024 * 1024 * 1024),
- MM_MODE_R | MM_MODE_W | MM_MODE_X |
- MM_MODE_NOINVALIDATE,
- NULL)) {
+ if (!mm_vm_identity_map(
+ &primary_vm.ptable, pa_init(0),
+ pa_init(UINT64_C(1024) * 1024 * 1024 * 1024),
+ MM_MODE_R | MM_MODE_W | MM_MODE_X |
+ MM_MODE_NOINVALIDATE,
+ NULL)) {
dlog("Unable to initialise memory for primary vm\n");
return false;
}