The Performance Edge: Will The Problems With Speculative Processing That Effected G3 Upgrades Be Even A Bigger Problem With G4 Upgrades?
A Newer Technology White Paper
Speculative Processing Challenges
In G3 and G4 CPU Upgrade Designs For
Power Mac Computers
Designing a truly compatible PowerPC 750 (G3) or PowerPC 7400 (G4) CPU upgrade card for Apple Macintosh and clone computers requires engineering which some upgrade companies have not fully addressed. This white paper discusses various methods of dealing with speculative access compatibility problems and the tradeoffs involved with each approach.
Nearly all modern high performance processors perform speculative processing as a method to improve system performance. In fact, the first PowerPC processors - the 601 and 604 - perform speculative processing. The problem with putting a G3 or G4 processor upgrade in these systems is that the ROMs do not properly configure the G3 or G4, causing speculative processing to occur in an unintended and damaging way. If not dealt with properly, corruption of hard drive data, system crashes and incompatibility with system resources including the sound generator may occur.
What Is Speculative Processing?
The CPU is capable of executing multiple instructions at a time. When the system bus is not busy the CPU will guess, or speculate, which sequential instructions will be executed next and execute them immediately (in advance of actually needing them). If the guess is correct, a performance advantage is obtained because these instructions will not require additional time to execute. However, if the speculation is wrong, the CPU discards the results of the speculation and no harm is done. This works perfectly when speculative processing occurs in RAM or ROM memory space. However, speculative processing cannot be allowed when accessing non-memory devices such as system resources. Devastating problems could occur if speculative processing is allowed when accessing the hard drive controller, sound generator, video, Ethernet, serial, USB, keyboard, mouse, etc.
The Problem Of Speculative Processing Hardware
The problem with speculatively accessing hardware is that the data at these locations may change each time it is accessed. For example, when reading data from a hard drive, data is read as a stream of bytes stored in First In First Out (FIFO) memory. Data stored here is not copied (like data from memory) rather it is moved. Thus, when data is called for by the CPU it leaves the FIFO and moves to the CPU. If the FIFO is accessed speculatively, the data is in jeopardy of being lost. This happens when the Speculative Process is interrupted, and the processed results are discarded. In this case speculative processing will have to execute again. Unlike RAM and ROM, the FIFO memory no longer has the expected data. When the previously discarded speculative instructions are executed again, the FIFO will supply the next series of data in the FIFO, not the original data elements which have already been discarded.
Another more ominous problem with allowing speculative processing outside the ROM and RAM space is that certain status and control registers may change or be cleared as a result of an access. For example, your hard drive controller chip may require that the control registers be accessed in a particular order. If they are speculatively accessed and the speculation results are discarded, the control registers may be out of sync. This could cause data to be written to the wrong sector causing corruption of the Mac hard drive.
There are many ways speculative processing can get interrupted. Many of the system resources interrupt the processor on a regular basis. These include the real time clock, keyboard, video, mouse, SCSI and many other devices. It is not possible to determine in advance if an interrupt will occur at a critical or problematic time. Usually the Speculative Process completes without interruption and no problems occur.
Therefore, speculative processing outside of memory space will not always cause problems. Many PowerPC G3 processor upgrades did not address this problem since it seemed that problems happened infrequently or unpredictably. It was only after the MacWeek.com article of November 6, 1998 by Cameron Crotty, exposing the speculative processing problem, that processor upgrade companies began to address the issue. This article noted that Newer Technology had already detected and corrected the problem before the first MAXpowr processor upgrades were shipped, more than a year before the appearance of this MacWeek.com article.
Engineering For Speculative Processing Success
The speculative access issue is more of a challenge for G4 upgrade designers. This is because the G4 takes greater advantage of speculative processing due to its larger internal register structure which allows it to process greater amounts of data at a time in a speculative manner. This greatly increases the odds of a catastrophic error if the upgrade card is not designed correctly. There are three basic methods employed by upgrade companies to deal with the speculative processing compatibility issue.
The Hardware Solution
Hardware logic added to the G3 or G4 processor upgrade protects, or guards, all devices other than RAM or ROM from speculative processing. This protection is in place immediately at power-up and long before any hardware device accesses occur and before software can load. At the same time it preserves compatibility and performance by allowing speculative processing to occur for RAM and ROM. This is the only 100% compatible method for allowing the benefits of speculative processing while preventing problems.
Pros - Complete solution for correctly handling speculative accesses
Cons - Minimal additional cost for logic parts and additional engineering investment
The MAXpowr upgrades employ patent-pending logic which correctly configures the G3 or G4 processor.
The Software Solution
Many hardware devices begin functioning long before software extensions are loaded. If a software solution, using an Extension or Control Panel, is located on the hard drive but the hard drive cannot reliably be accessed, the paradox is obvious. Also, if the system is booted with extensions disabled, the software solution will also be disabled.
Pros - Inexpensive
Cons - Incomplete
The Firmware Solution
Open Firmware capability is built into all PCI machines and can be used to disable speculative processing before very much of the hardware is accessed. A paradox still exists because the hardware supporting Open Firmware must be configured and accessed before the speculative processing correction can be made. The major problem with this approach is that the firmware fix is stored in memory which can be cleared or erased by pressing the "Command/Option/p/r" keys immediately at power up or restart. This is a common method for setting system parameters to their defaults. If this is done early enough, not only is the PRAM cleared, but firmware patches are also cleared. All firmware patches can be cleared and thus are not completely reliable.
Pros - Inexpensive, better than software only
Cons - Incomplete, unreliable, easily erased by standard Mac diagnostic actions
Speculative processing problems with G4 are so severe that many Macintosh systems will not even recognize the hard drive if the speculative process problem is not corrected properly. If a firmware solution is employed and then cleared, the system may only display the question mark/disk icon after power up because the system can no longer see an operating system on the hard drive. The only bootable solution after this occurrence is to install a factory Apple CPU card - a Newer Technology MAXpowr processor upgrade will also work.
Ironically, the worst thing that can happen with an improperly designed processor upgrade card is for the system to actually boot. Anytime the hard drive is accessed without the proper speculative processing fix, all data on the hard drive is at risk, even if the system appears to boot normally.
Because the speculative processing problem is due to improper access to any hardware which controls In/Out functions, almost any symptom is possible. Also, minor system configuration changes can mask or reveal the problem. Some of the symptoms, and there are many, include almost any standard Macintosh function such as:
This speculative processing problem is not new. There has been much discussion concerning compatibility problems between certain brands of G3 processor upgrades and third party hardware and software products. Some dubbed this the "SCSI problem" because a popular Adaptec accelerated SCSI card was particularly sensitive to the speculative processing problem. Media 100 products and Dantz Retrospect back up software also revealed the incompatibilities of certain G3 upgrade card designs. Because the problems are less noticeable with G3 upgrades in most systems and may not occur consistently, these problems tended to get shrugged off by most users as anomalies. However, speculative processing problems are extremely common with G4 upgrades and cannot be ignored. Certainly Mac users will not ignore obvious compatibility problems.
It is possible to design G3 and G4 processor upgrades to be completely compatible with all upgradeable Apple Macintosh and clone models from the 7300 - 9600 and including Power Mac G3s. However, hardware containing logic to correct the speculative processing problem very early in the boot process is required.
Newer Technology identified these potential compatibility issues with upgrade cards during development of the MAXpowr G3 product line in late 1996, and then designed the MAXpowr G3 upgrade family from the ground up to be 100% compatible. Newer Technology's patent-pending method for dealing with the problem maintains 100% compatibility including support of the performance enhancing speculative processing built into all PowerPC chips.
Newer Technology's G4
processor upgrades are slated to be shipping beginning in December.