[if gte mso 9]>

[edk2] Guide for Writing Shims/Filters Using Driver Binding

Subject: [edk2] Guide for Writing Shims/Filters Using Driver Binding

From: "Cohen, Eugene" <eugene@hp.com>

To: "edk2-devel@lists.sourceforge.net" <edk2-devel@lists.sourceforge.net>

Date: 2012-05-31 01:29:38



Is there a resource (guide or code example) out there on how to properly author a shim/filter that replaces one protocol with another (with a key aspect being that the replaced protocol is temporarily removed/hidden from the protocol database) while still doing the right things from a UEFI Driver Binding perspective?  It appears easy to do on the surface using ReinstallProtocolInterface but once you factor in driver binding relationships it becomes less clear on how to properly do this.  The UEFI Driver Writer’s Guide does not appear to contain a section on this (yet) – this could be a new driver category along with device, bus, and hybrid.


Specifically we’d like to see an example of how the Start and Stop handlers should work with OpenProtocol when using EFI_OPEN_PROTOCOL_BY_DRIVER and how to do a Disconnect/Stop with proper ordering of the Stop calls.