summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/HttpBootDxe/HttpBootDxe.h
diff options
context:
space:
mode:
authorFu Siyuan <siyuan.fu@intel.com>2016-02-15 13:55:11 +0800
committerFu Siyuan <siyuan.fu@intel.com>2016-03-07 09:12:14 +0800
commitfa848a4048943251fc057fe8d6c5a82e01d2ffb6 (patch)
tree0ffe9aa44385b2bd9e49c974f3ed52345579e61e /NetworkPkg/HttpBootDxe/HttpBootDxe.h
parent9353c60cea6eeedbbe4b336aea02646e2bf25f47 (diff)
downloadedk2-fa848a4048943251fc057fe8d6c5a82e01d2ffb6.tar.gz
edk2-fa848a4048943251fc057fe8d6c5a82e01d2ffb6.tar.bz2
edk2-fa848a4048943251fc057fe8d6c5a82e01d2ffb6.zip
NetworkPkg: Add URI configuration form to HTTP boot driver.
This patch updates the HTTP boot driver to produce a setup page for the boot file URI configuration. A new boot option will be created for the manual configured URI address. This change is made to support the HTTP boot usage in home environment. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
Diffstat (limited to 'NetworkPkg/HttpBootDxe/HttpBootDxe.h')
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDxe.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.h b/NetworkPkg/HttpBootDxe/HttpBootDxe.h
index 08f88c5606..7cb4b2c55a 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDxe.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.h
@@ -1,7 +1,7 @@
/** @file
UEFI HTTP boot driver's private data structure and interfaces declaration.
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
@@ -24,6 +24,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// Libraries
//
#include <Library/UefiBootServicesTableLib.h>
+#include <Library/UefiHiiServicesLib.h>
+#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/BaseLib.h>
#include <Library/UefiLib.h>
@@ -31,6 +33,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/DebugLib.h>
#include <Library/NetLib.h>
#include <Library/HttpLib.h>
+#include <Library/HiiLib.h>
+#include <Library/PrintLib.h>
//
// UEFI Driver Model Protocols
@@ -42,6 +46,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
// Consumed Protocols
//
+#include <Protocol/ServiceBinding.h>
+#include <Protocol/HiiConfigAccess.h>
#include <Protocol/NetworkInterfaceIdentifier.h>
#include <Protocol/Dhcp4.h>
#include <Protocol/Dhcp6.h>
@@ -55,6 +61,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/LoadFile.h>
//
+// Consumed Guids
+//
+#include <Guid/HttpBootConfigHii.h>
+
+//
// Driver Version
//
#define HTTP_BOOT_DXE_VERSION 0xa
@@ -81,6 +92,7 @@ typedef struct _HTTP_BOOT_VIRTUAL_NIC HTTP_BOOT_VIRTUAL_NIC;
#include "HttpBootImpl.h"
#include "HttpBootSupport.h"
#include "HttpBootClient.h"
+#include "HttpBootConfig.h"
typedef union {
HTTP_BOOT_DHCP4_PACKET_CACHE Dhcp4;
@@ -95,6 +107,14 @@ struct _HTTP_BOOT_VIRTUAL_NIC {
HTTP_BOOT_PRIVATE_DATA *Private;
};
+#define HTTP_BOOT_PRIVATE_DATA_FROM_CALLBACK_INFO(Callback) \
+ CR ( \
+ Callback, \
+ HTTP_BOOT_PRIVATE_DATA, \
+ CallbackInfo, \
+ HTTP_BOOT_PRIVATE_DATA_SIGNATURE \
+ )
+
struct _HTTP_BOOT_PRIVATE_DATA {
UINT32 Signature;
EFI_HANDLE Controller;
@@ -132,6 +152,11 @@ struct _HTTP_BOOT_PRIVATE_DATA {
UINT32 Id;
//
+ // HII callback info block
+ //
+ HTTP_BOOT_FORM_CALLBACK_INFO CallbackInfo;
+
+ //
// Mode data
//
BOOLEAN UsingIpv6;
@@ -147,6 +172,12 @@ struct _HTTP_BOOT_PRIVATE_DATA {
BOOLEAN NoGateway;
//
+ // URI string extracted from the input FilePath parameter.
+ //
+ CHAR8 *FilePathUri;
+ VOID *FilePathUriParser;
+
+ //
// Cached HTTP data
//
LIST_ENTRY CacheList;