4 General Driver Design Guidelines

This chapter contains general guidelines for the implementation of all types of UEFI drivers. Guidelines for specific driver types (PCI, USB, SCSI, ATA, Console, Graphics, Mass Storage, Network, etc.) are presented in individual chapters later in this guide. This chapter also focuses on general guidelines for implementing UEFI Drivers sources portable to all UEFI conformant platforms and all CPU architectures supported by the UEFI Specification. If these guidelines are followed, there is a good chance that UEFI Drivers can be re-compiled for a different CPU architecture with no source code changes.
There are a few portability issues that apply specifically to IPF and EBC, and these are presented in individual sections later in this guide as well. The summary of topics covered includes:
  • Common practices for C source code
  • Maximizing Platform Compatibility
  • Maximizing CPU Compatibility
  • Optimizing for size and performance