From: Ard Biesheuvel <ardb@kernel.org>
To: linux-arm-kernel@lists.infradead.org
Cc: will@kernel.org, catalin.marinas@arm.com, maz@kernel.org,
mark.rutland@arm.com, linux-efi@vger.kernel.org,
keescook@chromium.org, Ard Biesheuvel <ardb@kernel.org>
Subject: [PATCH v3 0/7] arm64: efi: leave MMU and caches on at boot
Date: Sat, 27 Aug 2022 17:58:45 +0200 [thread overview]
Message-ID: <20220827155852.3338551-1-ardb@kernel.org> (raw)
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
next reply other threads:[~2022-08-27 16:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-27 15:58 Ard Biesheuvel [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220827155852.3338551-1-ardb@kernel.org \
--to=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-efi@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).