armv6 kernel support for Raspberry Pi 3 in default aarch32 mode

Sylvain Garrigues sylvain at sylvaingarrigues.com
Wed Aug 9 22:08:48 UTC 2017


Hello,

2017-08-09 22:38 GMT+02:00 Mark Millard <markmi at dsl-only.net>:
>
> FreeBSD does not have the state change management for ARMv8: it only
> uses/has an aarch64 configuration (once FreeBSD's initial configuration
> is in place anyway). There is no logic for ongoing execution-state
> changes as far as I know.
>
> As far as I know no one has set up a boot sequence for FreeBSD to
> go to an aarch32 variant of FreeBSD from some earlier stage of
> the boot sequence.


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).



> > So what's wrong and what shall be done to make our armv6 kernel boot on a
> > raspberry pi 3?
>
> > I am interested in getting directions to make this happen (modifications
> > needed in locore-v6.S?)
>
> To my knowledge no one has said they have ever figured this
> out for FreeBSD: it is a research project for whoever is
> interested enough to bother.


Apparently some people may have, so did Warner say a few weeks ago:
*"I've been told of people claiming to run a newer rpi2 **(v1.2 or newer)
in 32-bit mode, but I've not been able to confirm the **people who are
making the claims."*
(see this "Creating armv7 MACHINE_ARCH" thread:
https://docs.freebsd.org/cgi/getmsg.cgi?fetch=168619+0+/usr/local/www/mailindex/archive/2017/freebsd-arm/20170618.freebsd-arm
)


I just plugged my serial cable and put debug char at almost every
instruction in locore-v6.S to understand why we get the to raspberry pi
rainbow screen of depth before entering initarm: it seems to happen just
after the switch to virtual address with "ldr pc, =1f" (
https://github.com/freebsd/freebsd/blob/master/sys/arm/arm/locore-v6.S#L491).
That's when I don't get any more serial output although I did setup
early_putc and SOCDEV_PA & VA machinery to have early boot output - which I
do get with rpi2 v1.1).

I can try more debug if given instructions.

Sylvain


More information about the freebsd-arm mailing list