Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Help improving the installation guide and support hardware lists



Sad Clouds <cryintothebluesky%gmail.com@localhost> wrote:
>Also, I think it would be useful to document ARM 32-bit vs 64-bit and
>how this is supported on various boards. I think Raspberry Pi can run
>in either mode, but it doesn't have enough RAM to justify 64-bit mode.
>In fact, on this hardware 64-bit multiplication is 1/3 the throughput
>of 32-bit multiplication. See this discussion: 
>
>https://community.arm.com/developer/ip-products/processors/f/cortex-a-forum/46345/arm-cortex-a72-64-bit-multiply-madd-instruction-low-throughput
>
>So with regard to NetBSD:
>
>- Can NetBSD aarch64 support 32-bit emulation?

There are multiple builds of 32-bit userland.

An earmv4 or earmv5 userland won't work with an aarch64 kernel as there
isn't currently any emulation of the SWP instruction.

Running an earmv6 or earmv7 userland should work now, they use a
different page size to aarch64, 8Kb vs 4KB, but this should be handled
correctly by jemalloc().

The thing that is missing is getting the system to use the correct
architecture for pkgsrc.

For sparc64, we have an option of building a 64-bit kernel so that it
identifies itself to userland as 32-bit. We could do this for aarch64 as
well.

For just building earmv[67] packages on an aarch64 system you can
use pkgtools/libkver to make a chroot tree think it is running on
a 32-bit kernel.

>- Is there a difference in kernel drivers for 32-bit vs 64-bit, i.e.
>  do some things work well in one mode but not the other?

There shouldn't be a difference.

>- How do you build 32-bit image? I tend to use
>  "build.sh -m evbarm -a earmv7hf" but had to add hacks to mk.conf as
>  parts of NetBSD use older assembly and fail to build with specific
>  -mcpu flags, so need to use -mtune instead.
>
># RPI3 CPU: cortex-a53
># RPI4 CPU: cortex-a72
>.if empty(CPUFLAGS:M-march=*) && empty(CPUFLAGS:M-mcpu=*)
>CPUFLAGS+=-mcpu=cortex-a53
>#CPUFLAGS+=-mcpu=cortex-a72
>.else
>CPUFLAGS+=-mtune=cortex-a53
>#CPUFLAGS+=-mtune=cortex-a72

Again, using AArch64 compiler options in a ARM build isn't really
supported. The cross toolchain in an earmv7hf build will be 32-bit.



Home | Main Index | Thread Index | Old Index