Enable Thumb for Aspeed 2400

Xo Wang xow at google.com
Sat Jan 6 07:25:52 AEDT 2018


@venture you might be interested in this.

On Thu, Jan 4, 2018 at 9:55 PM, Huy Duong <quochuybk2010 at gmail.com> wrote:
> Hi all,
>
> On Aspeed 2400, /proc/cpuinfo shows that Thumb is supported. But look like
> thumb is currently not enabled in Yocto.

The AST2400 build is already targeting the ARM926EJ-S and building for
architecture armv5te (see tune-arm926ejs.inc).

>
> I tried to add "ARMPKGSFX_THUMB = "t"" to
> meta-openbmc-bsp/meta-aspeed/meta-ast2400/conf/machine/include/ast2400.inc
> and see that everything still works well.

Right, packages still default to generating ARM code (as opposed to
Thumb code) because ARM_INSTRUCTION_SET isn't set. I think what you
did will force all packages to build emitting Thumb, even those that
prefer to be built emitting ARM.

>
> Is there any reason why Thumb is not enabled by default? I think Thumb can
> help to improve performance a lot.

You can experiment by weakly setting ARM_INSTRUCTION_SET ?= "thumb" in
your local.conf or machine configuration, which will default packages
to build emitting Thumb.

As for performance, can you back that up? It's my understanding that
Thumb (the first version) can be denser than ARM at the cost of
execution speed because of how limited the ISA is.

With that said, the AST2500 should have Thumb2 support, which ARM
claims minimal impact to performance for even more compact code than
Thumb. A quick glance through our build files shows that the AST2500
build is targeting base ARMv6 and Yocto might not even have support
for Thumb2 on ARMv6 (doesn't seem to pass the right gcc flags). It
doesn't look like a huge amount of work to get those right.

Either way, this could be low hanging fruit for reducing code size.

>
> --
> Thanks and best regards,
> Huy Duong

xo


More information about the openbmc mailing list