[Fw_Os_Forum] OpenProtocol semantics
valerij zaporogeci
vlrzprgts at gmail.com
Mon May 23 07:47:28 EDT 2016
Hi again. I see there is not much activity, but maybe it still has
some sense to ask my farther questions.
The specification says (in the description of
UninstallProtocolInterface() service), that in order to "safely"
uninstall a protocol interface, first the driver consuming it should
be disconnected (through DisconnectController->Stop->CloseProtocol),
and then those with BY_HANDLE_PROTOCOL, TEST_PROTOCOL and GET_PROTOCOL
attributes _should be closed_.
My question is HOW exactly those three types of agents are really
supposed to have been "closed"?
And also - is there really a necessity to hold information about those
three types of agents in the data base? How is it used? By whom?
Clients opening the protool one of those three ways are even not
required to CloseProtocol() and there is a clear notice that for
example driver opening with GET_PROTOCOL would not be notified about
the protocol uninstallation\reinstallation. So there is no mechanism
to safely use GET_PROTOCOL, and client opening with TEST_PROTOCOL
should only rely on the status code returned. All these things make
question the necessity to hold information about such types of opening
in the data base. And again - how they should be closed? For example
those opening with BY_HANDLE_PROTOCOL would pass the UEFI image handle
as an AgentHandle. What here may be "closed"? If it's not about
unloading the image (whose handle is an AgnetHandle), and this is only
about the database "book keeping", then for what it is? In the case of
those thee types of opening?
As a consequense - would it be compliant to only keep in the data base
the information about BY_DRIVER, BY_DRIVER_EXCLUSIVE, EXCLUSIVE and
BY_CHILD_CONTROLLER types of opening?
Thanks.
More information about the Fw_os_forum
mailing list