4.1 Common Coding Practices

This section covers common coding practices for implementing UEFI Drivers. Following these practices may improve a UEFI Driver's compatibility with different C compilers. The most important rule to follow is to use ANSI C and to avoid the use of compiler specific language extensions. Avoiding the use of assembly language is also recommended.

A common approach when implementing a new UEFI Driver is to find an existing UEFI Driver with similar features and functionality and use that existing UEFI Driver as a starting point for the new UEFI Driver. Appendix B contains a table that lists some example UEFI Drivers provided in the EDK II and the features implemented by those UEFI Drivers. The EDK II contains many more UEFI drivers than those listed in Appendix B.