UEFI News and Commentary

Tuesday, March 06, 2012

UEFI Driver Writer's Guide & Wizard Released

Many times I hear the question: How do I write a UEFI driver for X? Or, as it is more commonly expressed: "UEFI is so dang complicated. In XYZ standard (where XYZ = BIOS or coreboot or OpenFirmware) I could just initialize my hardware, provide a few hooks and I'm done. Stupid UEFI." And there is some truth in that. Actually, you can write very simple drivers for UEFI that just initialize the hardware and produce the required interfaces. But, the very simple kind are hard to debug and don't play nice with others. For example, when we're trying to boot quickly, the UEFI core firmware need devices that aren't part of the boot path to not initialize their devices so that boot will be faster. How do you know if you are in the boot path? By whether the Start() function of the Driver Binding protocol gets called. And what happens if your device is configurable? How do you expose your configuration settings? By publishing a form in the HII Database. And so on. There are a lot of pieces to creating a fully-featured driver.

Fortunately, Intel has recently released a series of resources as a part of the TianoCore's "Enabling Resources" page, including a (long delayed) Driver Writer's guide and the UEFI Driver Wizard, which creates driver skeleton for various types of UEFI drivers.

Go check it out. Now if they would only port the C Library to work with drivers instead of just shell apps...

No comments: