Third Party Product Compatibility Problems With Your G3 Upgrade and the Role Of Speculative Processing

by Gary Dailey

Speculative Processing and G3 Upgrades
A White Paper from XLR8

The question of Speculative Processing has raised some issues on the Macintosh platform, especially in respect to a variety of G3 upgrade products. This white paper is designed to address those questions and to enlighten the "non-technical" reader.

What is Speculative Processing?

Speculative Processing is a performance enhancement for PowerPC. In short, Speculative Processing is a good thing.

The PowerPC 750 can execute in a speculative fashion, i.e. if it has any spare time, it will guess which instructions will be executed later on, and start executing them immediately in an effort to save some time. If it guesses wrong it discards the results of the speculation and carries on -no harm done. However, the assumption that there was no harm done may be incorrect.

The Problem of Speculative Processing on Apple's PowerSurge Systems

(7500 through early 9600s and some clones)

At the time of designing the early 604e (PowerSurge) motherboards and the ROMs for those motherboards, Apple had limited advance information available on the PowerPC 750. In fact, at that time, the 750 was not being designed with desktop computing in mind. For whatever reason, Apple elected not to design dedicated support for the 750 and Speculative Processing into the early PowerSurge ROMs. Therefore, because of the lack of ROM support, when a PowerSurge machine boots with a 604e CPU installed Speculative Processing is not enabled.

However, when a PowerSurge boots with a G3 upgrade installed, it notes that the CPU is not a 604e, and so boots as a "Generic PowerPC", and by default enables Speculative Processing. But the PowerSurge ROMs do not prevent Speculative Processing from reading areas of memory that are potentially "volatile", i.e. those areas of memory from which the very act of reading a value alters the value.

Therefore when a G3 upgrade card performs Speculative Processing in a PowerSurge machine it may in fact have irreversible consequences because of accesses to volatile memory. If the speculation turns out to be incorrect, the damage cannot be undone; the values read cannot be restored. The visible effect to the user is often machine lock-ups, or erratic behavior of hardware devices. Hardware devices are the most likely to fail, because volatile memory is virtually always associated with them. It is not a bug in the devices; it is simply how they work.

The fix is relatively straightforward-- don't allow speculation to access hardware related memory. There are basically two ways to accomplish this.

The first -- If speculation attempts to access hardware related memory, prevent it from doing so. Marking the address ranges that contain the hardware devices as "guarded" does this. Speculative accesses to guarded memory are not permitted. A software fix using this technique can be updated. Hardware fixes (such as custom card ROMs) usually must be reprogrammed or interchanged.

The second -- This technique is a bit simpler. Disable Speculative Processing altogether. Basically, this is a "2x4" approach. Speculative Processing is an optional process, so disabling has zero inherent problems. The performance hit is relatively small (2-3%), possibly due to the inefficiency of Speculative Processing on the Mac, or in contrast due to the efficiency of the backside cache on the G3.

The Art of Disabling Speculative Processing and Virtual FirmwareŘ.

Given the choices, the maximum compatible solution is to simply disable Speculative Processing. This can be accomplished by an extension when the system starts up. The problem with this approach however, is that some hardware devices need to function long before extensions are loaded. The most obvious examples are SCSI accelerators. If the SCSI accelerator is affected by speculative processing, the chances of it working long enough to even get to the extension are remote.

Some G3 upgrade companies offer Speculative Processing fixes that address the issue through a system extension. They continue to suffer from having to load after the hardware is initialized.

Another company has addressed the issue by loading a small amount of code early in the system boot-up process. The problem with this technique is that if system extensions are disabled, or PRAM (parameter random access memory) is "zapped" (erased by pressing command/option/p/r on boot up, to clean corruption and intermittent problems), then the code is removed and the third party products will no longer function correctly. For example, Adaptec's 2940UW SCSI card will not be able to boot after zapping PRAM or disabling extensions.

XLR8 has addressed this issue differently. Using some of the same techniques to disable Speculative Processing, XLR8 has developed a technique known as Virtual Firmware. This technique allows XLR8 to create software-based routines that like other "early loading" solutions, loads before hardware, but unlike the others, is not volatile. Virtual Firmware cannot be flushed by PRAM zapping techniques and continues to function, even when extensions are disabled.

Virtual Firmware gives XLR8 the flexibility of software with the robustness of a hardware solution. The best of both worlds. One drawback is that Virtual Firmware utilizes undocumented areas of Apple hardware that can be eliminated on future releases of Apple systems. Fortunately this is not a problem, since future systems will not require the use of Virtual Firmware.

Additional Notes on Speculative Processing

Speculative Processing is not an issue on the Power Macintosh G3 or the latest ROM release on the 9600 and 8600 systems manufactured after September 1997. These systems have full support for G3 based Speculative Processing, and continue to work well with all third party products.

XLR8 has released version 1.3 of its G3 Control for use on all G3 upgrade cards. This version implements Virtual Firmware and a variety of other techniques adding compatibility, simplicity and elegance to the Macintosh experience.

A Final Note on Upgrade Futures

The development of techniques like Virtual Firmware demonstrates resurgence in a high-level of engineering expertise in the Macintosh upgrade developer community.

Companies like XLR8 are dedicated to restoring unsurpassed engineering expertise to the Macintosh industry and are rewarding users with timely, quality solutions. The winner will be the user-- and the Mac.

Gary Dailey. Product Manager, XLR8

[Editor's Note: Have you tried XLR8's Virtual Firmware? Do you recommend it? Has it cleared up the compatibility problems you were having. Think writing to undocumented areas of Apple's hardware is a good idea? Share your thoughts with us on the Community Bulletin Board]

Internal Links

  • MacSpeedZone's CPU Upgrade Page
  • MacSpeedZone's Graphics Card Upgrade Page
  • MacSpeedZone's Machine Upgrade Page Index
  • External Links

  • XLR8's Web Site

  • For Free Macintosh Hardware Click Here