Skip to content
  • Ard Biesheuvel's avatar
    arm64: cover the .head.text section in the .text segment mapping · 7eb90f2f
    Ard Biesheuvel authored
    
    
    Keeping .head.text out of the .text mapping buys us very little: its actual
    payload is only 4 KB, most of which is padding, but the page alignment may
    add up to 2 MB (in case of CONFIG_DEBUG_ALIGN_RODATA=y) of additional
    padding to the uncompressed kernel Image.
    
    Also, on 4 KB granule kernels, the 4 KB misalignment of .text forces us to
    map the adjacent 56 KB of code without the PTE_CONT attribute, and since
    this region contains things like the vector table and the GIC interrupt
    handling entry point, this region is likely to benefit from the reduced TLB
    pressure that results from PTE_CONT mappings.
    
    So remove the alignment between the .head.text and .text sections, and use
    the [_text, _etext) rather than the [_stext, _etext) interval for mapping
    the .text segment.
    
    Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    7eb90f2f