From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/9] arm: Move CP15 init out of cpu_init_crit()
Date: Mon, 24 Oct 2011 23:21:02 +0200 [thread overview]
Message-ID: <4EA5D6BE.8060206@aribaud.net> (raw)
In-Reply-To: <CAPnjgZ1Gt9dEEHsQ0F9=PBk4C2tENrQpy-=0nMuiQjJs3oWztg@mail.gmail.com>
Le 24/10/2011 22:14, Simon Glass a ?crit :
>>> So how about I create a patch to move the cp15_init() code into
>>> arch/arm/cpu/armv7/lib/lowlevel.S or similar so I can call it later?
>>
>> I don't mind moving it to armv7/lib. I do mind the "later".
>
> OK, but the AVP cannot execute this code, whereas the A9 needs to
> execute it on start-up.
Yes, and that's the real problem: if you did not have that AVP running
the same code path as the A9, you wouldn't even have though of moving
cp15 init elsewhere.
> We define CONFIG_SKIP_LOWLEVEL_INIT on Tegra, and the mere fact that
> this option exists suggests that platforms are permitted to do it. We
> don't need to do any memory init, and the CP15 init can be called in
> arch_cpu_init() once we establish that we are an A9 and not an AVP.
> Does that sound ok?
Yes, CONFIG_SKIP_LOWLEVEL_INIT exists for a reason, but that reason is
not "I'm running this code on two CPUs", it is "those inits have already
been done". CONFIG_SKIP_LOWLEVEL_INITS is meant for U-Boot being loaded
by SPL, so SPL has done the inits already.
And I also agree that we should do the cp15 init as soon as we have
checked that we're the A9, not the AVP.
But this check has to be done during low level init, based on some
immediate identification, not based on where in the code we are.
> The only problem I can see with this is if the data cache is on. This
> could happen if you load U-Boot with (say) tftp and jump to it. Well
> 'don't do that!'. We also hope that the D-cache has at least been
> flushed or there is nothing we can do. One fix for this (prior to the
> refactor you are planning and mentioned in your earlier email) is
> perhaps to implement a run-time check for the existence of CP15. Is
> that better or worse?
According to ARM, coprocessors 14 and 15 should always be supported from
ARMv6 up. Are you sure the AVP does not have it? If there is a Tegra
specification available, I'd like to have a look at it.
> Regards,
> Simon
Amicalement,
--
Albert.
next prev parent reply other threads:[~2011-10-24 21:21 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-13 21:05 [U-Boot] [PATCH 0/9] tegra2: Tidy up boot path Simon Glass
2011-10-13 21:05 ` [U-Boot] [PATCH 1/9] tegra2: Add arch_cpu_init() to fire up Cortex-A9 Simon Glass
2011-10-13 22:52 ` Mike Frysinger
2011-10-13 23:18 ` Simon Glass
2011-10-13 23:34 ` Mike Frysinger
2011-10-14 0:47 ` Simon Glass
2011-10-13 21:05 ` [U-Boot] [PATCH 2/9] tegra2: Simplify tegra_start() boot path Simon Glass
2011-10-13 21:05 ` [U-Boot] [PATCH 3/9] arm: Move CP15 init out of cpu_init_crit() Simon Glass
2011-10-21 20:58 ` Albert ARIBAUD
2011-10-21 21:18 ` Simon Glass
2011-10-21 21:43 ` Albert ARIBAUD
2011-10-21 21:54 ` Simon Glass
2011-10-21 22:24 ` Albert ARIBAUD
2011-10-22 5:05 ` Simon Glass
2011-10-22 7:56 ` Albert ARIBAUD
2011-10-22 16:13 ` Simon Glass
2011-10-24 19:34 ` Simon Glass
2011-10-24 20:04 ` Albert ARIBAUD
2011-10-24 20:14 ` Simon Glass
2011-10-24 21:21 ` Albert ARIBAUD [this message]
2011-10-25 5:02 ` Simon Glass
2011-10-25 6:41 ` Albert ARIBAUD
2011-10-25 13:44 ` Simon Glass
2011-10-25 21:16 ` Simon Glass
2011-10-27 20:05 ` Albert ARIBAUD
2011-10-27 20:17 ` Simon Glass
2011-10-27 22:39 ` Albert ARIBAUD
2011-10-27 22:46 ` Simon Glass
2011-10-28 1:43 ` Simon Glass
2011-10-28 5:09 ` Albert ARIBAUD
2011-10-29 0:36 ` Simon Glass
2011-10-30 10:16 ` Albert ARIBAUD
2011-10-31 21:44 ` Simon Glass
2011-10-31 22:54 ` Tom Warren
2011-11-05 5:17 ` Simon Glass
2011-11-05 8:09 ` Albert ARIBAUD
2011-11-05 13:36 ` Simon Glass
2011-10-28 5:07 ` Albert ARIBAUD
2011-11-05 8:17 ` Albert ARIBAUD
2011-11-05 14:00 ` Simon Glass
2011-10-13 21:05 ` [U-Boot] [PATCH 4/9] tegra2: Enable instruction cache Simon Glass
2011-10-13 21:05 ` [U-Boot] [PATCH 5/9] tegra2: Remove unneeded boot code Simon Glass
2011-10-13 21:06 ` [U-Boot] [PATCH 6/9] tegra2: Remove unneeded config option Simon Glass
2011-10-13 21:06 ` [U-Boot] [PATCH 7/9] tegra2: Remove unused low-level Tegra2 UART code Simon Glass
2011-10-13 21:06 ` [U-Boot] [PATCH 8/9] tegra2: Remove unneeded 'dynamic ram size' message Simon Glass
2011-10-13 21:06 ` [U-Boot] [PATCH 9/9] tegra2: Don't use board pointer before it is set up Simon Glass
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=4EA5D6BE.8060206@aribaud.net \
--to=albert.u.boot@aribaud.net \
--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