From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 05/12] arm: Don't try to support CONFIG_ARMV7_LPAE on ARMv4T
Date: Fri, 9 Jun 2017 07:16:23 -0400 [thread overview]
Message-ID: <20170609111623.GZ10782@bill-the-cat> (raw)
In-Reply-To: <CAPnjgZ1Qfk9OcKWbc-EYfwErwH_YMwaCwJWAc-G6m1b94YThDQ@mail.gmail.com>
On Thu, Jun 08, 2017 at 09:00:17PM -0600, Simon Glass wrote:
> Hi Tom.
>
> On 22 May 2017 at 19:15, Tom Rini <trini@konsulko.com> wrote:
> > On Mon, May 22, 2017 at 05:17:25AM -0600, Simon Glass wrote:
> >
> >> At present if CONFIG_ARMV7_LPAE is defined then mmu_setup() will use
> >> instructions which are invalid on ARMv4T. This happens on Tegra since it
> >> has an ARMv4T boot CPU. Add a check for the architecture version to allow
> >> the code to be built. It will not actually be executed by the boot CPU,
> >> but needs to compile.
> >>
> >> Signed-off-by: Simon Glass <sjg@chromium.org>
> >> ---
> >>
> >> arch/arm/lib/cache-cp15.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
> >> index 0f7020a315..f293573601 100644
> >> --- a/arch/arm/lib/cache-cp15.c
> >> +++ b/arch/arm/lib/cache-cp15.c
> >> @@ -129,7 +129,7 @@ static inline void mmu_setup(void)
> >> dram_bank_mmu_setup(i);
> >> }
> >>
> >> -#ifdef CONFIG_ARMV7_LPAE
> >> +#if defined(CONFIG_ARMV7_LPAE) && __LINUX_ARM_ARCH__ != 4
> >> /* Set up 4 PTE entries pointing to our 4 1GB page tables */
> >> for (i = 0; i < 4; i++) {
> >> u64 *page_table = (u64 *)(gd->arch.tlb_addr + (4096 * 4));
> >
> > Wait, how do we get to this situation again, and how does it end up
> > being OK? SPL gets built for ARMv4T and U-Boot proper is built for v7,
> > and we end up doing LPAE enable in full U-Boot?
>
> Eek sorry I missed this question. The problem is that with ARMv4T this
> code does not currently build. On Tegra, if we enable
> CONFIG_ARMV7_LPAE, this code runs on ARMv7, but it still compiled by
> the ARMv7 boot CPU. So the change here is to make sure it is not
> compiled for ARMv4T.
>
> Another way of thinking about this is that ARMv4T does not support
> LPAE but we have no way to enable the option only for ARMv7. Both CPUs
> compile the same code. The __LINUX_ARM_ARCH__ option helps with this.
Ah, right. Thanks.
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170609/30b85cb5/attachment.sig>
next prev parent reply other threads:[~2017-06-09 11:16 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 11:17 [U-Boot] [PATCH 00/12] tegra: nyan-big: Support chainloading and add documentation Simon Glass
2017-05-22 11:17 ` [U-Boot] [PATCH 01/12] arm: arm720t: Support CONFIG_SKIP_LOWLEVEL_INIT_ONLY Simon Glass
2017-05-23 1:15 ` Tom Rini
2017-05-22 11:17 ` [U-Boot] [PATCH 02/12] tegra: Init clocks even when SPL did not run Simon Glass
2017-05-22 11:17 ` [U-Boot] [PATCH 03/12] tegra: dts: Add cros-ec SPI settings Simon Glass
2017-05-22 11:17 ` [U-Boot] [PATCH 04/12] arm: Rename HCTR to HTCR Simon Glass
2017-05-23 1:15 ` Tom Rini
2017-05-22 11:17 ` [U-Boot] [PATCH 05/12] arm: Don't try to support CONFIG_ARMV7_LPAE on ARMv4T Simon Glass
2017-05-23 1:15 ` Tom Rini
2017-06-09 3:00 ` Simon Glass
2017-06-09 11:16 ` Tom Rini [this message]
2017-05-22 11:17 ` [U-Boot] [PATCH 06/12] arm: Disable LPAE if not enabled Simon Glass
2017-05-23 1:15 ` Tom Rini
2017-05-22 11:17 ` [U-Boot] [PATCH 07/12] tegra: spi: Wait a little after setting the clocks Simon Glass
2017-05-22 11:17 ` [U-Boot] [PATCH 08/12] tegra: nyan-big: Enable the dhrystone benchmark Simon Glass
2017-05-22 11:17 ` [U-Boot] [PATCH 09/12] tegra: video: Don't power up the SOR twice Simon Glass
2017-06-07 12:52 ` Anatolij Gustschin
2017-05-22 11:17 ` [U-Boot] [PATCH 10/12] tegra: Enable CP15 init Simon Glass
2017-05-22 11:17 ` [U-Boot] [PATCH 11/12] tegra: clock: Avoid a divide-by-zero error Simon Glass
2017-05-22 11:17 ` [U-Boot] [PATCH 12/12] README: Add instructions for chain-loading U-Boot Simon Glass
2017-05-29 13:29 ` Peter Robinson
2017-06-01 3:11 ` Simon Glass
2017-05-31 18:28 ` [U-Boot] [PATCH 00/12] tegra: nyan-big: Support chainloading and add documentation Matthew Gorski
2017-05-31 18:40 ` Matthew Gorski
2017-05-31 19:19 ` Simon Glass
2017-06-01 13:52 ` Matthew Gorski
2017-06-07 11:58 ` Simon Glass
2017-06-07 15:32 ` Tom Warren
2017-06-07 15:41 ` Stephen Warren
2017-06-09 12:27 ` Simon Glass
2017-06-27 20:09 ` Thomas Hoff
2017-07-07 3:58 ` Simon Glass
2017-07-07 7:27 ` Thomas Hoff
2017-07-08 16:09 ` Simon Glass
2017-07-09 13:59 ` Tom Warren
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=20170609111623.GZ10782@bill-the-cat \
--to=trini@konsulko.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.