armv6 kernel support for Raspberry Pi 3 in default aarch32 mode

Mark Millard markmi at dsl-only.net
Thu Aug 10 01:46:05 UTC 2017


On 2017-Aug-9, at 4:58 PM, Mark Millard <markmi at dsl-only.net> wrote:

> On 2017-Aug-9, at 3:08 PM, Sylvain Garrigues <sylvain at sylvaingarrigues.com> wrote:
> 
>> . . .
>> 
>> On Raspberry Pi 3, the cortex-a53 processor starts in the aarch32 state if I'm correct, provided you don't add any arm_control=0x200 line in config.txt (no arm_control by default).  
>> 
>> . . .
> 
> [As we go beyond what I can find material to quote that
> directly applies take the word of folks like Ian Lepore
> (and others) over anything I write. (I'm lookging up
> things as I go.)]
> 
> Seems to be as you say above. But. . .
> 
> Note: aarch32 does not support armv6, just an
> variation on armv7. I've already listed in prior
> submittals some differences between aarch32 and
> armv7 that I found mention of. (Linux goes so far
> as to be configurable to partially-emulate some
> missing instructions, for example. FreeBSD does
> not.)
> 
> FreeBSD for aarch64 on an rpi3 is only designed to deal
> with its sysutils/u-boot-rpi3 u-boot context:
> 
> # more /usr/local/share/u-boot/u-boot-rpi3/config.txt 
> arm_control=0x200
> dtparam=audio=on,i2c_arm=on,spi=on
> dtoverlay=mmc
> dtoverlay=pi3-disable-bt
> device_tree_address=0x100
> kernel=u-boot.bin
> 
> This indicates that this u-boot likely is in control of
> the aarch32 vs. aarch64 execution state that the FreeBSD
> kernel starts in. And u-boot-rpi3 sets up aarch64 and
> the aarch64 FreeBSD kernel requires that if I understand
> right.
> 
> FreeBSD has no established u-boot variant for starting
> armv8 in an aarch32 execution state (or cortex-a53
> specifically) and no later stages of booting that
> are designed to handle handoff from such a u-boot
> variant. At least that is my understanding.
> 
> Similarly for FreeBSD armv6 (/v7) on an rpi2v1.1 (or before):
> 
> # more /usr/local/share/u-boot/u-boot-rpi2/config.txt
> disable_commandline_tags=0
> device_tree_address=0x100
> device_tree=rpi2.dtb
> kernel=u-boot.bin
> 
> This u-boot-rpi2 is not designed to deal with
> armv8 related early boot issues or other
> aarach32 vs. armv7 differences at all:
> It is limited to armv6/7: The design and
> implementation predate the v8 context and no
> armv8 or aarch32 support has been added as far
> as I know.  u-boot-rpi2, later loader stages,
> and possibly even FreeBSD may well still use
> instructions (or other things) that are not
> supported by the aarch32 execution state on
> armv8 (cortex-a53).
> 
> There is no u-boot variant that is explicitly
> for rpi2v1.2+.
> 
> 
> Overall: Supporting aarch32 is not automatic
> even if one starts from armv7 or specifically
> a cortex-a53 context unless one was lucky
> enough to happen to not touch or depend on
> any of the differences at any stage.
> . . .

I'll remind that if you try an old enough rpi2 B V1.1-
raspbian image/boot files it will not boot a rpi3. At
a given point they announced a file set that started to
support booting the rpi3. Quoting a reference to this:

https://www.raspberrypi.org/forums/viewtopic.php?t=58151

says:

"If you use a PI3, note that it will only boot past
the "rainbow screen" if you feed it the right (latest)
boot files. So in case of trouble try using the latest
Raspbian from the download page, or try updating your
older software on an earlier PI on which it boots,
with Raspbian that should work."

And:

https://www.raspberrypi.org/blog/raspberry-pi-3-on-sale/

says:

"You’ll need a recent NOOBS or Raspbian image from our
downloads page."



So: Raspbian and its related boot files did not
automatically support the rpi3 but had to be
changed to do so.



===
Mark Millard
markmi at dsl-only.net



More information about the freebsd-arm mailing list