diff options
author | Fu Siyuan <siyuan.fu@intel.com> | 2016-03-14 10:43:42 +0800 |
---|---|---|
committer | Fu Siyuan <siyuan.fu@intel.com> | 2016-03-16 14:43:17 +0800 |
commit | 7537258100166bdf6e9f4203ac13e53a14f97490 (patch) | |
tree | af266f6ba498fc0ccc63a125026f6ae81715f6ca /NetworkPkg/HttpBootDxe/HttpBootDxe.h | |
parent | 6ddc2e438bd55e72b65806414c4fd712d50e612d (diff) | |
download | edk2-7537258100166bdf6e9f4203ac13e53a14f97490.zip edk2-7537258100166bdf6e9f4203ac13e53a14f97490.tar.gz edk2-7537258100166bdf6e9f4203ac13e53a14f97490.tar.bz2 |
NetworkPkg: Fix the driver model issue in HTTP Boot driver.
The HTTP Boot driver have some UEFI driver model problems which will make the
code ASSERT when it's disconnected.
First, the driver opens the HttpSb protocol BY_CHILD without BY_DRIVER attribute.
So the driver binding stop won't be called when HTTP driver is disconnected, so
a child handle is left and made HTTP driver binding stop function goes into error.
This patch remove this unnecessary OpenProtocol and only unload the HII from when
both the IP4 and IP6 stack have been stopped completely.
The second issue is the HTTP boot driver always use the driver's image handle as
it's driver binding handle, it's not correct. HTTP Boot driver provides 2 separate
driver binding protocols from IP4 and IP6 stack, so it has 2 driver binding handle.
So this patch fix the code to use correct driver binding handle when create/open
a HTTP child handle.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Diffstat (limited to 'NetworkPkg/HttpBootDxe/HttpBootDxe.h')
-rw-r--r-- | NetworkPkg/HttpBootDxe/HttpBootDxe.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.h b/NetworkPkg/HttpBootDxe/HttpBootDxe.h index 7cb4b2c..b3e2576 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootDxe.h +++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.h @@ -102,6 +102,7 @@ typedef union { struct _HTTP_BOOT_VIRTUAL_NIC {
UINT32 Signature;
EFI_HANDLE Controller;
+ EFI_HANDLE ImageHandle;
EFI_LOAD_FILE_PROTOCOL LoadFile;
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
HTTP_BOOT_PRIVATE_DATA *Private;
@@ -118,7 +119,6 @@ struct _HTTP_BOOT_VIRTUAL_NIC { struct _HTTP_BOOT_PRIVATE_DATA {
UINT32 Signature;
EFI_HANDLE Controller;
- EFI_HANDLE Image;
HTTP_BOOT_VIRTUAL_NIC *Ip4Nic;
HTTP_BOOT_VIRTUAL_NIC *Ip6Nic;
|