Home
last modified time | relevance | path

Searched hist:"3 dcf60bb" (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/arch/arm64/kernel/
H A Dsleep.S3dcf60bb Wed Jan 11 04:22:35 CST 2023 Ard Biesheuvel <ardb@kernel.org> arm64: head: Clean the ID map and the HYP text to the PoC if needed

If we enter with the MMU and caches enabled, the bootloader may not have
performed any cache maintenance to the PoC. So clean the ID mapped page
to the PoC, to ensure that instruction and data accesses with the MMU
off see the correct data. For similar reasons, clean all the HYP text to
the PoC as well when entering at EL2 with the MMU and caches enabled.

Note that this means primary_entry() itself needs to be moved into the
ID map as well, as we will return from init_kernel_el() with the MMU and
caches off.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20230111102236.1430401-6-ardb@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
H A Dhead.S3dcf60bb Wed Jan 11 04:22:35 CST 2023 Ard Biesheuvel <ardb@kernel.org> arm64: head: Clean the ID map and the HYP text to the PoC if needed

If we enter with the MMU and caches enabled, the bootloader may not have
performed any cache maintenance to the PoC. So clean the ID mapped page
to the PoC, to ensure that instruction and data accesses with the MMU
off see the correct data. For similar reasons, clean all the HYP text to
the PoC as well when entering at EL2 with the MMU and caches enabled.

Note that this means primary_entry() itself needs to be moved into the
ID map as well, as we will return from init_kernel_el() with the MMU and
caches off.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20230111102236.1430401-6-ardb@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>