linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/7] arm64: efi: leave MMU and caches on at boot
@ 2022-08-27 15:58 Ard Biesheuvel
  2022-08-27 15:58 ` [PATCH v3 1/7] arm64: lds: reduce effective minimum image alignment to 64k Ard Biesheuvel
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2022-08-27 15:58 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: will, catalin.marinas, maz, mark.rutland, linux-efi, keescook,
	Ard Biesheuvel

Even though some of the patches in this series made an appearance in my
WXN series as well, this set amounts to a v3 of $SUBJECT, with only the
pieces that remain now that the groundwork has been merged into
v6.0-rc1. The v2 can be found here:
https://lore.kernel.org/all/20220330154205.2483167-1-ardb@kernel.org/

The purpose of this series is to remove any explicit cache maintenance
for coherency during early boot that becomes unnecessary if we simply
retain the cacheable 1:1 mapping of all of system RAM provided by EFI,
and use it to populate the ID map page tables. After setting up this
preliminary ID map, we disable the MMU, drop to EL1, reprogram the MAIR,
TCR and SCTLR registers as before, and proceed as usual, avoiding the
need for any manipulations of memory while the MMU and caches are off.

The only property of the firmware provided 1:1 map we rely on is that it
does not require any explicit cache maintenance for coherency - all else
is under control of the kernel itself, as before.

Ard Biesheuvel (7):
  arm64: lds: reduce effective minimum image alignment to 64k
  arm64: kernel: move ID map out of .text mapping
  arm64: head: record the MMU state at primary entry
  arm64: head: avoid cache invalidation when entering with the MMU on
  arm64: head: clean the ID map page to the PoC
  arm64: efi/libstub: use EFI_LOADER_CODE region when moving the kernel
    in memory
  arm64: efi/libstub: enter with the MMU on

 arch/arm64/include/asm/efi.h               |  7 --
 arch/arm64/kernel/Makefile                 |  9 +--
 arch/arm64/kernel/efi-entry.S              | 69 --------------------
 arch/arm64/kernel/head.S                   | 46 +++++++++++--
 arch/arm64/kernel/image-vars.h             |  6 +-
 arch/arm64/kernel/vmlinux.lds.S            | 13 +++-
 arch/arm64/mm/cache.S                      |  5 +-
 arch/arm64/mm/proc.S                       |  2 -
 drivers/firmware/efi/libstub/alignedmem.c  |  5 +-
 drivers/firmware/efi/libstub/arm64-stub.c  | 26 ++++++--
 drivers/firmware/efi/libstub/efistub.h     |  6 +-
 drivers/firmware/efi/libstub/mem.c         |  3 +-
 drivers/firmware/efi/libstub/randomalloc.c |  5 +-
 include/linux/efi.h                        |  6 +-
 14 files changed, 95 insertions(+), 113 deletions(-)
 delete mode 100644 arch/arm64/kernel/efi-entry.S

-- 
2.35.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-08-27 16:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-27 15:58 [PATCH v3 0/7] arm64: efi: leave MMU and caches on at boot Ard Biesheuvel
2022-08-27 15:58 ` [PATCH v3 1/7] arm64: lds: reduce effective minimum image alignment to 64k Ard Biesheuvel
2022-08-27 15:58 ` [PATCH v3 2/7] arm64: kernel: move ID map out of .text mapping Ard Biesheuvel
2022-08-27 15:58 ` [PATCH v3 3/7] arm64: head: record the MMU state at primary entry Ard Biesheuvel
2022-08-27 15:58 ` [PATCH v3 4/7] arm64: head: avoid cache invalidation when entering with the MMU on Ard Biesheuvel
2022-08-27 15:58 ` [PATCH v3 5/7] arm64: head: clean the ID map page to the PoC Ard Biesheuvel
2022-08-27 15:58 ` [PATCH v3 6/7] arm64: efi/libstub: use EFI_LOADER_CODE region when moving the kernel in memory Ard Biesheuvel
2022-08-27 15:58 ` [PATCH v3 7/7] arm64: efi/libstub: enter with the MMU on Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).