From: Mark Rutland <mark.rutland@arm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 01/10] thunderx: Calculate TCR dynamically
Date: Thu, 25 Feb 2016 11:58:40 +0000 [thread overview]
Message-ID: <20160225115840.GA10593@leverpostej> (raw)
In-Reply-To: <56CDEACA.4080200@suse.de>
On Wed, Feb 24, 2016 at 06:39:22PM +0100, Alexander Graf wrote:
> On 02/24/2016 02:37 PM, Mark Rutland wrote:
> >On Wed, Feb 24, 2016 at 01:11:35PM +0100, Alexander Graf wrote:
> >>+ /* Calculate the maximum physical (and thus virtual) address */
> >>+ if (max_addr > (1ULL << 44)) {
> >>+ ips = 5;
> >>+ va_bits = 48;
> >>+ } else if (max_addr > (1ULL << 42)) {
> >>+ ips = 4;
> >>+ va_bits = 44;
> >>+ } else if (max_addr > (1ULL << 40)) {
> >>+ ips = 3;
> >>+ va_bits = 42;
> >>+ } else if (max_addr > (1ULL << 36)) {
> >>+ ips = 2;
> >>+ va_bits = 40;
> >>+ } else if (max_addr > (1ULL << 32)) {
> >>+ ips = 1;
> >>+ va_bits = 36;
> >>+ } else {
> >>+ ips = 0;
> >>+ va_bits = 32;
> >>+ }
> >In Linux we program IPS to the maximum PARange from ID_AA64MMFR0.
> >
> >If you did the same here you wouldn't have to iterate over all the
> >memory map entries to determine the maximum PA you care about (though
> >you may still need to do that for the VA size).
>
> Since we'd want to find the largest number for VA to trim one level
> of page table if we can, I don't see how it would buy is much to
> take the maximum supported PARange of the core into account.
It would simply be a saving of lines, as you'd program the same IPS
value regardless of max_addr (and you have to expect that PARange is
sufficient regardless).
Otherwise, yes, it doesn't buy you anything.
Thanks,
Mark.
next prev parent reply other threads:[~2016-02-25 11:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 12:11 [U-Boot] [PATCH 00/10] arm64: Unify MMU code Alexander Graf
2016-02-24 12:11 ` [U-Boot] [PATCH 01/10] thunderx: Calculate TCR dynamically Alexander Graf
2016-02-24 13:37 ` Mark Rutland
2016-02-24 17:39 ` Alexander Graf
2016-02-25 11:58 ` Mark Rutland [this message]
2016-02-24 12:11 ` [U-Boot] [PATCH 02/10] arm64: Make full va map code more dynamic Alexander Graf
2016-02-24 14:52 ` Mark Rutland
2016-02-24 18:14 ` Stephen Warren
2016-02-25 16:36 ` Alexander Graf
2016-02-26 19:25 ` Stephen Warren
2016-02-27 12:09 ` Alexander Graf
2016-02-29 16:52 ` Stephen Warren
2016-02-29 21:05 ` Alexander Graf
2016-02-24 12:11 ` [U-Boot] [PATCH 03/10] thunderx: Move mmu table into board file Alexander Graf
2016-02-24 12:11 ` [U-Boot] [PATCH 04/10] zymqmp: Replace home grown mmu code with generic table approach Alexander Graf
2016-02-24 12:11 ` [U-Boot] [PATCH 05/10] tegra: " Alexander Graf
2016-02-24 17:49 ` Stephen Warren
2016-02-24 12:11 ` [U-Boot] [PATCH 06/10] vexpress64: Add MMU tables Alexander Graf
2016-02-24 12:11 ` [U-Boot] [PATCH 07/10] dwmmc: Increase retry timeout Alexander Graf
2016-02-24 12:11 ` [U-Boot] [PATCH 08/10] hikey: Add MMU tables Alexander Graf
2016-02-24 12:11 ` [U-Boot] [PATCH 09/10] arm64: Remove non-full-va map code Alexander Graf
2016-02-24 12:11 ` [U-Boot] [PATCH 10/10] arm64: Only allow dcache disabled in SPL builds Alexander Graf
2016-02-24 12:19 ` [U-Boot] [PATCH 00/10] arm64: Unify MMU code Michal Simek
2016-02-24 13:36 ` Alexander Graf
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=20160225115840.GA10593@leverpostej \
--to=mark.rutland@arm.com \
--cc=u-boot@lists.denx.de \
/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