Archive for January, 2017

64-bit ARM is here

23 Jan


Last year I updated my Raspbian ARM Assembly Language book to cover the Raspberry Pi 3 release.  The major addition was to update some of the program examples to reflect address changes in the operating system, especially which access the GPIO port. No great shakes.

However, the release of the Raspberry PI 3 includes a major internal change in that the system was moved onto an ARMv8 architecture with the introduction of the ARM-Cortex A53 microprocessor as the CPU of choice. The ARMv8 architecture had introduced with its release a 64-bit system, as well as the traditional 32-bit system. Both brought with them two new instruction sets. Well, the 32-bit system, now called AArch32, was largely backward compatible with the original ARM instruction set, whilst AArch64 was an entirely new instruction set altogether.

At the time, there were no new operating systems for the Raspberry Pi to take advantage of the 64-bit infrastructure. So, the A53 chip was operated in AARch32 mode and was effectively running as an ARMv7 architecture. Raspbian – the ‘official’ operating system, remains a 32-bit based system and is likely to remain so for the foreseeable future.  It would need to be re-written to utilise AArch64.

Recently several 64-bit systems have been developed, Arch Linux now has a 64-bit flavour for the RPi and others are becoming available, so for coders anxious to learn more the tools are there.

The current Raspbian Assembly Language book will not be updated to include 64-bit programming. Mainly because the two are like chalk and cheese. Although there are some similarities, there is also a lot of change and also redundancy. The option remains, of course, to write a 64-bit Assembly Language book and that is what I am investigating at the moment.

You cannot switch between AArch32 and AArch64 modes within programs in the same way you can with ‘old’ ARM and Thumb instruction – called interworking – it is one or the other. So how you boot your system determines what mode you operate at the processor level. AArch32 should ensure that the fantastic backward capability that is so inherently part of the ARM design remaining. But AArch64 is a totally different beast!

As for an AArch64 Assembly Language book? Watch this space…