]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[efi] Match chainloaded device by uppermost matching handle
authorMichael Brown <mcb30@ipxe.org>
Mon, 25 Mar 2024 16:24:24 +0000 (16:24 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 25 Mar 2024 17:58:33 +0000 (17:58 +0000)
commita15ce00182a8b2e0dfd43b81a3b2936cae339838
tree19a50d0688447247f092663b42bd26d21c2b370d
parent390bce9516ce3a4adf599762b6c965813332595e
[efi] Match chainloaded device by uppermost matching handle

Commit 4c5b794 ("[efi] Use the SNP protocol instance to match the SNP
chainloading device") switched the chainloaded device matching logic
to use a target protocol instance rather than the loaded image's
device handle, on the basis that we want to bind to the parent SNP
device rather than to a duplicate SNP protocol instance installed onto
an IPv4 or IPv6 child device handle.

It is possible that our calls to DisconnectController() and
ConnectController() will cause the target protocol instance to be
uninstalled and reinstalled, which may change the value of the
protocol instance pointer.  Allow for this by identifying and matching
against the uppermost handle that initially has this target protocol
instance installed.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/efi/snponly.c