https://www.os2museum.com/wp/first-rom-shadowing/ OS/2 Museum OS/2, vintage PC computing, and random musings [os2floppy] Skip to content * Home * About + Wanted List * OS/2 History + OS/2 Beginnings + OS/2 1.0 + OS/2 1.1 + OS/2 1.2 and 1.3 + OS/2 16-bit Server + OS/2 2.0 + OS/2 2.1 and 2.11 + OS/2 Warp + OS/2 Warp, PowerPC Edition + OS/2 Warp 4 + OS/2 Timeline + OS/2 Library o OS/2 1.x SDK o OS/2 1.x Programming o OS/2 2.0 Technical Library + OS/2 Videos, 1987 * DOS History + DOS Beginnings + DOS 1.0 and 1.1 + DOS 2.0 and 2.1 + DOS 3.0, 3.1, and 3.2 + DOS 3.3 + DOS 4.0 + DOS Library * NetWare History + NetWare Timeline + NetWare Library * Windows History + Windows Library * PC UNIX History + Solaris 2.1 for x86 - A wunderBAR Story First ROM Shadowing Posted on April 21, 2023 by Michal Necasek 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. This entry was posted in C&T, Compaq, IBM, PC architecture, PC history. Bookmark the permalink. - A wunderBAR Story 7 Responses to First ROM Shadowing 1. [a1db] Jay K. says: April 21, 2023 at 11:04 pm I don't know if this qualifies or not, but Atari 8-bit machines would copy the code from the ROM bank in the upper 16K to the hidden RAM bank at the same address and then switch to using the RAM because access was faster. Also, this allowed programs to use the holes in the ROM programs to store extra data, though of course that was fraught with danger if they ever changed the ROM. 2. [a935] Stephen Kitt says: April 21, 2023 at 11:44 pm Amusingly enough ROM shadowing is mentioned in the comments on your "Deskpro 386 at 30" article: https://www.os2museum.com/wp/ deskpro-386-at-30/ 3. [704a] Yuhong Bao says: April 22, 2023 at 12:43 am In practice I suspect that ROM shadowing did not really become common until the DRAM shortage ended in 1989. 4. [704a] Yuhong Bao says: April 22, 2023 at 4:32 am Though I wonder how many PC vendors were shipping PCs with 1MB vs 640k vs 512k. 5. [8f7d] Michal Necasek says: April 22, 2023 at 4:17 pm So it is, but it doesn't really even hint that the Deskpro 386 was probably the first PC to do that. 6. [8f7d] Michal Necasek says: April 22, 2023 at 4:19 pm That's interesting, I would think that the RAM was much more valuable as user accessible memory. Though I guess it couldn't really be addressed so why not. Do you know which machines did that? Atari 800 or so? 7. [15c4] Octocontrabass says: April 22, 2023 at 10:59 pm HIMEM.SYS (at least from DOS 6.22 and some versions of Windows 95) can automatically reconfigure a Deskpro 386 to use the shadow RAM as ordinary RAM. It's not able to do that for any other PC. Leave a Reply Your email address will not be published. Required fields are marked * [ ] [ ] [ ] [ ] [ ] [ ] [ ] Comment * [ ] Name * [ ] Email * [ ] Website [ ] [Post Comment] [ ] [ ] [ ] [ ] [ ] [ ] [ ] D[ ] This site uses Akismet to reduce spam. Learn how your comment data is processed. * Archives + April 2023 + March 2023 + January 2023 + December 2022 + November 2022 + October 2022 + September 2022 + July 2022 + June 2022 + May 2022 + April 2022 + March 2022 + February 2022 + January 2022 + December 2021 + November 2021 + October 2021 + September 2021 + August 2021 + July 2021 + June 2021 + May 2021 + April 2021 + March 2021 + February 2021 + January 2021 + December 2020 + November 2020 + October 2020 + September 2020 + August 2020 + July 2020 + June 2020 + May 2020 + April 2020 + March 2020 + February 2020 + January 2020 + December 2019 + November 2019 + October 2019 + September 2019 + August 2019 + July 2019 + June 2019 + May 2019 + April 2019 + March 2019 + February 2019 + January 2019 + December 2018 + November 2018 + October 2018 + August 2018 + July 2018 + June 2018 + May 2018 + April 2018 + March 2018 + February 2018 + January 2018 + December 2017 + November 2017 + October 2017 + August 2017 + July 2017 + June 2017 + May 2017 + April 2017 + March 2017 + February 2017 + January 2017 + December 2016 + November 2016 + October 2016 + September 2016 + August 2016 + July 2016 + June 2016 + May 2016 + April 2016 + March 2016 + February 2016 + January 2016 + December 2015 + November 2015 + October 2015 + September 2015 + August 2015 + July 2015 + June 2015 + May 2015 + April 2015 + March 2015 + February 2015 + January 2015 + December 2014 + November 2014 + October 2014 + September 2014 + August 2014 + July 2014 + June 2014 + May 2014 + April 2014 + March 2014 + February 2014 + January 2014 + December 2013 + November 2013 + October 2013 + September 2013 + August 2013 + July 2013 + June 2013 + May 2013 + April 2013 + March 2013 + February 2013 + January 2013 + December 2012 + November 2012 + October 2012 + September 2012 + August 2012 + July 2012 + June 2012 + May 2012 + April 2012 + March 2012 + February 2012 + January 2012 + December 2011 + November 2011 + October 2011 + September 2011 + August 2011 + July 2011 + June 2011 + May 2011 + April 2011 + March 2011 + January 2011 + November 2010 + October 2010 + August 2010 + July 2010 * Categories + 286 + 386 + 3Com + 3Dfx + 486 + 8086/8088 + Adaptec + AGP + AMD + AMD64 + Apple + Archiving + Assembler + ATi + BIOS + Books + Borland + BSD + Bugs + BusLogic + C + C&T + CD-ROM + Cirrus Logic + CompactFlash + Compaq + Compression + Computing History + Conner + Corrections + CP/M + Creative Labs + Crystal Semi + Cyrix + DDR RAM + Debugging + DEC + Development + Digital Research + Documentation + DOS + DOS Extenders + Dream + E-mu + Editors + EISA + Ensoniq + ESDI + Ethernet + Fakes + Fixes + Floppies + Graphics + Hardware Hacks + I18N + IBM + IDE + Intel + Internet + Keyboard + Kryoflux + Kurzweil + LAN Manager + Legal + Linux + MCA + Microsoft + MIDI + NetWare + Networking + NeXTSTEP + NFS + Novell + NT + OS X + OS/2 + PC architecture + PC hardware + PC history + PC press + PCI + PCMCIA + Pentium + Pentium 4 + Pentium II + Pentium III + Pentium Pro + Plug and Play + PowerPC + Pre-release + PS/2 + QNX + Quantum + Random Thoughts + RDRAM + Roland + Ryzen + S3 + SCO + SCSI + Seagate + Security + Site Management + SMP + Software Hacks + Solaris + Sound + Sound Blaster + Source code + Standards + Storage + Supermicro + TCP/IP + ThinkPad + Trident + UltraSound + Uncategorized + Undocumented + UNIX + UnixWare + USB + VGA + VirtualBox + Virtualization + VLB + Watcom + Wave Blaster + Western Digital + Windows + Windows 95 + Windows XP + Wireless + WordStar + x86 + x87 + Xenix + Xeon + Yamaha OS/2 Museum Proudly powered by WordPress.