[PATCH u-boot-mvebu 2/3] arm: mvebu: a37xx: Map CCI-400 and AP BootROM address space
marek.behun at nic.cz
Tue Feb 15 14:15:17 CET 2022
On Tue, 15 Feb 2022 14:04:47 +0100
Pali Rohár <pali at kernel.org> wrote:
> On Tuesday 15 February 2022 13:11:25 Marek Behún wrote:
> > On Tue, 15 Feb 2022 00:28:34 +0100
> > Pali Rohár <pali at kernel.org> wrote:
> > > In function build_mem_map() prepares also mapping for CCI-400 and
> > * prepare
> > > AP BootROM address space.
> > >
> > > A53 AP BootROM by default starts at address 0xfff00000 and is 16 kB long.
> > RVBAR_EL3 register has value 0xffff0000. The BootROM is 16 KiB long but
> > the window is 1 MiB long, so the content repeats every 4 KiB.
> > > CCI-400 in new TF-A version starts at address 0xfe000000 and is 64 kB long.
> > >
> > > Physical addresses are read directly from mvebu registers, so if TF-A
> > > remaps it in future then it would not cause any issue.
> > As we talked about in private conversation, I still don't think we
> > should do this unless it is needed.
> > CCI may be needed to be mapped if ever there is some driver that needs
> > to interact with it.
> > BootROM is never needed by the U-Boot code.
> > I really don't think that we should map these in production U-Boot
> > binaries for everyone, when the intention is "for debugging
> > purposes only". In the last 4 years there were 2 people (me, and you
> > :)) who were interested in BootROM. In the next 10 years there will be
> > maybe 2 more. So I really don't think the windows should be mapped for
> > everyone.
> I looked at this stuff because other people asked me about possibility
> to dump BootROM. So it is not "only me".
Even then, they can just enable the mapping once, dump the code and
publish it somewhere. No need to keep it enabled for everyone.
> Anyway, the main issue with all this stuff is that there is no public
> documentation for it and things which are missing in U-Boot would be
> missing forever (because there are only few people with access to
> documentation; which is even more incomplete, inconsistent and
> incorrect). So adding this stuff may help other people from community
> who would like to study this platform or code.
As I am saying above, the BootROM code needs to be dumped only once, if
someone wants it. No need to always keep the mapping. The code does not
> Note that, by default U-Boot has already enabled 'md', 'mw', 'pci' and
> so other commands which are intended for debug purposes only, so I do
> not see reason why _in this version_ cannot be mapped also BootROM code.
mw/cmp is not for debugging only. md may be, but mw can reasonably be
used from boot scripts.
> In _production version_ where is no debug capability and no access to
> any memory (just ability to boot) is is probably not needed, but none of
> A3720 board is building this kind of version (by default). And in case
> BootROM is mapped also in these versions, is there any issue with it?
My issue is that it isn't needed. You can just dump it once, publish it
somewhere, and you are done. No need to keep that window mapped for
> BootROM is read-only, same in all A3720 SoCs, so by this definition it
> is public and everybody can inspect it...
Yes, I also consider the BootROM blob public, since everyone can access
it if they know how to, and the necessary information for that is
available in TF-A.
> Stefan, what do you think about it?
> > Maybe you can map them if some debug option is enabled in menuconfig?
> > Marek
More information about the U-Boot