Added freeing of pager init memory, but this memory is currently not utilized.

This commit is contained in:
Bahadir Balban
2009-08-19 16:26:44 +03:00
parent 9c03d57d63
commit dabc448c4e
7 changed files with 74 additions and 12 deletions

View File

@@ -207,6 +207,33 @@ int start_boot_tasks(struct initdata *initdata)
return 0;
}
extern unsigned long _start_init[];
extern unsigned long _end_init[];
/*
* Copy all necessary data from initmem to real memory,
* release initdata and any init memory used
*/
void copy_release_initdata(struct initdata *initdata)
{
/*
* Copy boot capabilities to a list of
* real capabilities
*/
copy_boot_capabilities(initdata);
/* Free and unmap init memory:
*
* FIXME: We can and do safely unmap the boot
* memory here, but because we don't utilize it yet,
* it remains as if it is a used block
*/
l4_unmap(_start_init,
__pfn(page_align_up(_end_init - _start_init)),
self_tid());
}
void init_mm(struct initdata *initdata)
{
@@ -257,6 +284,9 @@ void init_pager(void)
start_boot_tasks(&initdata);
/* Copy necessary initdata info */
copy_release_initdata(&initdata);
mm0_test_global_vm_integrity();
}