提交 d1965c06 编写于 作者: M Markos Chandras 提交者: Ralf Baechle

MIPS: malta: malta-memory: Add free_init_pages_eva() callback

Use a Malta specific function to free the init section once the
kernel has booted. When operating in EVA mode, the physical memory
is shifted to 0x80000000. Kernel is loaded into 0x80000000 (virtual)
so the offset between physical and virtual addresses is 0.
Signed-off-by: NMarkos Chandras <markos.chandras@imgtec.com>
上级 3bdd8e6e
......@@ -111,6 +111,12 @@ fw_memblock_t * __init fw_getmdesc(int eva)
return &mdesc[0];
}
static void free_init_pages_eva_malta(void *begin, void *end)
{
free_init_pages("unused kernel", __pa_symbol((unsigned long *)begin),
__pa_symbol((unsigned long *)end));
}
static int __init fw_memtype_classify(unsigned int type)
{
switch (type) {
......@@ -128,6 +134,8 @@ void __init fw_meminit(void)
fw_memblock_t *p;
p = fw_getmdesc(config_enabled(CONFIG_EVA));
free_init_pages_eva = (config_enabled(CONFIG_EVA) ?
free_init_pages_eva_malta : NULL);
while (p->size) {
long type;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册