The other day I was asked an interesting question: What was the first BIOS with support for ROM shadowing? In the 1990s, ROM shadowing was common, at first as a pure performance enhancement and later as a functional requirement; newer firmware is stored compressed in ROM and must be decompressed into RAM first, and firmware may also rely on writing to itself before being locked down and write protected.

Old PCs did not use ROM shadowing because it made no sense. ROMs were only marginally slower than RAM, if at all, and RAM was too precious to waste on mirroring the contents of existing ROMs. Over the years, RAM speeds shot up while ROM remained slow. By about 1990, executing BIOS code from ROM incurred a noticeable performance penalty, and at the same time devoting 64 or 128 KB to ROM shadowing was no longer prohibitively expensive.

But who did it first?

Researching BIOS history is quite difficult. Neither clone BIOSes nor major OEM BIOSes (IBM, Compaq, Dell, HP) are particularly well documented, and obtaining samples is tricky.

ROM shadowing requires chipset support, so I thought I’d start with looking at datasheets. Picking a few random Chips & Technologies datasheets, I established that ROM shadowing was common circa 1990, and advertised as such. The earliest C&T example was the CS8221 NEAT chipset. In 1987, C&T touted “Shadow RAM for BIOS to improve system performance” in their CS8221 data book.

On the other hand, the older CS8220 chipset from 1985 or 1986 did not offer any such functionality. Which means that in the clone PC market, where C&T was a major player at the time, BIOS ROM shadowing probably started being used sometime in 1988. It remains an open question which BIOS vendor did that first.

But what about other OEMs? It is possible that some other vendor like IBM or Compaq or ALR might have done it first. I was fairly certain that IBM did not have ROM shadowing prior to the PS/2 line in 1987, and if someone else had it, it would have been likely earlier.

I started looking at Compaq advertising materials and found no mention of ROM shadowing. I searched Compaq technical references and found no mention of shadowing whatsoever. But I didn’t stop searching because I had a vague memory that the Compaq Deskpro 386 had some kind of ROM shadowing support, at least in later iterations.

And sure enough, it did. Not only in later iterations but the very first 16 MHz Compaq Deskpro 386 from 1986 already had ROM shadowing. Except Compaq didn’t call it that.

The Compaq Deskpro 386 Technical Reference Guide from September 1986 contains the following text on page 3-5:

Of the 384 KB of additional memory available in the standard memory configuration, the last 128 KB contain a number of special addressing features. This 128-KB block, starting at address FE0000, can be relocated (mapped) via special hardware map registers to replace the 128-KB area normally assigned to the system ROMs (0E0000 to 0FFFFF). When mapped, the 128-KB RAM block normally located at FE0000 can be addressed at either FE0000 or 0E0000. The ROM devices are not accessible while the RAM is mapped to the address space normally occupied by the ROMs.

That certainly sounds an awful lot like ROM shadowing! The 1986 Deskpro 386 Tech Ref and more can be found here.

While newer designs usually control how reads and writes are treated for the ROM area, Compaq did it a little differently. Of the built-in 1 MB, Compaq mapped 384 KB just below 16 MB; some of it was usable as Compaq Built-In Memory or BIM. Compaq set aside 128 KB at the very top of the 16 MB address space to provide an alternative mapping of the shadow RAM. To enable ROM shadowing, the BIOS had to copy (typically) 64 KB of memory from 0F0000h to FF0000h and then reprogram the RAM relocation register to write-protect the RAM and map it to the ROM range.

While the original Deskpro 386 hardware was clearly capable of ROM shadowing, I was not certain if the earliest BIOS actually used it. Fortunately Jeff Parsons from pcjs.org was able to clear that question for me. Yes, the Deskpro 386 BIOS from September 1986 already enabled ROM shadowing. The feature does not appear to have been user controllable, the BIOS simply always did it.

ROM shadowing was therefore provably used in 1986 by the Compaq Deskpro 386. It is quite likely that the Deskpro 386 was the first PC with ROM shadowing, for several reasons. One reason was that the Deskpro 386 came with 1 MB RAM standard — not 512 KB, not 640 KB, but a full 1 MB. That gave Compaq the option to use some of the extra memory for speeding things up.

The other reason is that the Deskpro 386 was almost certainly the first PC where ROM shadowing made a real difference. The Deskpro 386 had 32-bit RAM, significantly faster than 16-bit ROMs. That was not the case with 16-bit PC/AT compatibles with slower CPUs, slower RAM, and a 16-bit data path to both RAM and ROM. On the Deskpro 386, the system RAM was likely several times faster than ROM, and that’s what made ROM shadowing desirable.

In the absence of other evidence, it’s impossible to prove that Compaq implemented ROM shadowing first. Circumstantial evidence indicates that it is very likely.

Read More