• James Morse's avatar
    arm64: sdei: Add trampoline code for remapping the kernel · 79e9aa59
    James Morse authored
    When CONFIG_UNMAP_KERNEL_AT_EL0 is set the SDEI entry point and the rest
    of the kernel may be unmapped when we take an event. If this may be the
    case, use an entry trampoline that can switch to the kernel page tables.
    
    We can't use the provided PSTATE to determine whether to switch page
    tables as we may have interrupted the kernel's entry trampoline, (or a
    normal-priority event that interrupted the kernel's entry trampoline).
    Instead test for a user ASID in ttbr1_el1.
    
    Save a value in regs->addr_limit to indicate whether we need to restore
    the original ASID when returning from this event. This value is only used
    by do_page_fault(), which we don't call with the SDEI regs.
    Signed-off-by: default avatarJames Morse <james.morse@arm.com>
    Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    79e9aa59
mmu.h 2.59 KB