Beyond BIOS: Implementing the Unified Extensible Firmware Interface with Intel's Framework

An expert is a man who has made all the mistakes which can be made in a very narrow field.
Niels Bohr
In the preceding chapters, various stages of the firmware initialization process have been described. In addition, various possible usage models have been described that can be implemented on a target hardware platform. In addition, by now it should have become evident that many of the EFI firmware interfaces do not in and of themselves directly talk to hardware; instead they actually talk to underlying components that are responsible for talking to hardware. Traditionally, firmware development has not been an activity that could be performed without an in-circuit emulator (ICE) or other hardware debug facility. Taking into consideration EFI's design and the fact that very few components in the firmware actually have direct interaction with hardware devices, it is possible to introduce a mechanism that allows the emulation of vast amounts of the firmware in a standard deployment operation system environment.
In the EFI sample implementation, a new target platform was introduced called "NT32". This environment features the ability to run much of the firmware code as an application running from the operating system, and provides the ability to establish a robust development and debug environment. Much of the firmware codebase was developed initially using the emulation environment with off-the-shell compilers and debuggers, and without the need of a real hardware debugger. Of course, this emulation has its limitations, since some components of the firmware must talk...