23 Graphics Driver Design Guidelines

This chapter covers the general guidelines for implementing UEFI Drivers for graphics controllers. Most graphics controllers are PCI controllers, and this implies that UEFI Drivers for graphics controllers are typically PCI drivers. PCI drivers must follow all of the PCI design guidelines described in Chapter 18, as well as the general guidelines described in Chapter 4 of this guide. Also see the Rules for PCI/AGP Devices section of the UEFI Specification.

If a device is intended to be used as a graphics console output device while UEFI firmware is active, then a UEFI Driver must be implemented that produces the Graphics Output Protocol. The graphics controller must either directly support or be able to emulate the following operations:

  • Block transfer to fill a region of the frame buffer
  • Block transfer from system memory to region of frame buffer
  • Block transfer from region of frame buffer to system memory
  • Block transfer between two regions of the frame buffer
  • Query attached display devices for EDID information
  • Set the supported graphics modes that is intersection of modes that the graphics controller supports and the display device supports

The EDK II provides a platform agnostic driver in the MdeModulePkg in the directory MdeModulePkg/Universal/Console/GraphicsConsoleDxe that uses the services of a Graphics Output Protocol and bitmap fonts to produce the Simple Text Output Protocol. This means if a Graphics Output Protocol is produced by a UEFI Driver, then the frame buffer managed by that UEFI Driver can be used as a text console device without having to implement the Simple Text Output Protocol in the UEFI Driver for the graphics controller.