Re: [PATCH v1 0/3] Meson A1 32-bit support

From: neil . armstrong
Date: Mon Feb 27 2023 - 09:47:03 EST


On 27/02/2023 15:28, Dmitry Rokosov wrote:
Hello Neil!

On Mon, Feb 27, 2023 at 09:15:04AM +0100, neil.armstrong@xxxxxxxxxx wrote:

[...]

I'm aware Amlogic also runs their kernel as 32bit to gain a few kbytes
of memory, but those processors are ARMv8 and the arm64 arch code
has been designed for those CPUs.

So far I didn't find a single good reason to add 32bit support for
ARMv8 Amlogic based SoCs, if you have a solid reason please share.

I totally agree with you, but I suppose it's fully related to 'big'
Amlogic SoC like S905_ or A311_ series. A113L (aka 'a1') is
a cost-efficient dual-core SoC which is used for small, cheap solutions
with cheap components. Every cent is important during BoM development.
That's why usually ODMs install small ROM and RAM capacity, and each
megabyte is important for RAM/ROM kernel and rootfs footprints.

Do you have figures ? is 32bit ARM kernel really lighter when ARM64 one is correctly configured ?

Why am I talking about rootfs? For such small projects a good
choice is buildroot rootfs assembling framework. Unfortunatelly,
buildroot doesn't support 'compat' mode when kernel and userspace have
a different bitness.

well this is a buildroot problem... the kernel itself is perfectly capable
of running an AArch32 userspace.

In the internal project, we save several
percents of ROM/RAM free space using 32-bit configuration (mostly rootfs
ROM space, to be honest). Therefore, for such 'little' cost-efficient
SoCs we can make an exception and support 32-bit configuration, from my
point of view.

32bit ARM is now "legacy", I would need to have an advice from the ARM SoC
maintainers, but AFAIK new ARMv8 SoCs should stay in arm64 arch.

Arnd ? Olof ? do you have an opinion on this ?


What do you think about that?


And as Krzysztof stated, the support is incomplete and cannot work
without a dts file.

Agreed, we shouldn't merge dead code. But there are several question to
discuss there. Please check my reply to Krzysztof message.

[...]