In ye olden times, to boot a computer you had to toggle in a short program on the panel switches, or put a special punch card deck into the hopper, or whatever. Personal computers started out either with built-in BASIC in ROM or a very small boot ROM which had just enough code to load the first block from tape or disk, and jump to that. (The built-in ROM is also called “firmware”.)

Later on, the first Macs had most of the core of the OS built into ROM, along with the self-test and boot functions, while the first PCs had a simple configuration utility instead, which came to be known as BIOS. A little later, when many different models began to appear, the BIOS also began to set a number of internal configurations, check firmware for peripheral cards, and so forth. In contrast, Apple gradually gave up on trying to store the OS toolbox in ROM, and instead increased the sophistication of the self-test and boot code. The downside, in both cases, was that operating systems had to know about a large number of machine types, configurations, peripherals and options, while a specific BIOS had to be made for every new CPU board.

After the first PowerPCs came out, Apple recognized the need to handle booting and peripherals in a more machine-independent way and adopted Open Firmware (OF), initially developed by Sun. OF is a complex beast; it has a Forth-like bytecode interpreter to run test and boot software in a machine-independent way. Also, peripheral cards could contain their own driver software in ROM, in theory even for compatibility with various platforms. This feature was largely reponsible for the Mac’s plug-and-play facilities.

Meanwhile, the BIOS limitations in the PC world became apparent and various entities attempted to progress beyond that, with very little success; the pressure for legacy compatibility was too great to make any inroads into the commodity PC market. One of these initiatives, Intel’s Extensible Firmware Interface (EFI) has been shipped on their Itanium boxes, but hasn’t been adopted by the standard PC market. One roadblock is that no current OS is directly EFI-compatible; Microsoft’s Vista will be, though, when it comes out.

EFI has been adopted by Apple for the new Intel Macs and in that sense will be the first large-scale deployment. Like OF, EFI allows peripheral cards to contain their own drivers. Like OF, it has a machine-independent bytecode interpreter. Also, like OF, it allows for a great variety of functions to be run at power-on time. And most importantly, still like OF, it allows for basic device drivers to be loaded and cataloged before any OS is booted, and that OS can check or complement these drivers only if necessary. Thus, EFI can function as a basic hardware abstraction layer. Conversely, the OS can count on certain things being initialized and in place before it gets loaded, and call EFI functions (say, to access peripherals, set the clock, etc.) when it needs to.

The current EFI specification is quite complex, even more so than Open Firmware, often specifically to address legacy concerns. There are many modules and protocols which can be selected to be present by the motherboard’s manufacturer. From eyewitness reports at Macworld, the new Core Duo Macs boot directly into Mac OS X without any visible difference from old models. Nobody has yet reported on what becomes visible in “verbose” mode, though, although it’s possible to go to the EFI console by holding down certain keys during power-on. Command-option-E-F-I, perhaps?

One EFI module we can be pretty sure that Apple didn’t include: the legacy BIOS module, which would allow EFI to emulate a standard PC BIOS and allow booting of MS-DOS and its successors. Microsoft has said that EFI support will not be retrofitted to current Windows versions. So, the new Macs may eventually run Windows Vista, assuming they are otherwise Intel-standard; somehow it strikes me as unlikely that Apple will work with Microsoft to have its hardware certified as Vista-compatible.

A final point about EFI is that it expects bootable drives to use its partition standard, known as GPT. Apparently Apple has managed to make this coexist with its own partition schemes, so that, once a disk has been formatted and installed with the universal Mac OS X on one of the new Macs, it will become bootable both on Intel and PowerPC Macs; quite a feat.

In summary, a no-doubt-intended side-effect of EFI as implemented in the new Macs is that it makes it more difficult, if not perhaps entirely impossible, either to boot current Windows versions on them, or to run Mac OS X 10.4.4 and up on industry-standard non-EFI Intel PCs. Personally, I think dual-booting is a big hassle; Microsoft has already said they will eventually release a Virtual PC for the new Macs, and there’s the whole virtualization alternative, some which has been patented by Apple. More later about that.