-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OcMainLib: Add UEFI/Unload config option to unload existing firmware drivers #553
base: master
Are you sure you want to change the base?
Conversation
It is worth adding that when deciding on this approach, I did initially look at trying to disconnect relevant existing drivers (e.g. perhaps triggered via certain optional arguments to this driver). However it turns out it is very hard - approaching impossible, afaict - to work out which handles need disconnecting. Certainly there is no particular PCI device to find and disconnect, as there is with audio or video. Instead, each driver binds to handles created by previous drivers in the stack, and because of IP 4 vs 6, most drivers also create two driver binding protocol instances as well (one on the loaded image handle and one on a new handle). I spent quite a lot of time hunting around all this in UEFI Shell trying to figure out what to disconnect and eventually became fairly convinced it was not possible, whereas unloading cleanly removes what was set up by a given driver - assuming it correctly supports unloading, as the network stack drivers do. |
This is split out from #549.
I don't know of any current use for this apart from network boot, but it is definitely useful there; e.g. HttpBootDxe may be present but produce non-working entries when used within the context of OC (e.g. because it is modified to work in a GUI); HttpDxe may be present but locked to https:// only, when the user wishes to use http://.