diff options
author | Michael Brown | 2024-03-22 17:50:13 +0100 |
---|---|---|
committer | Michael Brown | 2024-03-25 18:58:33 +0100 |
commit | da5188f3ea73900f1c6a4e44a8345b48320d396f (patch) | |
tree | d9adcce6a6b91145a2b34f91132d7bfe9d521d1b /src/drivers/net/efi | |
parent | [efi] Add helper functions for service binding protocols (diff) | |
download | ipxe-da5188f3ea73900f1c6a4e44a8345b48320d396f.tar.gz ipxe-da5188f3ea73900f1c6a4e44a8345b48320d396f.tar.xz ipxe-da5188f3ea73900f1c6a4e44a8345b48320d396f.zip |
[efi] Allow for drivers to be located via child handles
When using a service binding protocol, CreateChild() will create a new
protocol instance (and optionally a new handle). The caller will then
typically open this new protocol instance with BY_DRIVER attributes,
since the service binding mechanism has no equivalent of the driver
binding protocol's Stop() method, and there is therefore no other way
for the caller to be informed if the protocol instance is about to
become invalid (e.g. because the service driver wants to remove the
child).
The caller cannot ask CreateChild() to install the new protocol
instance on the original handle (i.e. the service binding handle),
since the whole point of the service binding protocol is to allow for
the existence of multiple children, and UEFI does not permit multiple
instances of the same protocol to be installed on a handle.
Our current drivers all open the original handle (as passed to our
driver binding's Start() method) with BY_DRIVER attributes, and so the
same handle will be passed to our Stop() method. This changes when
our driver must use a separate handle, as described above.
Add an optional "child handle" field to struct efi_device (on the
assumption that we will not have any drivers that need to create
multiple children), and generalise efidev_find() to match on either
the original handle or the child handle.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/efi')
0 files changed, 0 insertions, 0 deletions