Running/building an 32 bits kernel on A53 CPU?

Catalin Marinas catalin.marinas at arm.com
Tue Nov 2 08:44:22 PDT 2021


On Tue, Nov 02, 2021 at 01:20:22PM +0000, Joakim Tjernlund wrote:
> On Fri, 2021-10-29 at 10:32 +0000, Joakim Tjernlund wrote:
> > On Fri, 2021-10-29 at 11:09 +0100, Catalin Marinas wrote:
> > > On Fri, Oct 29, 2021 at 08:27:35AM +0000, Joakim Tjernlund wrote:
> > > > In order to reduce RAM usage we are wondering if running an 32 bits
> > > > kernel on ARM A53 CPU is a good idea?
> > > 
> > > No. Really.
> > > 
> > > What's the RAM size on your SoC?
> > 
> > 32MB + 4MB SRAM
> > 
> > > 
> > > > Is it possible to build such a kernel? If so, how to go about it?
> > > > Should one use ARCH=arm and a 32 bits toolchain or
> > > > ARCH=arm64 and 64 bits toolchain and adding 32 bits compile options?
> > > 
> > > If you want a 32-bit kernel, you'd have to use ARCH=arm and a 32-bit
> > > toolchain. This would give you an ARMv7 kernel that can run on ARMv8
> > > hardware. But you'd miss errata workarounds for example and any other
> > > features that come with ARMv8.
> 
> Anything else you can think of why 32 bits kernel is a bad idea?

32-bit kernels on arm64 hardware are not "officially" supported by the
maintainers (though there are some commercial deployments).

Given the amount of RAM, you might as well give 32-bit uClinux a try ;)
(even less tested).

> I do wonder why 64 bits A53 enforces SMP? I only have one core in my
> HW(custom ASIC)

We removed it because we were not aware of any such UP system. Note that
even with CONFIG_SMP enabled, the kernel still runs fine on a UP system.
I guess you want to get rid of extra code in the final image.

-- 
Catalin



More information about the linux-arm-kernel mailing list