Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Oct 2019 08:56:53 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Mori Hiroki <yamori813@yahoo.co.jp>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: arm1136 support on CURRENT
Message-ID:  <CANCZdfqvRSqXohRe4mUP-mc8a6kbM9q7ytXwcOOWZAhxo7RPpw@mail.gmail.com>
In-Reply-To: <256784304.3333098.1570612921981.JavaMail.yahoo@jws701102.mail.ssk.yahoo.co.jp>
References:  <256784304.3333098.1570612921981.JavaMail.yahoo.ref@jws701102.mail.ssk.yahoo.co.jp> <256784304.3333098.1570612921981.JavaMail.yahoo@jws701102.mail.ssk.yahoo.co.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 9, 2019 at 3:22 AM Mori Hiroki <yamori813@yahoo.co.jp> wrote:

> Hi
>
> I try to Mindspeed Comcerto 1000 on CURRENT.
>
> Comcerto 1000 is arm1136.
>
> I write timer and pic code in kernel.
>
> http://dmesgd.nycbug.org/index.cgi?do=view&id=5136
>
>
> Now single user sh is crash.
>
> arm.armv6 clang default is 1176. But I want
> comple on 1136.
>
> How to comple on 1136 on arm.armv6 ?
>

You'll run into five different issues.

First issue is that clang's code generator is ill-tested for the 1136, so
you are likely to find bugs there. Your program died with SIGILL, so this
is likely.

Second issue is that we turn on bits in the CP of the 1176 that may not be
on the 1136. This is relevant because these bits control unaligned access.

Third issue is lld. It generates instructions that might not exist on the
1136. I know that's the issue for armv5.

Forth, our atomics assume at least a 1176. There was a discussion in one of
the code reviews, I think for atomics but may be wrong, about how the code
in question wouldn't work generically on armv6, but will on the 1176.

Finally, cache stuff is different between the 1176 and the Cortex v7 chips.
I recall other discussions that highlighted that the 1176 was different
than earlier armv6 processors wrt caches, but can't find them quickly nor
do I know if the 1136 is affected.

You may be able to get farther with an external gcc, but there's been a
long-term assumption that the 1176 is the minimum FreeBSD will run on, and
there will be significant resistance to changing that if the changes aren't
trivial tweaks in a couple of places.

There's also a long-term pressure to raise the minimum FreeBSD will run on
(In FreeBSD 13 we plant to remove the last bit of arm support < v6, for
example). Were it not for the RPi0, we'd also be looking at trimming the
1176 support as well due to lack of relevance. Bringing FreeBSD up on the
1136 runs counter to these trends.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqvRSqXohRe4mUP-mc8a6kbM9q7ytXwcOOWZAhxo7RPpw>