powerpc/8xx: Map 32Mb of RAM at init.
At the time being, initial MMU setup allows 24 Mbytes of DATA and 8 Mbytes of code. Some debug setup like CONFIG_KASAN generate huge kernels with text size over the 8M limit and data over the 24 Mbytes limit. Here is an 8xx kernel compiled with CONFIG_KASAN_INLINE for one of my boards: [root@po16846vm linux-powerpc]# size -x vmlinux text data bss dec hex filename 0x111019c 0x41b0d4 0x490de0 26984528 19bc050 vmlinux This patch maps up to 32 Mbytes code based on _einittext symbol and allows 32 Mbytes of memory instead of 24. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
此提交包含在:
@@ -112,6 +112,9 @@ unsigned long __init mmu_mapin_ram(unsigned long top)
|
||||
mmu_patch_cmp_limit(&patch__itlbmiss_linmem_top, 0);
|
||||
} else {
|
||||
mapped = top & ~(LARGE_PAGE_SIZE_8M - 1);
|
||||
if (!IS_ENABLED(CONFIG_PIN_TLB_TEXT))
|
||||
mmu_patch_cmp_limit(&patch__itlbmiss_linmem_top,
|
||||
_ALIGN(__pa(_einittext), 8 << 20));
|
||||
}
|
||||
|
||||
mmu_patch_cmp_limit(&patch__dtlbmiss_linmem_top, mapped);
|
||||
@@ -140,8 +143,8 @@ void __init setup_initial_memory_limit(phys_addr_t first_memblock_base,
|
||||
*/
|
||||
BUG_ON(first_memblock_base != 0);
|
||||
|
||||
/* 8xx can only access 24MB at the moment */
|
||||
memblock_set_current_limit(min_t(u64, first_memblock_size, 0x01800000));
|
||||
/* 8xx can only access 32MB at the moment */
|
||||
memblock_set_current_limit(min_t(u64, first_memblock_size, 0x02000000));
|
||||
}
|
||||
|
||||
/*
|
||||
|
新增問題並參考
封鎖使用者