Monday, July 13

Changing System Architectures And The Complexities Of Apple’s Butterfly Approach To ISAs

Apple computers will be moving away from Intel chips to its own ARM-based design. An interesting thing about Apple as a company is that it has never felt the need to tie itself to a particular system architecture or ISA. Whereas a company like Microsoft mostly tied its fortunes to Intel’s x86 architecture, and IBM, Sun, HP and other giants preferred vertical integration, Apple is currently moving towards its fifth system architecture for its computers since the company was formed.

What makes this latest change possibly unique, however, is that instead of Apple relying on an external supplier for CPUs and peripheral ICs, they are now targeting a vertical integration approach. Although the ARM ISA is licensed to Apple by Arm Holdings, the ‘Apple Silicon’ design that is used in Apple’s ARM processors is their own, produced by Apple’s own engineers and produced by foundries at the behest of Apple.

In this article I would like to take a look back at Apple’s architectural decisions over the decades and how they made Apple’s move towards vertical integration practically a certainty.

A Product of its Time

The Apple I. Wooden board not included in delivery.

The 1970s was definitely the era when computing was brought to living rooms around the USA, with the Commodore PET, Tandy TRS-80 and the Apple II microcomputers defining the late 1970s. Only about a year before the Apple II’s release, the newly formed partnership between Steve Wozniak and Steve Jobs had produced the Apple I computer. The latter was sold as a bare, assembled PCB for $666.66 ($2,995 in 2019), with about 200 units sold.

Like the Apple I, the Apple II and the Commodore PET were all based on the MOS 6502 MPU (microprocessor unit), which was essentially a cheaper and faster version of Motorola’s 6800 MPU, with the Zilog Z80 being the other popular MPU option. What made the Apple II different was Wozniak’s engineering shortcuts to reduce hardware costs, using various tricks to save separate DRAM refresh circuitry and remove the need for separate video RAM. According to Wozniak in a May 1977 Byte interview, “[..] a personal computer should be small, reliable, convenient to use, and inexpensive.”

With the Apple III, Apple saw the need to provide backward compatibility with the Apple II, which was made easy because the former maintained the same 6502 MPU and a compatible hardware architecture. Apple’s engineers did however put in limitations that prevented the emulated Apple II system to access more than a fraction of the Apple III’s RAM and other hardware.

The 32-bit Motorola Era

With the ill-fated Apple Lisa (1983) and much more successful Apple Macintosh (1984), Apple transitioned to the Motorola 68000 (m68k) architecture. The Macintosh was the first system to feature what would become the classic Mac OS series of operating systems, at the time imaginatively titled ‘System 1‘. As the first step into the brave new world of 32-bit, GUI-based, mouse-driven desktops, it did not have any focus on backward compatibility. It also cost well over $6,000 when adjusted for inflation.

Welcome to the future of home computing.

The reign of m68k-based Macintosh systems lasted until the release of the Macintosh LC 580, in 1995. That system featured a Motorola 68LC040 running at 33 MHz. That particular CPU in the LC 580 featured a bug that caused incorrect operation when used with a software FPU emulator. Although a fixed version of the 68LC040 was introduced in mid-1995, this was too late to prevent many LC 580s from shipping with the flawed CPU.

The year before the LC 580 was released, the first Power Macintosh system had been already released after a few years of Apple working together with IBM on the PowerPC range of chips. The reason for this shift could be found mostly in the anemic performance of the CISC m68k architecture, with Apple worried that the industry’s move to the much better performing RISC architectures from IBM (POWER), MIPS, Sun (Sparc) and HP (PA-RISC). This left Apple no choice but to seek an alternative to the m68k platform.

Gain POWER or Go Vertical

The development of what came to be known as the Power Macintosh series of systems began in 1988, with Apple briefly flirting with the idea of making its own RISC CPU, to the point where they bought a Cray-1 super computer to assist in the design efforts. Ultimately they were forced to cancel this project due to a lack of expertise in this area, requiring a look at possible partners.

Apple would look at the available RISC offerings from Sun, MIPS, Intel (i860) and ARM, as well as Motorola’s 88110 (88000 RISC architecture). All but Motorola’s offering were initially rejected: Sun lacked the capacity to produce enough CPUs, MIPS had ties with Microsoft, Intel’s i860 was too complex, and IBM might not want to license its POWER1 core to third parties. Along the way, Apple did take a 43% stake in ARM, and would use an ARM processor in its Newton personal digital assistant.

Motorola 88110, or what could have been Apple’s future.

Under the ‘Jaguar’ project moniker, a system was developed that used the Motorola 88110, but the project was canceled when Apple’s product division president (Jean-Louis Gassée) left the company. Renewed doubt in the 88110 led to a meeting being arranged between Apple and IBM representatives, with the idea being to merge the POWER1’s seven chips into a single chip solution. With Motorola also present at this meeting, it was agreed to set up an alliance that would result in the PowerPC 601 chip.

Apple’s System 7 OS was rewritten to use PowerPC instructions instead of m68k ones, allowing it to be used with what would become the first PowerPC-based Macintosh, the Power Macintosh 6100. Because of the higher performance of PowerPC relative to m68k at the time, the Mac 68k emulator utility that came with all PowerPC Macs was sufficient to provide backward compatibility. Later versions used dynamic recompilation to provide even more performance.

Decade of POWER

Who doesn’t miss this Apple?

The PowerPC era is perhaps the most distinct of all Apple designs, with the colorful all-in-one iMac G3 and Power Macintosh G3 and Power Mac G4 along with the Power Mac G5 still being easily recognized computers that distinguished Apple systems from ‘PCs’. Unfortunately, by the time of the G4 and G5 series of PowerPC CPUs, their performance had fallen behind that of Intel’s and AMD’s x86-based offerings. Although Intel made a costly mistake with their Netburst (Pentium 4) architecture during the so-called ‘MHz wars’, this didn’t prevent PowerPC from falling further and further behind.

The Power Mac G5, with its water-cooled G5 CPUs, struggled to keep up with the competition and had poor performance-per-watt numbers. Frustrations between IBM and Apple about whether to focus on PowerPC or IBM’s evolution of server CPUs called ‘Power’ did not help here. This led Apple to the obvious conclusion: the future was CISC, with Intel x86. With the introduction of the Intel-based Mac Pro in 2006, Apple’s fourth architectural transition had commenced.

As with the transition from m68k to PPC back in the early 90s, a similar utility was used to the Mac 68k emulator, called Rosetta. This dynamic binary translator supports the translating of G3, G4 and AltiVec instructions, but not G5 ones. It also comes with a host of other compromises and performance limitations. For example, it does not support applications for Mac OS 9 and older (‘Classic’ Mac OS), nor Java applications.

The main difference between the Mac 68k emulator and Rosetta is that the former ran in kernel space, and the latter in user space, meaning that Rosetta is both much less effective and less efficient due to the overhead from task switching. These compromises led to Apple also introducing the ‘universal binary‘ format, also known as a ‘fat binary’ and ‘multi-architectural binary’. This means that the same executable can have binary code in it for more than one architecture, such as PowerPC and x86.

All’s Well that Ends Vertically Integrated

The Apple Silicon future.

A rare few of us may have missed the recent WWDC announcement where Apple made it official that it will be switching to the ARM system architecture, abandoning Intel after fourteen years. What the real reasons are behind this change will have to wait, for obvious reasons, but it was telling when Apple acquired P.A. Semi, a fabless semiconductor company, in 2009. Ever since Apple began to produce ARM SoCs for its iPhones instead of getting them from other companies, rumors have spread.

As the performance of this Apple Silicon began to match and exceed that of desktop Intel systems in benchmarks with the Apple iPhones and iPads, many felt that it was only a matter of time before Apple would make an announcement like this. There has also the lingering issue of Intel not having had a significant processor product refresh since introducing Skylake in 2015.

So there we are, then. It is 1994 and Apple has just announced that it will transition from m68k CISC to its own (ARM-based?) RISC architecture. Only it is 26 years later and Apple is transitioning from x86 CISC to its own ARM-based RISC architecture, seemingly completing a process that started back in the late 1980s at Apple.

As for the user experience during this transition, it’s effectively a repeat of the PowerPC to Intel transition during 2006 and onward, with Rosetta 2 (Rosetta Harder?) handling (some) binary translation tasks for applications that do not have a native ARM port yet and universal binaries (v2.0) for the other applications. Over the next decade or so Apple will find its straddling the divide between x86 and ARM before it can presumably settle into its new, vertically integrated home after nearly half a decade of flittering between foreign system architectures.

No comments:

Post a Comment