aboutsummaryrefslogtreecommitdiff
path: root/src/include/ipxe/efi
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-06-30 14:37:36 +0200
committerMichael Brown <mcb30@ipxe.org>2016-07-08 14:16:32 +0100
commitd6817943d187c18869a4d69e2499caf453162bca (patch)
tree18fb8ad5fed2e127baafe8806d60bbc2803d9413 /src/include/ipxe/efi
parent5430465185ba037c1f9c06cd3ec486b56dafb539 (diff)
downloadipxe-d6817943d187c18869a4d69e2499caf453162bca.zip
ipxe-d6817943d187c18869a4d69e2499caf453162bca.tar.gz
ipxe-d6817943d187c18869a4d69e2499caf453162bca.tar.bz2
[efi] Install the HII config access protocol on a child of the SNP handle
In edk2, there are several drivers that associate HII forms (and corresponding config access protocol instances) with each individual network device. (In this context, "network device" means the EFI handle on which the SNP protocol is installed, and on which the device path ending with the MAC() node is installed also.) Such edk2 drivers are, for example: Ip4Dxe, HttpBootDxe, VlanConfigDxe. In UEFI, any given handle can carry at most one instance of a specific protocol (see e.g. the specification of the InstallProtocolInterface() boot service). This implies that the class of drivers mentioned above can't install their EFI_HII_CONFIG_ACCESS_PROTOCOL instances on the SNP handle directly -- they would conflict with each other. Accordingly, each of those edk2 drivers creates a "private" child handle under the SNP handle, and installs its config access protocol (and corresponding HII package list) on its child handle. The device path for the child handle is traditionally derived by appending a Hardware Vendor Device Path node after the MAC() node. The VenHw() nodes in question consist of a GUID (by definition), and no trailing data (by choice). The purpose of these VenHw() nodes is only that all the child nodes can be uniquely identified by device path. At the moment iPXE does not follow this pattern. It doesn't run into a conflict when it installs its EFI_HII_CONFIG_ACCESS_PROTOCOL directly on the SNP handle, but that's only because iPXE is the sole driver not following the pattern. This behavior seems risky (one might call it a "latent bug"); better align iPXE with the edk2 custom. Cc: Michael Brown <mcb30@ipxe.org> Cc: Gary Lin <glin@suse.com> Cc: Ladi Prosek <lprosek@redhat.com> Ref: http://thread.gmane.org/gmane.comp.bios.edk2.devel/13494/focus=13532 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ladi Prosek <lprosek@redhat.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/efi')
-rw-r--r--src/include/ipxe/efi/efi_snp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/ipxe/efi/efi_snp.h b/src/include/ipxe/efi/efi_snp.h
index 4c5461e..a9f67cf 100644
--- a/src/include/ipxe/efi/efi_snp.h
+++ b/src/include/ipxe/efi/efi_snp.h
@@ -57,6 +57,10 @@ struct efi_snp_device {
EFI_HII_CONFIG_ACCESS_PROTOCOL hii;
/** HII package list */
EFI_HII_PACKAGE_LIST_HEADER *package_list;
+ /** EFI child handle for HII association */
+ EFI_HANDLE hii_child_handle;
+ /** Device path of HII child handle */
+ EFI_DEVICE_PATH_PROTOCOL *hii_child_path;
/** HII handle */
EFI_HII_HANDLE hii_handle;
/** Device name */