- 2 UEFI Driver Implementation Checklist
- 3 Foundation
- 3.1 Basic programming model
- 3.2 Objects managed by UEFI-based firmware
- 3.3 UEFI system table
- 3.4 Handle database
- 3.5 GUIDs
- 3.6 Protocols and handles
- 3.7 UEFI images
- 3.8 Events and task priority levels
- 3.9 UEFI device paths
- 3.10 UEFI driver model
- 3.11 Service Drivers
- 3.12 Root Bridge Driver
- 3.13 Initializing Driver
- 3.14 UEFI Driver Model Connection Process
- 3.15 Platform initialization
- 3.15.1 Connecting PCI Root Bridges
- 3.15.2 Connecting the PCI bus
- 3.15.3 Connecting consoles
- 3.15.4 Console drivers
- 3.15.5 Console variables
- 3.15.6 ConIn
- 3.15.7 ConOut
- 3.15.8 ErrOut
- 3.15.9 Boot Manager Connect All Processing
- 3.15.10 Boot Manager Driver List Processing
- 3.15.11 Boot Manager BootNext Processing
- 3.15.12 Boot Manager Boot Option Processing
- 4 General Driver Design Guidelines
- 4.1 Common Coding Practices
- 4.2 Maximize Platform Compatibility
- 4.2.1 Never Assume all UEFI Drivers are Executed
- 4.2.2 Eliminate System Memory Assumptions
- 4.2.3 Use UEFI Memory Allocation Services
- 4.2.4 Do not make assumptions
- 4.2.5 Never Directly Access Hardware Resources
- 4.2.6 Memory ordering
- 4.2.7 DMA
- 4.2.8 Supporting Older EFI Specifications and UEFI Specifications
- 4.2.9 Reduce Poll Frequency
- 4.2.10 Minimize Time in Notification Functions
- 4.2.11 Use Proper Task Priority Levels
- 4.2.12 Design to be re-entrant
- 4.2.13 Do not use hidden PCI Option ROM Regions
- 4.2.14 Store Configuration Data with Device
- 4.2.15 Do not use hard-coded device path nodes
- 4.2.16 Do not cause errors on shared storage devices
- 4.2.17 Limit use of Console Services
- 4.2.18 Offer alternatives to function keys
- 4.3 Maximize CPU Compatibility
- 4.4 Optimization Techniques
- 5 UEFI Services
- 5.1 Services that UEFI drivers commonly use
- 5.2 Services that UEFI drivers rarely use
- 5.2.1 ConnectController() and DisconnectController()
- 5.2.2 ReinstallProtocolInterface()
- 5.2.3 LocateDevicePath()
- 5.2.4 LoadImage() and StartImage()
- 5.2.5 GetVariable() and SetVariable()
- 5.2.6 QueryVariableInfo ()
- 5.2.7 GetTime()
- 5.2.8 CalculateCrc32()
- 5.2.9 ConvertPointer()
- 5.2.10 InstallConfigurationTable()
- 5.2.11 GetNextMonotonicCount()
- 5.3 Services that UEFI drivers should not use
- 5.3.1 InstallProtocolInterface()
- 5.3.2 UninstallProtocolInterface()
- 5.3.3 HandleProtocol()
- 5.3.4 LocateHandle()
- 5.3.5 ProtocolsPerHandle()
- 5.3.6 RegisterProtocolNotify()
- 5.3.7 UnloadImage()
- 5.3.8 GetNextVariableName()
- 5.3.9 SetWatchdogTimer()
- 5.3.10 SetTime(), GetWakeupTime(), and SetWakeupTime()
- 5.3.11 GetMemoryMap()
- 5.3.12 ExitBootServices()
- 5.3.13 SetVirtualAddressMap()
- 5.3.14 QueryCapsuleCapabilities()
- 5.3.15 UpdateCapsule()
- 5.3.16 ResetSystem()
- 5.3.17 Exit()
- 5.3.18 GetNextHighMonotonicCount()
- 6 UEFI Driver Categories
- 6.1 Device drivers
- 6.2 Bus drivers
- 6.2.1 Required Bus Driver Features
- 6.2.2 Optional Bus Driver Features
- 6.2.3 Bus drivers with one driver binding protocol
- 6.2.4 Bus drivers with multiple driver binding protocols
- 6.2.5 Bus driver protocol and child management
- 6.2.6 Bus drivers that produce one child in Start()
- 6.2.7 Bus drivers that produce all children in Start()
- 6.2.8 Bus drivers that produce at most one child in Start()
- 6.2.9 Bus drivers that produce no children in Start()
- 6.2.10 Bus drivers that produce children with multiple parents
- 6.3 Hybrid drivers
- 6.4 Service Drivers
- 6.5 Root Bridge Drivers
- 6.6 Initializing Drivers
- 7 Driver Entry Point
- 7.1 Optional Features
- 7.2 UEFI Driver Model
- 7.3 Adding the Driver Supported EFI Version Protocol Feature
- 7.4 Adding HII Packages Feature
- 7.5 Adding HII Config Access Protocol Feature
- 7.6 Adding the Unload Feature
- 7.7 Adding the Exit Boot Services feature
- 7.8 Initializing Driver entry point
- 7.9 Service Driver entry point
- 7.10 Root bridge driver entry point
- 7.11 Runtime Drivers
- 8 Private Context Data Structures
- 9 Driver Binding Protocol
- 10 UEFI Service Binding Protocol
- 11 UEFI Driver and Controller Names
- 12 UEFI Driver Configuration
- 13 UEFI Driver Diagnostics
- 14 Driver Health Protocol
- 15 Driver Family Override Protocol
- 16 Driver Supported EFI Version Protocol
- 17 Bus-Specific Driver Override Protocol
- 18 PCI Driver Design Guidelines
- 19 USB Driver Design Guidelines
- 20 SCSI Driver Design Guidelines
- 21 ATA Driver Design Guidelines
- 22 Text Console Driver Design Guidelines
- 22.1 Assumptions
- 22.2 Simple Text Input Protocol Implementation
- 22.3 Simple Text Output Protocol Implementation
- 22.3.1 Reset() Implementation
- 22.3.2 OutputString() Implementation
- 22.3.3 TestString() Implementation
- 22.3.4 QueryMode() Implementation
- 22.3.5 SetMode() Implementation
- 22.3.6 SetAttribute() Implementation
- 22.3.7 ClearScreen() Implementation
- 22.3.8 SetCursorPosition() Implementation
- 22.3.9 EnableCursor() Implementation
- 22.4 Serial I/O Protocol Implementations
- 23 Graphics Driver Design Guidelines
- 24 Mass Storage Driver Design Guidelines
- 25 Network Driver Design Guidelines
- 26 User Credential Driver Design Guidelines
- 27 Load File Driver Design Guidelines
- 28 IPF Platform Porting Considerations
- 29 EFI Byte Code Porting Considerations
- 30 Building UEFI Drivers
- 31 Testing and Debugging UEFI Drivers
- 32 Distributing UEFI Drivers
- Appendix A EDK II File Templates
- A.1 UEFI Driver Template
- A.2 UEFI Driver Optional Protocol Templates
- A.3 UEFI Driver I/O Protocol Templates
- A.3.1 Usb2Hc.c File
- A.3.2 ExtScsiPassThru.c File
- A.3.3 AtaPassThru.c File
- A.3.4 SimpleTextInput.c File
- A.3.5 SimpleTextOutput.c File
- A.3.6 SerialIo.c File
- A.3.7 GraphicsOutput.c File
- A.3.8 BlockIo.c File
- A.3.9 NiiUndi.c File
- A.3.10 SimpleNetwork.c File
- A.3.11 UserCredential.c File
- A.3.12 LoadFile.c File
- A.4 Platform Specific UEFI Driver Templates
- A.5 EDK II Package Extension Templates
- Appendix B EDK II Sample Drivers
- Appendix C Glossary