Skip to contentSkip to conversation

Enable Thumb for Aspeed 2400

DISCUSSION Huy Duong 2 participants 2 messages Jan 5, 2018

lore
Share & tools
lore

Huy Duong

author
#0 lore raw

Hi all,

On Aspeed 2400, /proc/cpuinfo shows that Thumb is supported. But look like thumb is currently not enabled in Yocto.

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.

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

Signature · 2 lines
Thanks and best regards,
Huy Duong
#1 lore raw

@venture you might be interested in this.

Quoted 4 lines · Huy Duong

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).

Quoted 4 lines

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.

Quoted 3 lines

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.

Quoted 4 lines

--
Thanks and best regards,
Huy Duong

xo