From: Ard Biesheuvel <ardb@kernel.org>
To: catalin.marinas@arm.com, will@kernel.org
Cc: maz@kernel.org, anshuman.khandual@arm.com,
linux-arm-kernel@lists.infradead.org, mark.rutland@arm.com,
Ard Biesheuvel <ardb@kernel.org>
Subject: [PATCH] arm64: booting: Require placement within 48-bit addressable memory
Date: Mon, 14 Nov 2022 12:58:10 +0100 [thread overview]
Message-ID: <20221114115810.1369005-1-ardb@kernel.org> (raw)
Some configurations (i.e., 64k + LVA/LPA) can tolerate a physical
placement of the kernel image outside of the 48-bit addressable region,
but given that the loader has no way of knowing whether or not the image
in question supports LVA/LPA, it currently has no choice but to place it
below the 48-bit mark.
Once we add support for LPA2, which allows 52-bit physical and virtual
addressing when using 4k or 16k pages, but in way that relies on
increasing the number of paging levels, there will be more variety in
the configurations that may or may not support this.
So repaint bit #3 in the Image header as 'must be placed within 48-bit
addressable memory', as this is the current de facto meaning, and add
bits that we may set later to allow placement outside of that.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
Documentation/arm64/booting.rst | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/Documentation/arm64/booting.rst b/Documentation/arm64/booting.rst
index 8c324ad638de2b27..9919e1a107add655 100644
--- a/Documentation/arm64/booting.rst
+++ b/Documentation/arm64/booting.rst
@@ -114,16 +114,21 @@ Header notes:
* 1 - 4K
* 2 - 16K
* 3 - 64K
- Bit 3 Kernel physical placement
+ Bit 3-4 Kernel physical placement
0
2MB aligned base should be as close as possible
to the base of DRAM, since memory below it is not
accessible via the linear mapping
1
+ 2MB aligned base such that base plus image_size is
+ entirely within the 48-bit addressable range
+ 2
+ Reserved
+ 3
2MB aligned base may be anywhere in physical
memory
- Bits 4-63 Reserved.
+ Bits 5-63 Reserved.
============= ===============================================================
- When image_size is zero, a bootloader should attempt to keep as much
--
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-11-14 11:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 11:58 Ard Biesheuvel [this message]
2022-11-14 12:10 ` [PATCH] arm64: booting: Require placement within 48-bit addressable memory Mark Rutland
2022-11-14 13:33 ` Ard Biesheuvel
2022-11-14 13:37 ` Mark Rutland
-- strict thread matches above, loose matches on Subject: below --
2022-11-22 17:02 Ard Biesheuvel
2022-11-22 17:03 ` Ard Biesheuvel
2022-11-23 6:29 ` Anshuman Khandual
2022-11-23 8:28 ` Ard Biesheuvel
2022-11-22 17:05 ` Mark Rutland
2022-11-23 13:26 ` Anshuman Khandual
2022-11-25 13:24 ` Will Deacon
2022-11-30 12:32 ` 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=20221114115810.1369005-1-ardb@kernel.org \
--to=ardb@kernel.org \
--cc=anshuman.khandual@arm.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.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).