Move VM ID from `struct mm_ptable` to `struct vm`.
The ID is a property of the VM and when it is needed along side the
ptable, both pieces of information are available.
Change-Id: I4c6165b931a4acd8128a21a9cc92880a1b47ceae
diff --git a/src/mm.c b/src/mm.c
index 776f7a6..9c708cf 100644
--- a/src/mm.c
+++ b/src/mm.c
@@ -426,7 +426,7 @@
/**
* Initialises the given page table.
*/
-bool mm_ptable_init(struct mm_ptable *t, uint32_t id, int mode)
+bool mm_ptable_init(struct mm_ptable *t, int mode)
{
size_t i;
pte_t *table;
@@ -448,7 +448,6 @@
/* TODO: halloc could return a virtual or physical address if mm not
* enabled? */
t->table = pa_init((uintpaddr_t)table);
- t->id = id;
return true;
}
@@ -556,7 +555,7 @@
dlog("rodata: 0x%x - 0x%x\n", rodata_begin, rodata_end);
dlog("data: 0x%x - 0x%x\n", data_begin, data_end);
- if (!mm_ptable_init(&ptable, 0, MM_MODE_NOSYNC | MM_MODE_STAGE1)) {
+ if (!mm_ptable_init(&ptable, MM_MODE_NOSYNC | MM_MODE_STAGE1)) {
dlog("Unable to allocate memory for page table.\n");
return false;
}