• Ard Biesheuvel's avatar
    efi: arm64: enter with MMU and caches enabled · 61786170
    Ard Biesheuvel authored
    Instead of cleaning the entire loaded kernel image to the PoC and
    disabling the MMU and caches before branching to the kernel's bare metal
    entry point, we can leave the MMU and caches enabled, and rely on EFI's
    cacheable 1:1 mapping of all of system RAM (which is mandated by the
    spec) to populate the initial page tables.
    
    This removes the need for managing coherency in software, which is
    tedious and error prone.
    
    Note that we still need to clean the executable region of the image to
    the PoU if this is required for I/D coherency, but only if we actually
    decided to move the image in memory, as otherwise, this will have been
    taken care of by the loader.
    
    This change affects both the builtin EFI stub as well as the zboot
    decompressor, which now carries the entire EFI stub along with the
    decompression code and the compressed image.
    Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
    Link: https://lore.kernel.org/r/20230111102236.1430401-7-ardb@kernel.orgSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    61786170
Makefile 6.89 KB