linux/arch/arm64/mm
Mark Rutland bd00cd5f8c arm64: place initial page tables above the kernel
Currently we place swapper_pg_dir and idmap_pg_dir below the kernel
image, between PHYS_OFFSET and (PHYS_OFFSET + TEXT_OFFSET). However,
bootloaders may use portions of this memory below the kernel and we do
not parse the memory reservation list until after the MMU has been
enabled. As such we may clobber some memory a bootloader wishes to have
preserved.

To enable the use of all of this memory by bootloaders (when the
required memory reservations are communicated to the kernel) it is
necessary to move our initial page tables elsewhere. As we currently
have an effectively unbound requirement for memory at the end of the
kernel image for .bss, we can place the page tables here.

This patch moves the initial page table to the end of the kernel image,
after the BSS. As they do not consist of any initialised data they will
be stripped from the kernel Image as with the BSS. The BSS clearing
routine is updated to stop at __bss_stop rather than _end so as to not
clobber the page tables, and memory reservations made redundant by the
new organisation are removed.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Laura Abbott <lauraa@codeaurora.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-07-10 12:36:12 +01:00
..
cache.S arm64: mm: use inner-shareable barriers for inner-shareable maintenance 2014-05-09 17:21:24 +01:00
context.c arm64: Process management 2012-09-17 13:41:58 +01:00
copypage.c arm64: MMU fault handling and page table management 2012-09-17 13:41:57 +01:00
dma-mapping.c arm64: Clean up the default pgprot setting 2014-05-09 15:53:37 +01:00
extable.c arm64: MMU fault handling and page table management 2012-09-17 13:41:57 +01:00
fault.c Revert "arm64: Introduce execute-only page access permissions" 2014-05-16 16:44:32 +01:00
flush.c arm64: mm: Make icache synchronisation logic huge page aware 2014-07-04 14:26:01 +01:00
hugetlbpage.c hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-04 16:53:51 -07:00
init.c arm64: place initial page tables above the kernel 2014-07-10 12:36:12 +01:00
ioremap.c arm64: add early_ioremap support 2014-04-07 16:36:15 -07:00
Makefile arm64: mm: Optimise tlb flush logic where we have >4K granule 2014-05-09 17:00:48 +01:00
mm.h arm64: Remove __flush_dcache_page() 2013-06-07 17:58:30 +01:00
mmap.c mm: remove free_area_cache 2013-07-10 18:11:34 -07:00
mmu.c - Optimised assembly string/memory routines (based on the AArch64 Cortex 2014-06-06 10:43:28 -07:00
pgd.c arm64: simplify pgd_alloc 2014-02-05 10:45:07 +00:00
proc-macros.S arm64: mm: use ubfm for dcache_line_size 2014-01-22 16:23:58 +00:00
proc.S arm64: mm: use inner-shareable barriers for inner-shareable maintenance 2014-05-09 17:21:24 +01:00