summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/HttpBootDxe
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2018-06-27 21:12:32 +0800
committerLiming Gao <liming.gao@intel.com>2018-06-28 11:19:49 +0800
commitf75a7f568e6d0944327970b3f3f2dafd9bba76b1 (patch)
treecc64f0e24e92dab5713bf2099f7e1f4fc5152ff6 /NetworkPkg/HttpBootDxe
parent9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107 (diff)
downloadedk2-f75a7f568e6d0944327970b3f3f2dafd9bba76b1.tar.gz
edk2-f75a7f568e6d0944327970b3f3f2dafd9bba76b1.tar.bz2
edk2-f75a7f568e6d0944327970b3f3f2dafd9bba76b1.zip
NetworkPkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'NetworkPkg/HttpBootDxe')
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootClient.c82
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootClient.h14
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootComponentName.c22
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootComponentName.h14
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootConfig.c76
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootConfigVfr.vfr4
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDhcp4.c106
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDhcp4.h16
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDhcp6.c120
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDhcp6.h18
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDxe.c258
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDxe.h188
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDxe.inf12
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDxe.uni6
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDxeExtra.uni6
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootImpl.c78
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootImpl.h16
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootSupport.c136
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootSupport.h60
19 files changed, 616 insertions, 616 deletions
diff --git a/NetworkPkg/HttpBootDxe/HttpBootClient.c b/NetworkPkg/HttpBootDxe/HttpBootClient.c
index 1d1e47008d..90a6acb0d4 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootClient.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootClient.c
@@ -3,12 +3,12 @@
Copyright (c) 2015 - 2018, 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.
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -23,7 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@retval EFI_SUCCESS Device patch successfully updated.
@retval EFI_OUT_OF_RESOURCES Could not allocate needed resources.
@retval Others Unexpected error happened.
-
+
**/
EFI_STATUS
HttpBootUpdateDevicePath (
@@ -39,7 +39,7 @@ HttpBootUpdateDevicePath (
TmpIpDevicePath = NULL;
TmpDnsDevicePath = NULL;
-
+
//
// Update the IP node with DHCP assigned information.
//
@@ -67,13 +67,13 @@ HttpBootUpdateDevicePath (
SetDevicePathNodeLength (Node, sizeof (IPv6_DEVICE_PATH));
Node->Ipv6.PrefixLength = IP6_PREFIX_LENGTH;
Node->Ipv6.RemotePort = Private->Port;
- Node->Ipv6.Protocol = EFI_IP_PROTO_TCP;
+ Node->Ipv6.Protocol = EFI_IP_PROTO_TCP;
Node->Ipv6.IpAddressOrigin = 0;
CopyMem (&Node->Ipv6.LocalIpAddress, &Private->StationIp.v6, sizeof (EFI_IPv6_ADDRESS));
CopyMem (&Node->Ipv6.RemoteIpAddress, &Private->ServerIp.v6, sizeof (EFI_IPv6_ADDRESS));
CopyMem (&Node->Ipv6.GatewayIpAddress, &Private->GatewayIp.v6, sizeof (EFI_IPv6_ADDRESS));
}
-
+
TmpIpDevicePath = AppendDevicePathNode (Private->ParentDevicePath, (EFI_DEVICE_PATH_PROTOCOL*) Node);
FreePool (Node);
if (TmpIpDevicePath == NULL) {
@@ -95,7 +95,7 @@ HttpBootUpdateDevicePath (
SetDevicePathNodeLength (Node, Length);
Node->Dns.IsIPv6 = Private->UsingIpv6 ? 0x01 : 0x00;
CopyMem ((UINT8*) Node + sizeof (EFI_DEVICE_PATH_PROTOCOL) + sizeof (Node->Dns.IsIPv6), Private->DnsServerIp, Private->DnsServerCount * sizeof (EFI_IP_ADDRESS));
-
+
TmpDnsDevicePath = AppendDevicePathNode (TmpIpDevicePath, (EFI_DEVICE_PATH_PROTOCOL*) Node);
FreePool (Node);
FreePool (TmpIpDevicePath);
@@ -150,7 +150,7 @@ HttpBootUpdateDevicePath (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
FreePool (Private->Ip4Nic->DevicePath);
Private->Ip4Nic->DevicePath = NewDevicePath;
} else {
@@ -169,7 +169,7 @@ HttpBootUpdateDevicePath (
FreePool (Private->Ip6Nic->DevicePath);
Private->Ip6Nic->DevicePath = NewDevicePath;
}
-
+
return EFI_SUCCESS;
}
@@ -201,7 +201,7 @@ HttpBootDhcp4ExtractUriInfo (
ASSERT (SelectIndex < HTTP_BOOT_OFFER_MAX_NUM);
DnsServerIndex = 0;
-
+
Status = EFI_SUCCESS;
//
@@ -213,7 +213,7 @@ HttpBootDhcp4ExtractUriInfo (
//
// In Corporate environment, we need a HttpOffer.
//
- if ((SelectOffer->OfferType == HttpOfferTypeDhcpIpUri) ||
+ if ((SelectOffer->OfferType == HttpOfferTypeDhcpIpUri) ||
(SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns) ||
(SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns)) {
HttpOffer = SelectOffer;
@@ -246,7 +246,7 @@ HttpBootDhcp4ExtractUriInfo (
return Status;
}
- if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) ||
+ if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) ||
(SelectOffer->OfferType == HttpOfferTypeDhcpDns) ||
(SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns)) {
Option = SelectOffer->OptList[HTTP_BOOT_DHCP4_TAG_INDEX_DNS_SERVER];
@@ -265,10 +265,10 @@ HttpBootDhcp4ExtractUriInfo (
for (DnsServerIndex = 0; DnsServerIndex < Private->DnsServerCount; DnsServerIndex++) {
CopyMem (&(Private->DnsServerIp[DnsServerIndex].v4), &(((EFI_IPv4_ADDRESS *) Option->Data)[DnsServerIndex]), sizeof (EFI_IPv4_ADDRESS));
}
-
+
//
// Configure the default DNS server if server assigned.
- //
+ //
Status = HttpBootRegisterIp4Dns (
Private,
Option->Length,
@@ -292,7 +292,7 @@ HttpBootDhcp4ExtractUriInfo (
if (EFI_ERROR (Status) || Private->Port == 0) {
Private->Port = 80;
}
-
+
//
// All boot informations are valid here.
//
@@ -402,7 +402,7 @@ HttpBootDhcp6ExtractUriInfo (
return Status;
}
- if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) ||
+ if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) ||
(SelectOffer->OfferType == HttpOfferTypeDhcpDns) ||
(SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns)) {
Option = SelectOffer->OptList[HTTP_BOOT_DHCP6_IDX_DNS_SERVER];
@@ -434,9 +434,9 @@ HttpBootDhcp6ExtractUriInfo (
goto Error;
}
}
-
+
//
- // Extract the HTTP server Ip from URL. This is used to Check route table
+ // Extract the HTTP server Ip from URL. This is used to Check route table
// whether can send message to HTTP Server Ip through the GateWay.
//
Status = HttpUrlGetIp6 (
@@ -444,7 +444,7 @@ HttpBootDhcp6ExtractUriInfo (
Private->BootFileUriParser,
&IpAddr
);
-
+
if (EFI_ERROR (Status)) {
//
// The Http server address is expressed by Name Ip, so perform DNS resolution
@@ -464,23 +464,23 @@ HttpBootDhcp6ExtractUriInfo (
Status = EFI_OUT_OF_RESOURCES;
goto Error;
}
-
+
AsciiStrToUnicodeStrS (HostName, HostNameStr, HostNameSize);
if (HostName != NULL) {
FreePool (HostName);
}
-
+
Status = HttpBootDns (Private, HostNameStr, &IpAddr);
FreePool (HostNameStr);
if (EFI_ERROR (Status)) {
AsciiPrint ("\n Error: Could not retrieve the host address from DNS server.\n");
goto Error;
- }
- }
-
+ }
+ }
+
CopyMem (&Private->ServerIp.v6, &IpAddr, sizeof (EFI_IPv6_ADDRESS));
-
+
//
// Extract the port from URL, and use default HTTP port 80 if not provided.
//
@@ -492,7 +492,7 @@ HttpBootDhcp6ExtractUriInfo (
if (EFI_ERROR (Status) || Private->Port == 0) {
Private->Port = 80;
}
-
+
//
// All boot informations are valid here.
//
@@ -504,7 +504,7 @@ HttpBootDhcp6ExtractUriInfo (
if (EFI_ERROR (Status)) {
goto Error;
}
-
+
return Status;
Error:
@@ -512,7 +512,7 @@ Error:
FreePool (Private->DnsServerIp);
Private->DnsServerIp = NULL;
}
-
+
return Status;
}
@@ -532,7 +532,7 @@ HttpBootDiscoverBootInfo (
)
{
EFI_STATUS Status;
-
+
//
// Start D.O.R.A/S.A.R.R exchange to acquire station ip address and
// other Http boot information.
@@ -557,7 +557,7 @@ HttpBootDiscoverBootInfo (
@param[in] EventType Indicate the Event type that occurs in the current callback.
@param[in] Message HTTP message which will be send to, or just received from HTTP server.
@param[in] Context The Callback Context pointer.
-
+
@retval EFI_SUCCESS Tells the HttpIo to continue the HTTP process.
@retval Others Tells the HttpIo to abort the current HTTP process.
**/
@@ -706,7 +706,7 @@ HttpBootFreeCacheList (
LIST_ENTRY *Entry;
LIST_ENTRY *NextEntry;
HTTP_BOOT_CACHE_CONTENT *Cache;
-
+
NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Private->CacheList) {
Cache = NET_LIST_USER_STRUCT (Entry, HTTP_BOOT_CACHE_CONTENT, Link);
RemoveEntryList (&Cache->Link);
@@ -746,7 +746,7 @@ HttpBootGetFileFromCache (
HTTP_BOOT_CACHE_CONTENT *Cache;
HTTP_BOOT_ENTITY_DATA *EntityData;
UINTN CopyedSize;
-
+
if (Uri == NULL || BufferSize == NULL || Buffer == NULL || ImageType == NULL) {
return EFI_INVALID_PARAMETER;
}
@@ -808,7 +808,7 @@ HttpBootGetFileFromCache (
@retval EFI_SUCCESS Continue to parser the message body.
@retval Others Abort the parse.
-
+
**/
EFI_STATUS
EFIAPI
@@ -878,7 +878,7 @@ HttpBootGetBootFileCallback (
/**
This function download the boot file by using UEFI HTTP protocol.
-
+
@param[in] Private The pointer to the driver's private data.
@param[in] HeaderOnly Only request the response header, it could save a lot of time if
the caller only want to know the size of the requested file.
@@ -926,7 +926,7 @@ HttpBootGetBootFile (
CHAR16 *Url;
BOOLEAN IdentityMode;
UINTN ReceivedSize;
-
+
ASSERT (Private != NULL);
ASSERT (Private->HttpCreated);
@@ -1116,7 +1116,7 @@ HttpBootGetBootFile (
Cache->ResponseData = ResponseData;
Cache->ImageType = *ImageType;
}
-
+
//
// 3.3 Init a message-body parser from the header information.
//
@@ -1278,7 +1278,7 @@ HttpBootGetBootFile (
}
return Status;
-
+
ERROR_6:
if (Parser != NULL) {
HttpFreeMsgParser (Parser);
@@ -1287,7 +1287,7 @@ ERROR_6:
FreePool (Context.Block);
}
HttpBootFreeCache (Cache);
-
+
ERROR_5:
if (ResponseData != NULL) {
FreePool (ResponseData);
diff --git a/NetworkPkg/HttpBootDxe/HttpBootClient.h b/NetworkPkg/HttpBootDxe/HttpBootClient.h
index dd58719b40..f8d0db7847 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootClient.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootClient.h
@@ -1,14 +1,14 @@
/** @file
Declaration of the boot file download function.
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2018, 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.
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -98,7 +98,7 @@ HttpBootCreateHttpIo (
/**
This function download the boot file by using UEFI HTTP protocol.
-
+
@param[in] Private The pointer to the driver's private data.
@param[in] HeaderOnly Only request the response header, it could save a lot of time if
the caller only want to know the size of the requested file.
diff --git a/NetworkPkg/HttpBootDxe/HttpBootComponentName.c b/NetworkPkg/HttpBootDxe/HttpBootComponentName.c
index 2c39089da3..d8988a3521 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootComponentName.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootComponentName.c
@@ -1,13 +1,13 @@
/** @file
Implementation of EFI_COMPONENT_NAME_PROTOCOL and EFI_COMPONENT_NAME2_PROTOCOL protocol.
-Copyright (c) 2015, Intel Corporation. All rights reserved.<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.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<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.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
///
/// Component Name Protocol instance
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_COMPONENT_NAME_PROTOCOL gHttpBootDxeComponentName = {
(EFI_COMPONENT_NAME_GET_DRIVER_NAME) HttpBootDxeComponentNameGetDriverName,
(EFI_COMPONENT_NAME_GET_CONTROLLER_NAME)HttpBootDxeComponentNameGetControllerName,
@@ -27,7 +27,7 @@ EFI_COMPONENT_NAME_PROTOCOL gHttpBootDxeComponentName = {
///
/// Component Name 2 Protocol instance
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_COMPONENT_NAME2_PROTOCOL gHttpBootDxeComponentName2 = {
HttpBootDxeComponentNameGetDriverName,
HttpBootDxeComponentNameGetControllerName,
@@ -37,7 +37,7 @@ EFI_COMPONENT_NAME2_PROTOCOL gHttpBootDxeComponentName2 = {
///
/// Table of driver names
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_UNICODE_STRING_TABLE mHttpBootDxeDriverNameTable[] = {
{ "eng;en", (CHAR16 *)L"UEFI HTTP Boot Driver" },
{ NULL, NULL }
@@ -46,7 +46,7 @@ EFI_UNICODE_STRING_TABLE mHttpBootDxeDriverNameTable[] = {
///
/// Table of controller names
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_UNICODE_STRING_TABLE mHttpBootDxeControllerNameTable[] = {
{ "eng;en", (CHAR16 *)L"UEFI Http Boot Controller" },
{ NULL, NULL }
@@ -148,7 +148,7 @@ HttpBootDxeComponentNameGetControllerName (
if (ControllerHandle == NULL || ChildHandle != NULL) {
return EFI_UNSUPPORTED;
}
-
+
NicHandle = HttpBootGetNicByIp4Children (ControllerHandle);
if (NicHandle == NULL) {
NicHandle = HttpBootGetNicByIp6Children(ControllerHandle);
diff --git a/NetworkPkg/HttpBootDxe/HttpBootComponentName.h b/NetworkPkg/HttpBootDxe/HttpBootComponentName.h
index 3fce9b75ab..1baf3fa693 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootComponentName.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootComponentName.h
@@ -1,14 +1,14 @@
/** @file
- Declaration of HTTP boot driver's EFI_COMPONENT_NAME_PROTOCOL and
+ Declaration of HTTP boot driver's EFI_COMPONENT_NAME_PROTOCOL and
EFI_COMPONENT_NAME2_PROTOCOL function.
-Copyright (c) 2015, Intel Corporation. All rights reserved.<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.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<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.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
diff --git a/NetworkPkg/HttpBootDxe/HttpBootConfig.c b/NetworkPkg/HttpBootDxe/HttpBootConfig.c
index 81fceb2fd6..b95abc624b 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootConfig.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootConfig.c
@@ -1,7 +1,7 @@
/** @file
Helper functions for configuring or getting the parameters relating to HTTP Boot.
-Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -24,7 +24,7 @@ CHAR16 mHttpBootConfigStorageName[] = L"HTTP_BOOT_CONFIG_IFR_NVDATA";
@param[in] UsingIpv6 Set to TRUE if creating boot option for IPv6.
@param[in] Description The description text of the boot option.
@param[in] Uri The URI string of the boot file.
-
+
@retval EFI_SUCCESS The boot option is created successfully.
@retval Others Failed to create new boot option.
@@ -72,7 +72,7 @@ HttpBootAddBootOption (
if ((StrLen (Uri) != 0) && (StrnCmp (Uri, L"http://", 7) != 0) && (StrnCmp (Uri, L"https://", 8) != 0)) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// Create a new device path by appending the IP node and URI node to
// the driver's parent device path
@@ -154,7 +154,7 @@ ON_EXIT:
}
/**
-
+
This function allows the caller to request the current
configuration for one or more named elements. The resulting
string is in <ConfigAltResp> format. Also, any and all alternative
@@ -183,7 +183,7 @@ ON_EXIT:
to the most recent "&" before the first
failing name / value pair (or the beginning
of the string if the failure is in the first
- name / value pair) if the request was not successful.
+ name / value pair) if the request was not successful.
@param[out] Results A null-terminated Unicode string in
<ConfigAltResp> format which has all values
@@ -204,7 +204,7 @@ ON_EXIT:
would result in this type of
error. In this case, the
Progress parameter would be
- set to NULL.
+ set to NULL.
@retval EFI_NOT_FOUND Routing data doesn't match any
known driver. Progress set to the
@@ -249,7 +249,7 @@ HttpBootFormExtractConfig (
if ((Request != NULL) && !HiiIsConfigHdrMatch (Request, &gHttpBootConfigGuid, mHttpBootConfigStorageName)) {
return EFI_NOT_FOUND;
}
-
+
ConfigRequestHdr = NULL;
ConfigRequest = NULL;
AllocatedRequest = FALSE;
@@ -289,7 +289,7 @@ HttpBootFormExtractConfig (
Results,
Progress
);
-
+
//
// Free the allocated config request string.
//
@@ -310,7 +310,7 @@ HttpBootFormExtractConfig (
}
/**
-
+
This function applies changes in a driver's configuration.
Input is a Configuration, which has the routing data for this
driver followed by name / value configuration pairs. The driver
@@ -323,8 +323,8 @@ HttpBootFormExtractConfig (
@param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
@param[in] Configuration A null-terminated Unicode string in
- <ConfigString> format.
-
+ <ConfigString> format.
+
@param[out] Progress A pointer to a string filled in with the
offset of the most recent '&' before the
first failing name / value pair (or the
@@ -335,16 +335,16 @@ HttpBootFormExtractConfig (
@retval EFI_SUCCESS The results have been distributed or are
awaiting distribution.
-
+
@retval EFI_OUT_OF_RESOURCES Not enough memory to store the
parts of the results that must be
stored awaiting possible future
protocols.
-
+
@retval EFI_INVALID_PARAMETERS Passing in a NULL for the
Results parameter would result
in this type of error.
-
+
@retval EFI_NOT_FOUND Target for the specified routing data
was not found.
@@ -381,7 +381,7 @@ HttpBootFormRouteConfig (
CallbackInfo = HTTP_BOOT_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS (This);
Private = HTTP_BOOT_PRIVATE_DATA_FROM_CALLBACK_INFO (CallbackInfo);
-
+
BufferSize = sizeof (HTTP_BOOT_CONFIG_IFR_NVDATA);
ZeroMem (&CallbackInfo->HttpBootNvData, BufferSize);
@@ -405,12 +405,12 @@ HttpBootFormRouteConfig (
CallbackInfo->HttpBootNvData.Description,
CallbackInfo->HttpBootNvData.Uri
);
-
+
return EFI_SUCCESS;
}
/**
-
+
This function is called to provide results data to the driver.
This data consists of a unique key that is used to identify
which data is either being passed back or being asked for.
@@ -419,7 +419,7 @@ HttpBootFormRouteConfig (
@param[in] Action Specifies the type of action taken by the browser.
@param[in] QuestionId A unique value which is sent to the original
exporting driver so that it can identify the type
- of data to expect. The format of the data tends to
+ of data to expect. The format of the data tends to
vary based on the opcode that generated the callback.
@param[in] Type The type of value for the question.
@param[in, out] Value A pointer to the data being sent to the original
@@ -456,17 +456,17 @@ HttpBootFormCallback (
UriLen = 0;
AsciiUri = NULL;
Status = EFI_SUCCESS;
-
+
if (This == NULL || Value == NULL) {
return EFI_INVALID_PARAMETER;
}
CallbackInfo = HTTP_BOOT_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS (This);
-
+
if (Action != EFI_BROWSER_ACTION_CHANGING) {
return EFI_UNSUPPORTED;
}
-
+
switch (QuestionId) {
case KEY_INITIATOR_URI:
//
@@ -474,8 +474,8 @@ HttpBootFormCallback (
//
Uri = HiiGetString (CallbackInfo->RegisteredHandle, Value->string, NULL);
if(Uri == NULL) {
- return EFI_INVALID_PARAMETER;
- }
+ return EFI_INVALID_PARAMETER;
+ }
//
// The URI should be either an empty string (for corporate environment) ,or http(s) for home environment.
@@ -492,7 +492,7 @@ HttpBootFormCallback (
UnicodeStrToAsciiStrS (Uri, AsciiUri, UriLen);
Status = HttpBootCheckUriScheme (AsciiUri);
-
+
if (Status == EFI_INVALID_PARAMETER) {
DEBUG ((EFI_D_ERROR, "HttpBootFormCallback: %r.\n", Status));
@@ -503,11 +503,11 @@ HttpBootFormCallback (
L"ERROR: Unsupported URI!",
L"Only supports HTTP and HTTPS",
NULL
- );
+ );
} else if (Status == EFI_ACCESS_DENIED) {
-
+
DEBUG ((EFI_D_ERROR, "HttpBootFormCallback: %r.\n", Status));
-
+
CreatePopUp (
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
&Key,
@@ -524,8 +524,8 @@ HttpBootFormCallback (
if (AsciiUri != NULL) {
FreePool (AsciiUri);
- }
-
+ }
+
break;
default:
@@ -561,7 +561,7 @@ HttpBootConfigFormInit (
if (CallbackInfo->Initilized) {
return EFI_SUCCESS;
}
-
+
CallbackInfo->Signature = HTTP_BOOT_FORM_CALLBACK_INFO_SIGNATURE;
//
@@ -586,7 +586,7 @@ HttpBootConfigFormInit (
CallbackInfo->ConfigAccess.ExtractConfig = HttpBootFormExtractConfig;
CallbackInfo->ConfigAccess.RouteConfig = HttpBootFormRouteConfig;
CallbackInfo->ConfigAccess.Callback = HttpBootFormCallback;
-
+
//
// Install Device Path Protocol and Config Access protocol to driver handle.
//
@@ -623,25 +623,25 @@ HttpBootConfigFormInit (
Status = NetLibGetMacString (Private->Controller, NULL, &MacString);
if (!EFI_ERROR (Status)) {
OldMenuString = HiiGetString (
- CallbackInfo->RegisteredHandle,
- STRING_TOKEN (STR_HTTP_BOOT_CONFIG_FORM_HELP),
+ CallbackInfo->RegisteredHandle,
+ STRING_TOKEN (STR_HTTP_BOOT_CONFIG_FORM_HELP),
NULL
);
UnicodeSPrint (MenuString, 128, L"%s (MAC:%s)", OldMenuString, MacString);
HiiSetString (
- CallbackInfo->RegisteredHandle,
- STRING_TOKEN (STR_HTTP_BOOT_CONFIG_FORM_HELP),
- MenuString,
+ CallbackInfo->RegisteredHandle,
+ STRING_TOKEN (STR_HTTP_BOOT_CONFIG_FORM_HELP),
+ MenuString,
NULL
);
-
+
FreePool (MacString);
FreePool (OldMenuString);
CallbackInfo->Initilized = TRUE;
return EFI_SUCCESS;
}
-
+
Error:
HttpBootConfigFormUnload (Private);
diff --git a/NetworkPkg/HttpBootDxe/HttpBootConfigVfr.vfr b/NetworkPkg/HttpBootDxe/HttpBootConfigVfr.vfr
index 7e8ddae33d..9c65d64d93 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootConfigVfr.vfr
+++ b/NetworkPkg/HttpBootDxe/HttpBootConfigVfr.vfr
@@ -1,7 +1,7 @@
/** @file
VFR file used by the HTTP Boot configuration component.
- Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -24,7 +24,7 @@ formset
varstore HTTP_BOOT_CONFIG_IFR_NVDATA,
name = HTTP_BOOT_CONFIG_IFR_NVDATA,
guid = HTTP_BOOT_CONFIG_GUID;
-
+
form formid = FORMID_MAIN_FORM,
title = STRING_TOKEN(STR_HTTP_BOOT_CONFIG_FORM_TITLE);
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c b/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c
index 229e6cb0ec..78d161ae95 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c
@@ -1,13 +1,13 @@
/** @file
Functions implementation related with DHCPv4 for HTTP boot driver.
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<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.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<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.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -267,7 +267,7 @@ HttpBootParseDhcp4Packet (
HTTP_BOOT_OFFER_TYPE OfferType;
EFI_IPv4_ADDRESS IpAddr;
BOOLEAN FileFieldOverloaded;
-
+
IsDnsOffer = FALSE;
IpExpressedUri = FALSE;
IsProxyOffer = FALSE;
@@ -291,7 +291,7 @@ HttpBootParseDhcp4Packet (
);
}
//
- // Second, Check if bootfilename and serverhostname is overloaded to carry DHCP options refers to rfc-2132.
+ // Second, Check if bootfilename and serverhostname is overloaded to carry DHCP options refers to rfc-2132.
// If yes, try to parse options from the BootFileName field, then ServerName field.
//
Option = Options[HTTP_BOOT_DHCP4_TAG_INDEX_OVERLOAD];
@@ -379,7 +379,7 @@ HttpBootParseDhcp4Packet (
}
//
- // Try to retrieve the IP of HTTP server from URI.
+ // Try to retrieve the IP of HTTP server from URI.
//
if (IsHttpOffer) {
Status = HttpParseUrl (
@@ -428,7 +428,7 @@ HttpBootParseDhcp4Packet (
return EFI_DEVICE_ERROR;
}
}
-
+
Cache4->OfferType = OfferType;
return EFI_SUCCESS;
}
@@ -506,70 +506,70 @@ HttpBootSelectDhcpOffer (
// The offer with DNS server address takes priority here.
//
if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpIpUriDns] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUriDns][0] + 1;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpNameUriDns] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpNameUriDns][0] + 1;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpOnly] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpOnly][0] + 1;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpIpUri] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUri][0] + 1;
}
-
+
} else {
//
// We are in corporate environment.
//
// Priority1: HttpOfferTypeDhcpIpUri or HttpOfferTypeDhcpIpUriDns
- // Priority2: HttpOfferTypeDhcpNameUriDns
- // Priority3: HttpOfferTypeDhcpOnly + HttpOfferTypeProxyIpUri
- // Priority4: HttpOfferTypeDhcpDns + HttpOfferTypeProxyIpUri
+ // Priority2: HttpOfferTypeDhcpNameUriDns
+ // Priority3: HttpOfferTypeDhcpOnly + HttpOfferTypeProxyIpUri
+ // Priority4: HttpOfferTypeDhcpDns + HttpOfferTypeProxyIpUri
// Priority5: HttpOfferTypeDhcpDns + HttpOfferTypeProxyNameUri
- // Priority6: HttpOfferTypeDhcpDns + HttpOfferTypeDhcpNameUri
- //
+ // Priority6: HttpOfferTypeDhcpDns + HttpOfferTypeDhcpNameUri
+ //
if (Private->OfferCount[HttpOfferTypeDhcpIpUri] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUri][0] + 1;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpIpUriDns] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUriDns][0] + 1;
-
+
}else if (Private->OfferCount[HttpOfferTypeDhcpNameUriDns] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpNameUriDns][0] + 1;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpOnly] > 0 &&
Private->OfferCount[HttpOfferTypeProxyIpUri] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpOnly][0] + 1;
Private->SelectProxyType = HttpOfferTypeProxyIpUri;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0 &&
Private->OfferCount[HttpOfferTypeProxyIpUri] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;
Private->SelectProxyType = HttpOfferTypeProxyIpUri;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0 &&
Private->OfferCount[HttpOfferTypeProxyNameUri] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;
Private->SelectProxyType = HttpOfferTypeProxyNameUri;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0 &&
Private->OfferCount[HttpOfferTypeDhcpNameUri] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;
Private->SelectProxyType = HttpOfferTypeDhcpNameUri;
}
@@ -614,14 +614,14 @@ HttpBootDhcp4CallBack (
EFI_STATUS Status;
BOOLEAN Received;
- if ((Dhcp4Event != Dhcp4SendDiscover) &&
- (Dhcp4Event != Dhcp4RcvdOffer) &&
- (Dhcp4Event != Dhcp4SendRequest) &&
- (Dhcp4Event != Dhcp4RcvdAck) &&
+ if ((Dhcp4Event != Dhcp4SendDiscover) &&
+ (Dhcp4Event != Dhcp4RcvdOffer) &&
+ (Dhcp4Event != Dhcp4SendRequest) &&
+ (Dhcp4Event != Dhcp4RcvdAck) &&
(Dhcp4Event != Dhcp4SelectOffer)) {
return EFI_SUCCESS;
}
-
+
Private = (HTTP_BOOT_PRIVATE_DATA *) Context;
//
@@ -636,14 +636,14 @@ HttpBootDhcp4CallBack (
Value = HTONS (HTTP_BOOT_DHCP4_PACKET_MAX_SIZE);
CopyMem (MaxMsgSize->Data, &Value, sizeof (Value));
}
-
+
//
// Callback to user if any packets sent or received.
//
if (Private->HttpBootCallback != NULL && Dhcp4Event != Dhcp4SelectOffer) {
Received = (BOOLEAN) (Dhcp4Event == Dhcp4RcvdOffer || Dhcp4Event == Dhcp4RcvdAck);
Status = Private->HttpBootCallback->Callback (
- Private->HttpBootCallback,
+ Private->HttpBootCallback,
HttpBootDhcp4,
Received,
Packet->Length,
@@ -676,7 +676,7 @@ HttpBootDhcp4CallBack (
case Dhcp4SelectOffer:
//
- // Select offer according to the priority in UEFI spec, and record the SelectIndex
+ // Select offer according to the priority in UEFI spec, and record the SelectIndex
// and SelectProxyType.
//
HttpBootSelectDhcpOffer (Private);
@@ -687,7 +687,7 @@ HttpBootDhcp4CallBack (
*NewPacket = &Private->OfferBuffer[Private->SelectIndex - 1].Dhcp4.Packet.Offer;
}
break;
-
+
default:
break;
}
@@ -697,7 +697,7 @@ HttpBootDhcp4CallBack (
/**
This function will register the IPv4 gateway address to the network device.
-
+
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
@retval EFI_SUCCESS The new IP configuration has been configured successfully.
@@ -736,7 +736,7 @@ HttpBootRegisterIp4Gateway (
/**
This function will register the default DNS addresses to the network device.
-
+
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
@param[in] DataLength Size of the buffer pointed to by DnsServerData in bytes.
@param[in] DnsServerData Point a list of DNS server address in an array
@@ -754,11 +754,11 @@ HttpBootRegisterIp4Dns (
)
{
EFI_IP4_CONFIG2_PROTOCOL *Ip4Config2;
-
+
ASSERT (!Private->UsingIpv6);
Ip4Config2 = Private->Ip4Config2;
-
+
return Ip4Config2->SetData (
Ip4Config2,
Ip4Config2DataTypeDnsServer,
@@ -810,7 +810,7 @@ HttpBootSetIp4Policy (
);
if (EFI_ERROR (Status)) {
return Status;
- }
+ }
}
return EFI_SUCCESS;
@@ -837,7 +837,7 @@ HttpBootDhcp4Dora (
EFI_DHCP4_CONFIG_DATA Config;
EFI_STATUS Status;
EFI_DHCP4_MODE_DATA Mode;
-
+
Dhcp4 = Private->Dhcp4;
ASSERT (Dhcp4 != NULL);
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h b/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h
index 0b2cafbf50..4eb3f94af7 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h
@@ -1,13 +1,13 @@
/** @file
Functions declaration related with DHCPv4 for HTTP boot driver.
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<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.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<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.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -28,7 +28,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define HTTP_BOOT_DHCP4_OVERLOAD_SERVER_NAME 2
///
-/// HTTP Tag definition that identifies the processor
+/// HTTP Tag definition that identifies the processor
/// and programming environment of the client system.
/// These identifiers are defined by IETF:
/// http://www.ietf.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml
@@ -236,7 +236,7 @@ HttpBootDhcp4Dora (
/**
This function will register the default DNS addresses to the network device.
-
+
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
@param[in] DataLength Size of the buffer pointed to by DnsServerData in bytes.
@param[in] DnsServerData Point a list of DNS server address in an array
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c
index 4eea895368..fd2c648b84 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c
@@ -1,13 +1,13 @@
/** @file
Functions implementation related with DHCPv6 for HTTP boot driver.
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<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.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<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.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -192,14 +192,14 @@ HttpBootParseDhcp6Packet (
EFI_STATUS Status;
UINT32 Offset;
UINT32 Length;
-
+
IsDnsOffer = FALSE;
IpExpressedUri = FALSE;
IsProxyOffer = TRUE;
IsHttpOffer = FALSE;
Offer = &Cache6->Packet.Offer;
Options = Cache6->OptList;
-
+
ZeroMem (Cache6->OptList, sizeof (Cache6->OptList));
Option = (EFI_DHCP6_PACKET_OPTION *) (Offer->Dhcp6.Option);
@@ -270,9 +270,9 @@ HttpBootParseDhcp6Packet (
if (IsHttpOffer && Options[HTTP_BOOT_DHCP6_IDX_BOOT_FILE_URL] == NULL) {
return EFI_DEVICE_ERROR;
}
-
+
//
- // Try to retrieve the IP of HTTP server from URI.
+ // Try to retrieve the IP of HTTP server from URI.
//
if (IsHttpOffer) {
Status = HttpParseUrl (
@@ -318,7 +318,7 @@ HttpBootParseDhcp6Packet (
return EFI_DEVICE_ERROR;
}
}
-
+
Cache6->OfferType = OfferType;
return EFI_SUCCESS;
}
@@ -345,7 +345,7 @@ HttpBootCacheDhcp6Packet (
CopyMem (&Dst->Dhcp6, &Src->Dhcp6, Src->Length);
Dst->Length = Src->Length;
-
+
return EFI_SUCCESS;
}
@@ -397,7 +397,7 @@ HttpBootCacheDhcp6Offer (
Private->OfferIndex[OfferType][Private->OfferCount[OfferType]] = Private->OfferNum;
Private->OfferCount[OfferType]++;
Private->OfferNum++;
-
+
return EFI_SUCCESS;
}
@@ -435,7 +435,7 @@ HttpBootDhcp6CallBack (
EFI_DHCP6_PACKET *SelectAd;
EFI_STATUS Status;
BOOLEAN Received;
-
+
if ((Dhcp6Event != Dhcp6SendSolicit) &&
(Dhcp6Event != Dhcp6RcvdAdvertise) &&
(Dhcp6Event != Dhcp6SendRequest) &&
@@ -445,13 +445,13 @@ HttpBootDhcp6CallBack (
}
ASSERT (Packet != NULL);
-
+
Private = (HTTP_BOOT_PRIVATE_DATA *) Context;
Status = EFI_SUCCESS;
if (Private->HttpBootCallback != NULL && Dhcp6Event != Dhcp6SelectAdvertise) {
Received = (BOOLEAN) (Dhcp6Event == Dhcp6RcvdAdvertise || Dhcp6Event == Dhcp6RcvdReply);
Status = Private->HttpBootCallback->Callback (
- Private->HttpBootCallback,
+ Private->HttpBootCallback,
HttpBootDhcp6,
Received,
Packet->Length,
@@ -462,7 +462,7 @@ HttpBootDhcp6CallBack (
}
}
switch (Dhcp6Event) {
-
+
case Dhcp6RcvdAdvertise:
Status = EFI_NOT_READY;
if (Packet->Length > HTTP_BOOT_DHCP6_PACKET_MAX_SIZE) {
@@ -500,17 +500,17 @@ HttpBootDhcp6CallBack (
CopyMem (*NewPacket, SelectAd, SelectAd->Size);
}
break;
-
+
default:
break;
}
- return Status;
+ return Status;
}
/**
Check whether IP driver could route the message which will be sent to ServerIp address.
-
+
This function will check the IP6 route table every 1 seconds until specified timeout is expired, if a valid
route is found in IP6 route table, the address will be filed in GatewayAddr and return.
@@ -521,7 +521,7 @@ HttpBootDhcp6CallBack (
@retval EFI_SUCCESS Found a valid gateway address successfully.
@retval EFI_TIMEOUT The operation is time out.
@retval Other Unexpect error happened.
-
+
**/
EFI_STATUS
HttpBootCheckRouteTable (
@@ -553,7 +553,7 @@ HttpBootCheckRouteTable (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
//
// Find out the gateway address which can route the message which send to ServerIp.
//
@@ -583,13 +583,13 @@ HttpBootCheckRouteTable (
if (Ip6ModeData.IcmpTypeList != NULL) {
FreePool (Ip6ModeData.IcmpTypeList);
}
-
+
if (GatewayIsFound || RetryCount == TimeOutInSecond) {
break;
}
-
+
RetryCount++;
-
+
//
// Delay 1 second then recheck it again.
//
@@ -614,19 +614,19 @@ HttpBootCheckRouteTable (
Ip6->Poll (Ip6);
}
}
-
+
ON_EXIT:
if (TimeOutEvt != NULL) {
gBS->CloseEvent (TimeOutEvt);
}
-
+
if (GatewayIsFound) {
Status = EFI_SUCCESS;
} else if (RetryCount == TimeOutInSecond) {
Status = EFI_TIMEOUT;
}
- return Status;
+ return Status;
}
/**
@@ -650,7 +650,7 @@ HttpBootSetIp6Policy (
Ip6Config = Private->Ip6Config;
DataSize = sizeof (EFI_IP6_CONFIG_POLICY);
-
+
//
// Get and store the current policy of IP6 driver.
//
@@ -681,7 +681,7 @@ HttpBootSetIp6Policy (
/**
This function will register the default DNS addresses to the network device.
-
+
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
@param[in] DataLength Size of the buffer pointed to by DnsServerData in bytes.
@param[in] DnsServerData Point a list of DNS server address in an array
@@ -699,11 +699,11 @@ HttpBootSetIp6Dns (
)
{
EFI_IP6_CONFIG_PROTOCOL *Ip6Config;
-
+
ASSERT (Private->UsingIpv6);
Ip6Config = Private->Ip6Config;
-
+
return Ip6Config->SetData (
Ip6Config,
Ip6ConfigDataTypeDnsServer,
@@ -714,7 +714,7 @@ HttpBootSetIp6Dns (
/**
This function will register the IPv6 gateway address to the network device.
-
+
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
@retval EFI_SUCCESS The new IP configuration has been configured successfully.
@@ -731,9 +731,9 @@ HttpBootSetIp6Gateway (
ASSERT (Private->UsingIpv6);
Ip6Config = Private->Ip6Config;
-
+
//
- // Set the default gateway address.
+ // Set the default gateway address.
//
if (!Private->NoGateway && !NetIp6IsUnspecifiedAddr (&Private->GatewayIp.v6)) {
Status = Ip6Config->SetData (
@@ -752,7 +752,7 @@ HttpBootSetIp6Gateway (
/**
This function will register the station IP address.
-
+
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
@retval EFI_SUCCESS The new IP address has been configured successfully.
@@ -772,29 +772,29 @@ HttpBootSetIp6Address (
EFI_IPv6_ADDRESS *Ip6Addr;
EFI_IPv6_ADDRESS GatewayAddr;
EFI_IP6_CONFIG_DATA Ip6CfgData;
- EFI_EVENT MappedEvt;
+ EFI_EVENT MappedEvt;
UINTN DataSize;
BOOLEAN IsAddressOk;
UINTN Index;
ASSERT (Private->UsingIpv6);
-
+
MappedEvt = NULL;
IsAddressOk = FALSE;
Ip6Addr = NULL;
Ip6Cfg = Private->Ip6Config;
Ip6 = Private->Ip6;
-
+
ZeroMem (&CfgAddr, sizeof (EFI_IP6_CONFIG_MANUAL_ADDRESS));
CopyMem (&CfgAddr, &Private->StationIp.v6, sizeof (EFI_IPv6_ADDRESS));
ZeroMem (&Ip6CfgData, sizeof (EFI_IP6_CONFIG_DATA));
-
+
Ip6CfgData.AcceptIcmpErrors = TRUE;
Ip6CfgData.DefaultProtocol = IP6_ICMP;
Ip6CfgData.HopLimit = HTTP_BOOT_DEFAULT_HOPLIMIT;
Ip6CfgData.ReceiveTimeout = HTTP_BOOT_DEFAULT_LIFETIME;
Ip6CfgData.TransmitTimeout = HTTP_BOOT_DEFAULT_LIFETIME;
-
+
Status = Ip6->Configure (Ip6, &Ip6CfgData);
if (EFI_ERROR (Status)) {
goto ON_EXIT;
@@ -823,7 +823,7 @@ HttpBootSetIp6Address (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
//
// Create a notify event to set address flag when DAD if IP6 driver succeeded.
//
@@ -837,7 +837,7 @@ HttpBootSetIp6Address (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
//
// Set static host ip6 address. This is a asynchronous process.
//
@@ -855,7 +855,7 @@ HttpBootSetIp6Address (
Ip6ConfigDataTypeManualAddress,
sizeof (EFI_IP6_CONFIG_MANUAL_ADDRESS),
&CfgAddr
- );
+ );
if (EFI_ERROR (Status) && Status != EFI_NOT_READY) {
goto ON_EXIT;
} else if (Status == EFI_NOT_READY) {
@@ -879,7 +879,7 @@ HttpBootSetIp6Address (
Status = EFI_DEVICE_ERROR;
goto ON_EXIT;
}
-
+
Ip6Addr = AllocatePool (DataSize);
if (Ip6Addr == NULL) {
return EFI_OUT_OF_RESOURCES;
@@ -903,9 +903,9 @@ HttpBootSetIp6Address (
if (Index == DataSize / sizeof (EFI_IPv6_ADDRESS)) {
Status = EFI_ABORTED;
goto ON_EXIT;
- }
+ }
}
-
+
ON_EXIT:
if (MappedEvt != NULL) {
Ip6Cfg->UnregisterDataNotify (
@@ -919,8 +919,8 @@ ON_EXIT:
if (Ip6Addr != NULL) {
FreePool (Ip6Addr);
}
-
- return Status;
+
+ return Status;
}
/**
@@ -954,15 +954,15 @@ HttpBootDhcp6Sarr (
//
OptCount = HttpBootBuildDhcp6Options (Private, OptList, Buffer);
ASSERT (OptCount >0);
-
+
Retransmit = AllocateZeroPool (sizeof (EFI_DHCP6_RETRANSMISSION));
if (Retransmit == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
ZeroMem (&Mode, sizeof (EFI_DHCP6_MODE_DATA));
ZeroMem (&Config, sizeof (EFI_DHCP6_CONFIG_DATA));
-
+
Config.OptionCount = OptCount;
Config.OptionList = OptList;
Config.Dhcp6Callback = HttpBootDhcp6CallBack;
@@ -977,7 +977,7 @@ HttpBootDhcp6Sarr (
Retransmit->Mrc = 4;
Retransmit->Mrt = 32;
Retransmit->Mrd = 60;
-
+
//
// Configure the DHCPv6 instance for HTTP boot.
//
@@ -993,7 +993,7 @@ HttpBootDhcp6Sarr (
Private->SelectIndex = 0;
ZeroMem (Private->OfferCount, sizeof (Private->OfferCount));
ZeroMem (Private->OfferIndex, sizeof (Private->OfferIndex));
-
+
//
// Start DHCPv6 S.A.R.R. process to acquire IPv6 address.
//
@@ -1001,7 +1001,7 @@ HttpBootDhcp6Sarr (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
//
// Get the acquired IPv6 address and store them.
//
@@ -1009,14 +1009,14 @@ HttpBootDhcp6Sarr (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
ASSERT (Mode.Ia->State == Dhcp6Bound);
CopyMem (&Private->StationIp.v6, &Mode.Ia->IaAddress[0].IpAddress, sizeof (EFI_IPv6_ADDRESS));
-
+
AsciiPrint ("\n Station IPv6 address is ");
HttpBootShowIp6Addr (&Private->StationIp.v6);
AsciiPrint ("\n");
-
+
ON_EXIT:
if (EFI_ERROR (Status)) {
Dhcp6->Stop (Dhcp6);
@@ -1032,7 +1032,7 @@ ON_EXIT:
}
}
- return Status;
-
+ return Status;
+
}
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.h b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.h
index 9f2989831e..d775a60304 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.h
@@ -1,13 +1,13 @@
/** @file
Functions declaration related with DHCPv6 for HTTP boot driver.
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<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.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<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.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -127,7 +127,7 @@ HttpBootSetIp6Policy (
/**
This function will register the default DNS addresses to the network device.
-
+
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
@param[in] DataLength Size of the buffer pointed to by DnsServerData in bytes.
@param[in] DnsServerData Point a list of DNS server address in an array
@@ -146,7 +146,7 @@ HttpBootSetIp6Dns (
/**
This function will register the IPv6 gateway address to the network device.
-
+
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
@retval EFI_SUCCESS The new IP configuration has been configured successfully.
@@ -160,7 +160,7 @@ HttpBootSetIp6Gateway (
/**
This function will register the station IP address.
-
+
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
@retval EFI_SUCCESS The new IP address has been configured successfully.
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.c b/NetworkPkg/HttpBootDxe/HttpBootDxe.c
index 8a61f51cc8..7ec06f960d 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDxe.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.c
@@ -1,14 +1,14 @@
/** @file
Driver Binding functions implementation for UEFI HTTP boot.
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<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.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<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.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -75,7 +75,7 @@ HttpBootCheckIpv6Support (
//
// Get the NIC handle by SNP protocol.
- //
+ //
Handle = NetLibGetSnpHandle (Private->Controller, NULL);
if (Handle == NULL) {
return EFI_NOT_FOUND;
@@ -121,11 +121,11 @@ HttpBootCheckIpv6Support (
if (EFI_ERROR (Status) || InfoBlock == NULL) {
FreePool (InfoBlock);
return EFI_NOT_FOUND;
- }
+ }
*Ipv6Support = ((EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT *) InfoBlock)->Ipv6Support;
FreePool (InfoBlock);
-
+
return EFI_SUCCESS;
}
@@ -167,14 +167,14 @@ HttpBootDestroyIp4Children (
}
if (Private->Ip4Nic != NULL) {
-
+
gBS->CloseProtocol (
Private->Controller,
&gEfiCallerIdGuid,
This->DriverBindingHandle,
Private->Ip4Nic->Controller
);
-
+
gBS->UninstallMultipleProtocolInterfaces (
Private->Ip4Nic->Controller,
&gEfiLoadFileProtocolGuid,
@@ -204,7 +204,7 @@ HttpBootDestroyIp6Children (
{
ASSERT (This != NULL);
ASSERT (Private != NULL);
-
+
if (Private->Ip6Child != NULL) {
gBS->CloseProtocol (
Private->Ip6Child,
@@ -241,16 +241,16 @@ HttpBootDestroyIp6Children (
HttpIoDestroyIo(&Private->HttpIo);
Private->HttpCreated = FALSE;
}
-
+
if (Private->Ip6Nic != NULL) {
-
+
gBS->CloseProtocol (
Private->Controller,
&gEfiCallerIdGuid,
This->DriverBindingHandle,
Private->Ip6Nic->Controller
);
-
+
gBS->UninstallMultipleProtocolInterfaces (
Private->Ip6Nic->Controller,
&gEfiLoadFileProtocolGuid,
@@ -265,33 +265,33 @@ HttpBootDestroyIp6Children (
}
/**
- Tests to see if this driver supports a given controller. If a child device is provided,
+ Tests to see if this driver supports a given controller. If a child device is provided,
it further tests to see if this driver supports creating a handle for the specified child device.
- This function checks to see if the driver specified by This supports the device specified by
- ControllerHandle. Drivers will typically use the device path attached to
- ControllerHandle and/or the services from the bus I/O abstraction attached to
- ControllerHandle to determine if the driver supports ControllerHandle. This function
- may be called many times during platform initialization. In order to reduce boot times, the tests
- performed by this function must be very small, and take as little time as possible to execute. This
- function must not change the state of any hardware devices, and this function must be aware that the
- device specified by ControllerHandle may already be managed by the same driver or a
- different driver. This function must match its calls to AllocatePages() with FreePages(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- Because ControllerHandle may have been previously started by the same driver, if a protocol is
- already in the opened state, then it must not be closed with CloseProtocol(). This is required
+ This function checks to see if the driver specified by This supports the device specified by
+ ControllerHandle. Drivers will typically use the device path attached to
+ ControllerHandle and/or the services from the bus I/O abstraction attached to
+ ControllerHandle to determine if the driver supports ControllerHandle. This function
+ may be called many times during platform initialization. In order to reduce boot times, the tests
+ performed by this function must be very small, and take as little time as possible to execute. This
+ function must not change the state of any hardware devices, and this function must be aware that the
+ device specified by ControllerHandle may already be managed by the same driver or a
+ different driver. This function must match its calls to AllocatePages() with FreePages(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ Because ControllerHandle may have been previously started by the same driver, if a protocol is
+ already in the opened state, then it must not be closed with CloseProtocol(). This is required
to guarantee the state of ControllerHandle is not modified by this function.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param[in] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
- parameter is ignored by device drivers, and is optional for bus
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by this
+ @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
+ parameter is ignored by device drivers, and is optional for bus
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -315,7 +315,7 @@ HttpBootIp4DxeDriverBindingSupported (
)
{
EFI_STATUS Status;
-
+
//
// Try to open the DHCP4, HTTP4 and Device Path protocol.
//
@@ -360,28 +360,28 @@ HttpBootIp4DxeDriverBindingSupported (
Starts a device controller or a bus controller.
The Start() function is designed to be invoked from the EFI boot service ConnectController().
- As a result, much of the error checking on the parameters to Start() has been moved into this
- common boot service. It is legal to call Start() from other locations,
+ As a result, much of the error checking on the parameters to Start() has been moved into this
+ common boot service. It is legal to call Start() from other locations,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
3. Prior to calling Start(), the Supported() function for the driver specified by This must
- have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
+ have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param[in] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
- parameter is ignored by device drivers, and is optional for bus
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- If this parameter is not NULL and the first Device Path Node is
- not the End of Device Path Node, then only the handle for the
- child device specified by the first Device Path Node of
+ @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
+ parameter is ignored by device drivers, and is optional for bus
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ If this parameter is not NULL and the first Device Path Node is
+ not the End of Device Path Node, then only the handle for the
+ child device specified by the first Device Path Node of
RemainingDevicePath is created by this driver.
- If the first Device Path Node of RemainingDevicePath is
+ If the first Device Path Node of RemainingDevicePath is
the End of Device Path Node, no child handle is created by this
driver.
@@ -421,7 +421,7 @@ HttpBootIp4DxeDriverBindingStart (
Private = HTTP_BOOT_PRIVATE_DATA_FROM_ID(Id);
} else {
FirstStart = TRUE;
-
+
//
// Initialize the private data structure.
//
@@ -483,16 +483,16 @@ HttpBootIp4DxeDriverBindingStart (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
}
-
+
if (Private->Ip4Nic != NULL) {
//
// Already created before
//
return EFI_SUCCESS;
}
-
+
Private->Ip4Nic = AllocateZeroPool (sizeof (HTTP_BOOT_VIRTUAL_NIC));
if (Private->Ip4Nic == NULL) {
Status = EFI_OUT_OF_RESOURCES;
@@ -501,7 +501,7 @@ HttpBootIp4DxeDriverBindingStart (
Private->Ip4Nic->Private = Private;
Private->Ip4Nic->ImageHandle = This->DriverBindingHandle;
Private->Ip4Nic->Signature = HTTP_BOOT_VIRTUAL_NIC_SIGNATURE;
-
+
//
// Create DHCP4 child instance.
//
@@ -514,7 +514,7 @@ HttpBootIp4DxeDriverBindingStart (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
Status = gBS->OpenProtocol (
Private->Dhcp4Child,
&gEfiDhcp4ProtocolGuid,
@@ -526,7 +526,7 @@ HttpBootIp4DxeDriverBindingStart (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
//
// Get the Ip4Config2 protocol, it's required to configure the default gateway address.
//
@@ -541,7 +541,7 @@ HttpBootIp4DxeDriverBindingStart (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
//
// Append IPv4 device path node.
//
@@ -560,7 +560,7 @@ HttpBootIp4DxeDriverBindingStart (
Status = EFI_OUT_OF_RESOURCES;
goto ON_ERROR;
}
-
+
//
// Append URI device path node.
//
@@ -579,7 +579,7 @@ HttpBootIp4DxeDriverBindingStart (
Status = EFI_OUT_OF_RESOURCES;
goto ON_ERROR;
}
-
+
//
// Create a child handle for the HTTP boot and install DevPath and Load file protocol on it.
//
@@ -595,7 +595,7 @@ HttpBootIp4DxeDriverBindingStart (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
//
// Open the Caller Id child to setup a parent-child relationship between
// real NIC handle and the HTTP boot Ipv4 NIC handle.
@@ -611,9 +611,9 @@ HttpBootIp4DxeDriverBindingStart (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
return EFI_SUCCESS;
-
+
ON_ERROR:
if (Private != NULL) {
if (FirstStart) {
@@ -623,7 +623,7 @@ ON_ERROR:
&Private->Id
);
}
-
+
HttpBootDestroyIp4Children (This, Private);
HttpBootConfigFormUnload (Private);
@@ -638,10 +638,10 @@ ON_ERROR:
/**
Stops a device controller or a bus controller.
-
- The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
- As a result, much of the error checking on the parameters to Stop() has been moved
- into this common boot service. It is legal to call Stop() from other locations,
+
+ The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
+ As a result, much of the error checking on the parameters to Stop() has been moved
+ into this common boot service. It is legal to call Stop() from other locations,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
same driver's Start() function.
@@ -649,13 +649,13 @@ ON_ERROR:
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
Start() function, and the Start() function must have called OpenProtocol() on
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
-
+
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param[in] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
- @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
+ @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
if NumberOfChildren is 0.
@retval EFI_SUCCESS The device was stopped.
@@ -729,7 +729,7 @@ HttpBootIp4DxeDriverBindingStop (
// Destory all child instance and uninstall protocol interface.
//
HttpBootDestroyIp4Children (This, Private);
-
+
if (Private->Ip4Nic == NULL && Private->Ip6Nic == NULL) {
//
// Release the cached data.
@@ -740,7 +740,7 @@ HttpBootIp4DxeDriverBindingStop (
// Unload the config form.
//
HttpBootConfigFormUnload (Private);
-
+
gBS->UninstallProtocolInterface (
NicHandle,
&gEfiCallerIdGuid,
@@ -754,33 +754,33 @@ HttpBootIp4DxeDriverBindingStop (
}
/**
- Tests to see if this driver supports a given controller. If a child device is provided,
+ Tests to see if this driver supports a given controller. If a child device is provided,
it further tests to see if this driver supports creating a handle for the specified child device.
- This function checks to see if the driver specified by This supports the device specified by
- ControllerHandle. Drivers will typically use the device path attached to
- ControllerHandle and/or the services from the bus I/O abstraction attached to
- ControllerHandle to determine if the driver supports ControllerHandle. This function
- may be called many times during platform initialization. In order to reduce boot times, the tests
- performed by this function must be very small, and take as little time as possible to execute. This
- function must not change the state of any hardware devices, and this function must be aware that the
- device specified by ControllerHandle may already be managed by the same driver or a
- different driver. This function must match its calls to AllocatePages() with FreePages(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- Because ControllerHandle may have been previously started by the same driver, if a protocol is
- already in the opened state, then it must not be closed with CloseProtocol(). This is required
+ This function checks to see if the driver specified by This supports the device specified by
+ ControllerHandle. Drivers will typically use the device path attached to
+ ControllerHandle and/or the services from the bus I/O abstraction attached to
+ ControllerHandle to determine if the driver supports ControllerHandle. This function
+ may be called many times during platform initialization. In order to reduce boot times, the tests
+ performed by this function must be very small, and take as little time as possible to execute. This
+ function must not change the state of any hardware devices, and this function must be aware that the
+ device specified by ControllerHandle may already be managed by the same driver or a
+ different driver. This function must match its calls to AllocatePages() with FreePages(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ Because ControllerHandle may have been previously started by the same driver, if a protocol is
+ already in the opened state, then it must not be closed with CloseProtocol(). This is required
to guarantee the state of ControllerHandle is not modified by this function.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param[in] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
- parameter is ignored by device drivers, and is optional for bus
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by this
+ @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
+ parameter is ignored by device drivers, and is optional for bus
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -804,7 +804,7 @@ HttpBootIp6DxeDriverBindingSupported (
)
{
EFI_STATUS Status;
-
+
//
// Try to open the DHCP6, HTTP and Device Path protocol.
//
@@ -849,28 +849,28 @@ HttpBootIp6DxeDriverBindingSupported (
Starts a device controller or a bus controller.
The Start() function is designed to be invoked from the EFI boot service ConnectController().
- As a result, much of the error checking on the parameters to Start() has been moved into this
- common boot service. It is legal to call Start() from other locations,
+ As a result, much of the error checking on the parameters to Start() has been moved into this
+ common boot service. It is legal to call Start() from other locations,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
3. Prior to calling Start(), the Supported() function for the driver specified by This must
- have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
+ have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param[in] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
- parameter is ignored by device drivers, and is optional for bus
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- If this parameter is not NULL and the first Device Path Node is
- not the End of Device Path Node, then only the handle for the
- child device specified by the first Device Path Node of
+ @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
+ parameter is ignored by device drivers, and is optional for bus
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ If this parameter is not NULL and the first Device Path Node is
+ not the End of Device Path Node, then only the handle for the
+ child device specified by the first Device Path Node of
RemainingDevicePath is created by this driver.
- If the first Device Path Node of RemainingDevicePath is
+ If the first Device Path Node of RemainingDevicePath is
the End of Device Path Node, no child handle is created by this
driver.
@@ -897,7 +897,7 @@ HttpBootIp6DxeDriverBindingStart (
BOOLEAN FirstStart;
FirstStart = FALSE;
-
+
Status = gBS->OpenProtocol (
ControllerHandle,
&gEfiCallerIdGuid,
@@ -906,12 +906,12 @@ HttpBootIp6DxeDriverBindingStart (
ControllerHandle,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
);
-
+
if (!EFI_ERROR (Status)) {
Private = HTTP_BOOT_PRIVATE_DATA_FROM_ID(Id);
} else {
FirstStart = TRUE;
-
+
//
// Initialize the private data structure.
//
@@ -973,16 +973,16 @@ HttpBootIp6DxeDriverBindingStart (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
}
//
// Set IPv6 available flag.
- //
+ //
Status = HttpBootCheckIpv6Support (Private, &Ipv6Available);
if (EFI_ERROR (Status)) {
//
- // Fail to get the data whether UNDI supports IPv6.
+ // Fail to get the data whether UNDI supports IPv6.
// Set default value to TRUE.
//
Ipv6Available = TRUE;
@@ -992,14 +992,14 @@ HttpBootIp6DxeDriverBindingStart (
Status = EFI_UNSUPPORTED;
goto ON_ERROR;
}
-
+
if (Private->Ip6Nic != NULL) {
//
// Already created before
//
return EFI_SUCCESS;
}
-
+
Private->Ip6Nic = AllocateZeroPool (sizeof (HTTP_BOOT_VIRTUAL_NIC));
if (Private->Ip6Nic == NULL) {
Status = EFI_OUT_OF_RESOURCES;
@@ -1008,7 +1008,7 @@ HttpBootIp6DxeDriverBindingStart (
Private->Ip6Nic->Private = Private;
Private->Ip6Nic->ImageHandle = This->DriverBindingHandle;
Private->Ip6Nic->Signature = HTTP_BOOT_VIRTUAL_NIC_SIGNATURE;
-
+
//
// Create Dhcp6 child and open Dhcp6 protocol
Status = NetLibCreateServiceChild (
@@ -1144,7 +1144,7 @@ HttpBootIp6DxeDriverBindingStart (
}
return EFI_SUCCESS;
-
+
ON_ERROR:
if (Private != NULL) {
if (FirstStart) {
@@ -1168,10 +1168,10 @@ ON_ERROR:
/**
Stops a device controller or a bus controller.
-
- The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
- As a result, much of the error checking on the parameters to Stop() has been moved
- into this common boot service. It is legal to call Stop() from other locations,
+
+ The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
+ As a result, much of the error checking on the parameters to Stop() has been moved
+ into this common boot service. It is legal to call Stop() from other locations,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
same driver's Start() function.
@@ -1179,13 +1179,13 @@ ON_ERROR:
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
Start() function, and the Start() function must have called OpenProtocol() on
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
-
+
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param[in] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
- @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
+ @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
if NumberOfChildren is 0.
@retval EFI_SUCCESS The device was stopped.
@@ -1317,7 +1317,7 @@ HttpBootDxeDriverEntryPoint (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
Status = EfiLibInstallDriverBindingComponentName2 (
ImageHandle,
SystemTable,
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.h b/NetworkPkg/HttpBootDxe/HttpBootDxe.h
index 166bc458f1..316e143152 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDxe.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.h
@@ -1,15 +1,15 @@
/** @file
UEFI HTTP boot driver's private data structure and interfaces declaration.
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2018, 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.
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -77,7 +77,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define HTTP_BOOT_DXE_VERSION 0xa
//
-// Standard Media Types defined in
+// Standard Media Types defined in
// http://www.iana.org/assignments/media-types
//
#define HTTP_CONTENT_TYPE_APP_EFI "application/efi"
@@ -136,7 +136,7 @@ struct _HTTP_BOOT_VIRTUAL_NIC {
CallbackInfo, \
HTTP_BOOT_PRIVATE_DATA_SIGNATURE \
)
-
+
#define HTTP_BOOT_PRIVATE_DATA_FROM_CALLBACK_PROTOCOL(CallbackProtocol) \
CR ( \
CallbackProtocol, \
@@ -172,7 +172,7 @@ struct _HTTP_BOOT_PRIVATE_DATA {
EFI_DHCP6_PROTOCOL *Dhcp6;
EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
-
+
//
// Produced protocol
//
@@ -273,33 +273,33 @@ struct _HTTP_BOOT_PRIVATE_DATA {
extern EFI_LOAD_FILE_PROTOCOL gHttpBootDxeLoadFile;
/**
- Tests to see if this driver supports a given controller. If a child device is provided,
+ Tests to see if this driver supports a given controller. If a child device is provided,
it further tests to see if this driver supports creating a handle for the specified child device.
- This function checks to see if the driver specified by This supports the device specified by
- ControllerHandle. Drivers will typically use the device path attached to
- ControllerHandle and/or the services from the bus I/O abstraction attached to
- ControllerHandle to determine if the driver supports ControllerHandle. This function
- may be called many times during platform initialization. In order to reduce boot times, the tests
- performed by this function must be very small, and take as little time as possible to execute. This
- function must not change the state of any hardware devices, and this function must be aware that the
- device specified by ControllerHandle may already be managed by the same driver or a
- different driver. This function must match its calls to AllocatePages() with FreePages(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- Because ControllerHandle may have been previously started by the same driver, if a protocol is
- already in the opened state, then it must not be closed with CloseProtocol(). This is required
+ This function checks to see if the driver specified by This supports the device specified by
+ ControllerHandle. Drivers will typically use the device path attached to
+ ControllerHandle and/or the services from the bus I/O abstraction attached to
+ ControllerHandle to determine if the driver supports ControllerHandle. This function
+ may be called many times during platform initialization. In order to reduce boot times, the tests
+ performed by this function must be very small, and take as little time as possible to execute. This
+ function must not change the state of any hardware devices, and this function must be aware that the
+ device specified by ControllerHandle may already be managed by the same driver or a
+ different driver. This function must match its calls to AllocatePages() with FreePages(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ Because ControllerHandle may have been previously started by the same driver, if a protocol is
+ already in the opened state, then it must not be closed with CloseProtocol(). This is required
to guarantee the state of ControllerHandle is not modified by this function.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param[in] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
- parameter is ignored by device drivers, and is optional for bus
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by this
+ @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
+ parameter is ignored by device drivers, and is optional for bus
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -326,28 +326,28 @@ HttpBootIp4DxeDriverBindingSupported (
Starts a device controller or a bus controller.
The Start() function is designed to be invoked from the EFI boot service ConnectController().
- As a result, much of the error checking on the parameters to Start() has been moved into this
- common boot service. It is legal to call Start() from other locations,
+ As a result, much of the error checking on the parameters to Start() has been moved into this
+ common boot service. It is legal to call Start() from other locations,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
3. Prior to calling Start(), the Supported() function for the driver specified by This must
- have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
+ have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param[in] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
- parameter is ignored by device drivers, and is optional for bus
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- If this parameter is not NULL and the first Device Path Node is
- not the End of Device Path Node, then only the handle for the
- child device specified by the first Device Path Node of
+ @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
+ parameter is ignored by device drivers, and is optional for bus
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ If this parameter is not NULL and the first Device Path Node is
+ not the End of Device Path Node, then only the handle for the
+ child device specified by the first Device Path Node of
RemainingDevicePath is created by this driver.
- If the first Device Path Node of RemainingDevicePath is
+ If the first Device Path Node of RemainingDevicePath is
the End of Device Path Node, no child handle is created by this
driver.
@@ -367,10 +367,10 @@ HttpBootIp4DxeDriverBindingStart (
/**
Stops a device controller or a bus controller.
-
- The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
- As a result, much of the error checking on the parameters to Stop() has been moved
- into this common boot service. It is legal to call Stop() from other locations,
+
+ The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
+ As a result, much of the error checking on the parameters to Stop() has been moved
+ into this common boot service. It is legal to call Stop() from other locations,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
same driver's Start() function.
@@ -378,13 +378,13 @@ HttpBootIp4DxeDriverBindingStart (
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
Start() function, and the Start() function must have called OpenProtocol() on
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
-
+
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param[in] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
- @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
+ @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
if NumberOfChildren is 0.
@retval EFI_SUCCESS The device was stopped.
@@ -401,33 +401,33 @@ HttpBootIp4DxeDriverBindingStop (
);
/**
- Tests to see if this driver supports a given controller. If a child device is provided,
+ Tests to see if this driver supports a given controller. If a child device is provided,
it further tests to see if this driver supports creating a handle for the specified child device.
- This function checks to see if the driver specified by This supports the device specified by
- ControllerHandle. Drivers will typically use the device path attached to
- ControllerHandle and/or the services from the bus I/O abstraction attached to
- ControllerHandle to determine if the driver supports ControllerHandle. This function
- may be called many times during platform initialization. In order to reduce boot times, the tests
- performed by this function must be very small, and take as little time as possible to execute. This
- function must not change the state of any hardware devices, and this function must be aware that the
- device specified by ControllerHandle may already be managed by the same driver or a
- different driver. This function must match its calls to AllocatePages() with FreePages(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- Because ControllerHandle may have been previously started by the same driver, if a protocol is
- already in the opened state, then it must not be closed with CloseProtocol(). This is required
+ This function checks to see if the driver specified by This supports the device specified by
+ ControllerHandle. Drivers will typically use the device path attached to
+ ControllerHandle and/or the services from the bus I/O abstraction attached to
+ ControllerHandle to determine if the driver supports ControllerHandle. This function
+ may be called many times during platform initialization. In order to reduce boot times, the tests
+ performed by this function must be very small, and take as little time as possible to execute. This
+ function must not change the state of any hardware devices, and this function must be aware that the
+ device specified by ControllerHandle may already be managed by the same driver or a
+ different driver. This function must match its calls to AllocatePages() with FreePages(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ Because ControllerHandle may have been previously started by the same driver, if a protocol is
+ already in the opened state, then it must not be closed with CloseProtocol(). This is required
to guarantee the state of ControllerHandle is not modified by this function.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param[in] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
- parameter is ignored by device drivers, and is optional for bus
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by this
+ @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
+ parameter is ignored by device drivers, and is optional for bus
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -454,28 +454,28 @@ HttpBootIp6DxeDriverBindingSupported (
Starts a device controller or a bus controller.
The Start() function is designed to be invoked from the EFI boot service ConnectController().
- As a result, much of the error checking on the parameters to Start() has been moved into this
- common boot service. It is legal to call Start() from other locations,
+ As a result, much of the error checking on the parameters to Start() has been moved into this
+ common boot service. It is legal to call Start() from other locations,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
3. Prior to calling Start(), the Supported() function for the driver specified by This must
- have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
+ have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param[in] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
- parameter is ignored by device drivers, and is optional for bus
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- If this parameter is not NULL and the first Device Path Node is
- not the End of Device Path Node, then only the handle for the
- child device specified by the first Device Path Node of
+ @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
+ parameter is ignored by device drivers, and is optional for bus
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ If this parameter is not NULL and the first Device Path Node is
+ not the End of Device Path Node, then only the handle for the
+ child device specified by the first Device Path Node of
RemainingDevicePath is created by this driver.
- If the first Device Path Node of RemainingDevicePath is
+ If the first Device Path Node of RemainingDevicePath is
the End of Device Path Node, no child handle is created by this
driver.
@@ -495,10 +495,10 @@ HttpBootIp6DxeDriverBindingStart (
/**
Stops a device controller or a bus controller.
-
- The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
- As a result, much of the error checking on the parameters to Stop() has been moved
- into this common boot service. It is legal to call Stop() from other locations,
+
+ The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
+ As a result, much of the error checking on the parameters to Stop() has been moved
+ into this common boot service. It is legal to call Stop() from other locations,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
same driver's Start() function.
@@ -506,13 +506,13 @@ HttpBootIp6DxeDriverBindingStart (
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
Start() function, and the Start() function must have called OpenProtocol() on
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
-
+
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param[in] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
- @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
+ @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
if NumberOfChildren is 0.
@retval EFI_SUCCESS The device was stopped.
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.inf b/NetworkPkg/HttpBootDxe/HttpBootDxe.inf
index 6d2a772206..f0e3fad68e 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDxe.inf
+++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.inf
@@ -1,15 +1,15 @@
## @file
# This modules produce the Load File Protocol for UEFI HTTP boot.
-#
-# Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
+#
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
-#
+#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
+#
##
[Defines]
@@ -68,7 +68,7 @@
## TO_START
## BY_START
gEfiDevicePathProtocolGuid
-
+
gEfiLoadFileProtocolGuid ## BY_START
gEfiHttpServiceBindingProtocolGuid ## CONSUMES
gEfiHttpProtocolGuid ## CONSUMES
@@ -99,7 +99,7 @@
gEfiAdapterInfoUndiIpv6SupportGuid ## SOMETIMES_CONSUMES ## GUID
[Pcd]
- gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections ## CONSUMES
+ gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections ## CONSUMES
[UserExtensions.TianoCore."ExtraFiles"]
HttpBootDxeExtra.uni
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.uni b/NetworkPkg/HttpBootDxe/HttpBootDxe.uni
index 370f115347..6abd2c5f37 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDxe.uni
+++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.uni
@@ -3,15 +3,15 @@
//
// This driver provides EFI Load File Protocol which is used to download
// the boot image from HTTP server. It could work with an IPv4 or IPv6 stack.
-//
//
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+//
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
//
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
// which accompanies this distribution. The full text of the license may be found at
// http://opensource.org/licenses/bsd-license.php.
-//
+//
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxeExtra.uni b/NetworkPkg/HttpBootDxe/HttpBootDxeExtra.uni
index d6a0f0cef6..593538b2ac 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDxeExtra.uni
+++ b/NetworkPkg/HttpBootDxe/HttpBootDxeExtra.uni
@@ -1,7 +1,7 @@
// /** @file
// HttpBootDxe Localized Strings and Content
//
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
//
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
@@ -13,8 +13,8 @@
//
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"UEFI HTTP BOOT DXE"
diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.c b/NetworkPkg/HttpBootDxe/HttpBootImpl.c
index a0fd934ec4..0f222adefd 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootImpl.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootImpl.c
@@ -3,12 +3,12 @@
Copyright (c) 2015 - 2018, 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.
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -96,7 +96,7 @@ HttpBootUninstallCallback (
/**
Enable the use of UEFI HTTP boot function.
- If the driver has already been started but not satisfy the requirement (IP stack and
+ If the driver has already been started but not satisfy the requirement (IP stack and
specified boot file path), this function will stop the driver and start it again.
@param[in] Private The pointer to the driver's private data.
@@ -110,7 +110,7 @@ HttpBootUninstallCallback (
@retval EFI_INVALID_PARAMETER The FilePath doesn't contain a valid URI device path node.
@retval EFI_ALREADY_STARTED The driver is already in started state.
@retval EFI_OUT_OF_RESOURCES There are not enough resources.
-
+
**/
EFI_STATUS
HttpBootStart (
@@ -124,20 +124,20 @@ HttpBootStart (
CHAR8 *Uri;
Uri = NULL;
-
+
if (Private == NULL || FilePath == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// Check the URI in the input FilePath, in order to see whether it is
- // required to boot from a new specified boot file.
+ // required to boot from a new specified boot file.
//
Status = HttpBootParseFilePath (FilePath, &Uri);
if (EFI_ERROR (Status)) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// Check whether we need to stop and restart the HTTP boot driver.
//
@@ -148,7 +148,7 @@ HttpBootStart (
// 2. The specified boot file URI in FilePath is different with the one we have
// recorded before.
//
- if ((UsingIpv6 != Private->UsingIpv6) ||
+ if ((UsingIpv6 != Private->UsingIpv6) ||
((Uri != NULL) && (AsciiStrCmp (Private->BootFileUri, Uri) != 0))) {
//
// Restart is required, first stop then continue this start function.
@@ -201,7 +201,7 @@ HttpBootStart (
return Status;
}
}
-
+
//
// Init the content of cached DHCP offer list.
//
@@ -241,7 +241,7 @@ HttpBootStart (
@retval EFI_NOT_STARTED The driver is in stopped state.
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
@retval Others Other errors as indicated.
-
+
**/
EFI_STATUS
HttpBootDhcp (
@@ -253,7 +253,7 @@ HttpBootDhcp (
if (Private == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
if (!Private->Started) {
return EFI_NOT_STARTED;
}
@@ -292,11 +292,11 @@ HttpBootDhcp (
@retval EFI_INVALID_PARAMETER Private is NULL, or ImageType is NULL, or BufferSize is NULL.
@retval EFI_INVALID_PARAMETER *BufferSize is not zero, and Buffer is NULL.
@retval EFI_NOT_STARTED The driver is in stopped state.
- @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small to read the boot file. BufferSize has
+ @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small to read the boot file. BufferSize has
been updated with the size needed to complete the request.
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
@retval Others Other errors as indicated.
-
+
**/
EFI_STATUS
HttpBootLoadFile (
@@ -315,7 +315,7 @@ HttpBootLoadFile (
if (*BufferSize != 0 && Buffer == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
if (!Private->Started) {
return EFI_NOT_STARTED;
}
@@ -397,10 +397,10 @@ HttpBootLoadFile (
Buffer,
ImageType
);
-
+
ON_EXIT:
HttpBootUninstallCallback (Private);
-
+
if (EFI_ERROR (Status)) {
if (Status == EFI_ACCESS_DENIED) {
AsciiPrint ("\n Error: Could not establish connection with HTTP server.\n");
@@ -418,7 +418,7 @@ ON_EXIT:
AsciiPrint ("\n Error: Unexpected network error.\n");
}
}
-
+
return Status;
}
@@ -431,7 +431,7 @@ ON_EXIT:
@retval EFI_NOT_STARTED The driver is already in stopped state.
@retval EFI_INVALID_PARAMETER Private is NULL.
@retval Others Unexpected error when stop the function.
-
+
**/
EFI_STATUS
HttpBootStop (
@@ -443,16 +443,16 @@ HttpBootStop (
if (Private == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
if (!Private->Started) {
return EFI_NOT_STARTED;
}
-
+
if (Private->HttpCreated) {
HttpIoDestroyIo (&Private->HttpIo);
Private->HttpCreated = FALSE;
}
-
+
Private->Started = FALSE;
ZeroMem (&Private->StationIp, sizeof (EFI_IP_ADDRESS));
ZeroMem (&Private->SubnetMask, sizeof (EFI_IP_ADDRESS));
@@ -462,7 +462,7 @@ HttpBootStop (
Private->BootFileUriParser = NULL;
Private->BootFileSize = 0;
Private->SelectIndex = 0;
- Private->SelectProxyType = HttpOfferTypeMax;
+ Private->SelectProxyType = HttpOfferTypeMax;
if (!Private->UsingIpv6) {
//
@@ -482,7 +482,7 @@ HttpBootStop (
//
Private->Dhcp6->Stop (Private->Dhcp6);
Private->Dhcp6->Configure (Private->Dhcp6, NULL);
-
+
for (Index = 0; Index < HTTP_BOOT_OFFER_MAX_NUM; Index++) {
if (Private->OfferBuffer[Index].Dhcp6.UriParser) {
HttpUrlFreeParser (Private->OfferBuffer[Index].Dhcp6.UriParser);
@@ -501,14 +501,14 @@ HttpBootStop (
Private->FilePathUri = NULL;
Private->FilePathUriParser = NULL;
}
-
+
ZeroMem (Private->OfferBuffer, sizeof (Private->OfferBuffer));
Private->OfferNum = 0;
ZeroMem (Private->OfferCount, sizeof (Private->OfferCount));
ZeroMem (Private->OfferIndex, sizeof (Private->OfferIndex));
-
+
HttpBootFreeCacheList (Private);
-
+
return EFI_SUCCESS;
}
@@ -573,7 +573,7 @@ HttpBootDxeLoadFile (
VirtualNic = HTTP_BOOT_VIRTUAL_NIC_FROM_LOADFILE (This);
Private = VirtualNic->Private;
-
+
//
// Check media status before HTTP boot start
//
@@ -583,7 +583,7 @@ HttpBootDxeLoadFile (
AsciiPrint ("\n Error: Could not detect network connection.\n");
return EFI_NO_MEDIA;
}
-
+
//
// Check whether the virtual nic is using IPv6 or not.
//
@@ -599,7 +599,7 @@ HttpBootDxeLoadFile (
if (Status != EFI_SUCCESS && Status != EFI_ALREADY_STARTED) {
return Status;
}
-
+
//
// Load the boot file.
//
@@ -636,7 +636,7 @@ HttpBootDxeLoadFile (
///
/// Load File Protocol instance
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_LOAD_FILE_PROTOCOL gHttpBootDxeLoadFile = {
HttpBootDxeLoadFile
};
@@ -658,7 +658,7 @@ EFI_LOAD_FILE_PROTOCOL gHttpBootDxeLoadFile = {
@param[in] DataLength The length in bytes of the buffer pointed to by Data.
@param[in] Data A pointer to the buffer of data, the data type is specified by
DataType.
-
+
@retval EFI_SUCCESS Tells the HTTP Boot driver to continue the HTTP Boot process.
@retval EFI_ABORTED Tells the HTTP Boot driver to abort the current HTTP Boot process.
**/
@@ -698,7 +698,7 @@ HttpBootCallback (
case HttpBootHttpResponse:
if (Data != NULL) {
HttpMessage = (EFI_HTTP_MESSAGE *) Data;
-
+
if (HttpMessage->Data.Response != NULL) {
if (HttpBootIsHttpRedirectStatusCode (HttpMessage->Data.Response->StatusCode)) {
//
@@ -714,10 +714,10 @@ HttpBootCallback (
if (HttpHeader != NULL) {
Print (L"\n HTTP ERROR: Resource Redirected.\n New Location: %a\n", HttpHeader->FieldValue);
}
- break;
+ break;
}
}
-
+
HttpHeader = HttpFindHeader (
HttpMessage->HeaderCount,
HttpMessage->Headers,
@@ -767,7 +767,7 @@ HttpBootCallback (
///
/// HTTP Boot Callback Protocol instance
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_HTTP_BOOT_CALLBACK_PROTOCOL gHttpBootDxeHttpBootCallback = {
HttpBootCallback
};
diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.h b/NetworkPkg/HttpBootDxe/HttpBootImpl.h
index 53160359f3..82224ad2f3 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootImpl.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootImpl.h
@@ -1,13 +1,13 @@
/** @file
The declaration of UEFI HTTP boot function.
-Copyright (c) 2015, Intel Corporation. All rights reserved.<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.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<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.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -26,7 +26,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@retval EFI_NOT_STARTED The driver is in stopped state.
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
@retval Others Other errors as indicated.
-
+
**/
EFI_STATUS
HttpBootDhcp (
@@ -42,7 +42,7 @@ HttpBootDhcp (
@retval EFI_NOT_STARTED The driver is already in stopped state.
@retval EFI_INVALID_PARAMETER Private is NULL.
@retval Others Unexpected error when stop the function.
-
+
**/
EFI_STATUS
HttpBootStop (
diff --git a/NetworkPkg/HttpBootDxe/HttpBootSupport.c b/NetworkPkg/HttpBootDxe/HttpBootSupport.c
index d508e2c1a9..b5974a5148 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootSupport.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootSupport.c
@@ -1,14 +1,14 @@
/** @file
Support functions implementation for UEFI HTTP boot driver.
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2018, 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.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -162,27 +162,27 @@ HttpBootPrintErrorMessage (
switch (StatusCode) {
case HTTP_STATUS_300_MULTIPLE_CHOICES:
AsciiPrint ("\n Redirection: 300 Multiple Choices");
- break;
-
+ break;
+
case HTTP_STATUS_301_MOVED_PERMANENTLY:
AsciiPrint ("\n Redirection: 301 Moved Permanently");
- break;
-
+ break;
+
case HTTP_STATUS_302_FOUND:
AsciiPrint ("\n Redirection: 302 Found");
- break;
-
+ break;
+
case HTTP_STATUS_303_SEE_OTHER:
AsciiPrint ("\n Redirection: 303 See Other");
- break;
+ break;
case HTTP_STATUS_304_NOT_MODIFIED:
AsciiPrint ("\n Redirection: 304 Not Modified");
- break;
+ break;
case HTTP_STATUS_305_USE_PROXY:
AsciiPrint ("\n Redirection: 305 Use Proxy");
- break;
+ break;
case HTTP_STATUS_307_TEMPORARY_REDIRECT:
AsciiPrint ("\n Redirection: 307 Temporary Redirect");
@@ -190,16 +190,16 @@ HttpBootPrintErrorMessage (
case HTTP_STATUS_308_PERMANENT_REDIRECT:
AsciiPrint ("\n Redirection: 308 Permanent Redirect");
- break;
+ break;
case HTTP_STATUS_400_BAD_REQUEST:
AsciiPrint ("\n Client Error: 400 Bad Request");
break;
-
+
case HTTP_STATUS_401_UNAUTHORIZED:
AsciiPrint ("\n Client Error: 401 Unauthorized");
break;
-
+
case HTTP_STATUS_402_PAYMENT_REQUIRED:
AsciiPrint ("\n Client Error: 402 Payment Required");
break;
@@ -289,7 +289,7 @@ HttpBootPrintErrorMessage (
break;
default: ;
-
+
}
}
@@ -319,13 +319,13 @@ HttpBootCommonNotify (
@retval EFI_SUCCESS Operation succeeded.
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
- @retval Others Other errors as indicated.
+ @retval Others Other errors as indicated.
**/
EFI_STATUS
HttpBootDns (
IN HTTP_BOOT_PRIVATE_DATA *Private,
IN CHAR16 *HostName,
- OUT EFI_IPv6_ADDRESS *IpAddress
+ OUT EFI_IPv6_ADDRESS *IpAddress
)
{
EFI_STATUS Status;
@@ -337,14 +337,14 @@ HttpBootDns (
EFI_IPv6_ADDRESS *DnsServerList;
UINTN DnsServerListCount;
UINTN DataSize;
- BOOLEAN IsDone;
-
+ BOOLEAN IsDone;
+
DnsServerList = NULL;
DnsServerListCount = 0;
Dns6 = NULL;
Dns6Handle = NULL;
ZeroMem (&Token, sizeof (EFI_DNS6_COMPLETION_TOKEN));
-
+
//
// Get DNS server list from EFI IPv6 Configuration protocol.
//
@@ -359,7 +359,7 @@ HttpBootDns (
DnsServerList = AllocatePool (DataSize);
if (DnsServerList == NULL) {
return EFI_OUT_OF_RESOURCES;
- }
+ }
Status = Ip6Config->GetData (Ip6Config, Ip6ConfigDataTypeDnsServer, &DataSize, DnsServerList);
if (EFI_ERROR (Status)) {
@@ -381,8 +381,8 @@ HttpBootDns (
);
if (EFI_ERROR (Status)) {
goto Exit;
- }
-
+ }
+
Status = gBS->OpenProtocol (
Dns6Handle,
&gEfiDns6ProtocolGuid,
@@ -411,7 +411,7 @@ HttpBootDns (
if (EFI_ERROR (Status)) {
goto Exit;
}
-
+
Token.Status = EFI_NOT_READY;
IsDone = FALSE;
//
@@ -439,11 +439,11 @@ HttpBootDns (
while (!IsDone) {
Dns6->Poll (Dns6);
}
-
+
//
// Name resolution is done, check result.
//
- Status = Token.Status;
+ Status = Token.Status;
if (!EFI_ERROR (Status)) {
if (Token.RspData.H2AData == NULL) {
Status = EFI_DEVICE_ERROR;
@@ -473,7 +473,7 @@ Exit:
if (Dns6 != NULL) {
Dns6->Configure (Dns6, NULL);
-
+
gBS->CloseProtocol (
Dns6Handle,
&gEfiDns6ProtocolGuid,
@@ -494,8 +494,8 @@ Exit:
if (DnsServerList != NULL) {
FreePool (DnsServerList);
}
-
- return Status;
+
+ return Status;
}
/**
Create a HTTP_IO_HEADER to hold the HTTP header items.
@@ -503,7 +503,7 @@ Exit:
@param[in] MaxHeaderCount The maximun number of HTTP header in this holder.
@return A pointer of the HTTP header holder or NULL if failed.
-
+
**/
HTTP_IO_HEADER *
HttpBootCreateHeader (
@@ -528,7 +528,7 @@ HttpBootCreateHeader (
}
/**
- Destroy the HTTP_IO_HEADER and release the resouces.
+ Destroy the HTTP_IO_HEADER and release the resouces.
@param[in] HttpIoHeader Point to the HTTP header holder to be destroyed.
@@ -539,7 +539,7 @@ HttpBootFreeHeader (
)
{
UINTN Index;
-
+
if (HttpIoHeader != NULL) {
if (HttpIoHeader->HeaderCount != 0) {
for (Index = 0; Index < HttpIoHeader->HeaderCount; Index++) {
@@ -562,7 +562,7 @@ HttpBootFreeHeader (
@retval EFI_INVALID_PARAMETER Any input parameter is invalid.
@retval EFI_OUT_OF_RESOURCES Insufficient resource to complete the operation.
@retval Other Unexpected error happened.
-
+
**/
EFI_STATUS
HttpBootSetHeader (
@@ -574,7 +574,7 @@ HttpBootSetHeader (
EFI_HTTP_HEADER *Header;
UINTN StrSize;
CHAR8 *NewFieldValue;
-
+
if (HttpIoHeader == NULL || FieldName == NULL || FieldValue == NULL) {
return EFI_INVALID_PARAMETER;
}
@@ -618,7 +618,7 @@ HttpBootSetHeader (
}
CopyMem (NewFieldValue, FieldValue, StrSize);
NewFieldValue[StrSize -1] = '\0';
-
+
if (Header->FieldValue != NULL) {
FreePool (Header->FieldValue);
}
@@ -675,7 +675,7 @@ HttpIoNotify (
HTTP_IO_CALLBACK_EVENT happened.
@param[in] Context The Context data which will be passed to the Callback function.
@param[out] HttpIo The HTTP_IO.
-
+
@retval EFI_SUCCESS The HTTP_IO is created and configured.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_UNSUPPORTED One or more of the control options are not
@@ -701,7 +701,7 @@ HttpIoCreateIo (
EFI_HTTPv6_ACCESS_POINT Http6AccessPoint;
EFI_HTTP_PROTOCOL *Http;
EFI_EVENT Event;
-
+
if ((Image == NULL) || (Controller == NULL) || (ConfigData == NULL) || (HttpIo == NULL)) {
return EFI_INVALID_PARAMETER;
}
@@ -711,10 +711,10 @@ HttpIoCreateIo (
}
ZeroMem (HttpIo, sizeof (HTTP_IO));
-
+
//
// Create the HTTP child instance and get the HTTP protocol.
- //
+ //
Status = NetLibCreateServiceChild (
Controller,
Image,
@@ -752,19 +752,19 @@ HttpIoCreateIo (
HttpConfigData.TimeOutMillisec = ConfigData->Config4.RequestTimeOut;
if (HttpIo->IpVersion == IP_VERSION_4) {
HttpConfigData.LocalAddressIsIPv6 = FALSE;
-
+
Http4AccessPoint.UseDefaultAddress = ConfigData->Config4.UseDefaultAddress;
Http4AccessPoint.LocalPort = ConfigData->Config4.LocalPort;
IP4_COPY_ADDRESS (&Http4AccessPoint.LocalAddress, &ConfigData->Config4.LocalIp);
IP4_COPY_ADDRESS (&Http4AccessPoint.LocalSubnet, &ConfigData->Config4.SubnetMask);
- HttpConfigData.AccessPoint.IPv4Node = &Http4AccessPoint;
+ HttpConfigData.AccessPoint.IPv4Node = &Http4AccessPoint;
} else {
HttpConfigData.LocalAddressIsIPv6 = TRUE;
Http6AccessPoint.LocalPort = ConfigData->Config6.LocalPort;
IP6_COPY_ADDRESS (&Http6AccessPoint.LocalAddress, &ConfigData->Config6.LocalIp);
HttpConfigData.AccessPoint.IPv6Node = &Http6AccessPoint;
}
-
+
Status = Http->Configure (Http, &HttpConfigData);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
@@ -815,7 +815,7 @@ HttpIoCreateIo (
HttpIo->TimeoutEvent = Event;
return EFI_SUCCESS;
-
+
ON_ERROR:
HttpIoDestroyIo (HttpIo);
@@ -823,7 +823,7 @@ ON_ERROR:
}
/**
- Destroy the HTTP_IO and release the resouces.
+ Destroy the HTTP_IO and release the resouces.
@param[in] HttpIo The HTTP_IO which wraps the HTTP service to be destroyed.
@@ -854,7 +854,7 @@ HttpIoDestroyIo (
if (Event != NULL) {
gBS->CloseEvent (Event);
}
-
+
Http = HttpIo->Http;
if (Http != NULL) {
Http->Configure (Http, NULL);
@@ -876,14 +876,14 @@ HttpIoDestroyIo (
/**
Synchronously send a HTTP REQUEST message to the server.
-
+
@param[in] HttpIo The HttpIo wrapping the HTTP service.
@param[in] Request A pointer to storage such data as URL and HTTP method.
- @param[in] HeaderCount Number of HTTP header structures in Headers list.
+ @param[in] HeaderCount Number of HTTP header structures in Headers list.
@param[in] Headers Array containing list of HTTP headers.
@param[in] BodyLength Length in bytes of the HTTP body.
- @param[in] Body Body associated with the HTTP request.
-
+ @param[in] Body Body associated with the HTTP request.
+
@retval EFI_SUCCESS The HTTP request is trasmitted.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@@ -951,12 +951,12 @@ HttpIoSendRequest (
/**
Synchronously receive a HTTP RESPONSE message from the server.
-
+
@param[in] HttpIo The HttpIo wrapping the HTTP service.
@param[in] RecvMsgHeader TRUE to receive a new HTTP response (from message header).
FALSE to continue receive the previous response message.
@param[out] ResponseData Point to a wrapper of the received response data.
-
+
@retval EFI_SUCCESS The HTTP response is received.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@@ -1006,7 +1006,7 @@ HttpIoRecvResponse (
Http,
&HttpIo->RspToken
);
-
+
if (EFI_ERROR (Status)) {
gBS->SetTimer (HttpIo->TimeoutEvent, TimerCancel, 0);
return Status;
@@ -1026,15 +1026,15 @@ HttpIoRecvResponse (
// Timeout occurs, cancel the response token.
//
Http->Cancel (Http, &HttpIo->RspToken);
-
+
Status = EFI_TIMEOUT;
-
+
return Status;
} else {
HttpIo->IsRxDone = FALSE;
}
- if ((HttpIo->Callback != NULL) &&
+ if ((HttpIo->Callback != NULL) &&
(HttpIo->RspToken.Status == EFI_SUCCESS || HttpIo->RspToken.Status == EFI_HTTP_ERROR)) {
Status = HttpIo->Callback (
HttpIoResponse,
@@ -1061,7 +1061,7 @@ HttpIoRecvResponse (
This function checks the HTTP(S) URI scheme.
@param[in] Uri The pointer to the URI string.
-
+
@retval EFI_SUCCESS The URI scheme is valid.
@retval EFI_INVALID_PARAMETER The URI scheme is not HTTP or HTTPS.
@retval EFI_ACCESS_DENIED HTTP is disabled and the URI is HTTP.
@@ -1096,7 +1096,7 @@ HttpBootCheckUriScheme (
DEBUG ((EFI_D_ERROR, "HttpBootCheckUriScheme: Invalid Uri.\n"));
return EFI_INVALID_PARAMETER;
}
-
+
//
// HTTP is disabled, return EFI_ACCESS_DENIED if the URI is HTTP.
//
@@ -1112,10 +1112,10 @@ HttpBootCheckUriScheme (
Get the URI address string from the input device path.
Caller need to free the buffer in the UriAddress pointer.
-
+
@param[in] FilePath Pointer to the device path which contains a URI device path node.
@param[out] UriAddress The URI address string extract from the device path.
-
+
@retval EFI_SUCCESS The URI string is returned.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@@ -1176,11 +1176,11 @@ HttpBootParseFilePath (
and also the image's URI info.
@param[in] Uri The pointer to the image's URI string.
- @param[in] UriParser URI Parse result returned by NetHttpParseUrl().
- @param[in] HeaderCount Number of HTTP header structures in Headers list.
+ @param[in] UriParser URI Parse result returned by NetHttpParseUrl().
+ @param[in] HeaderCount Number of HTTP header structures in Headers list.
@param[in] Headers Array containing list of HTTP headers.
@param[out] ImageType The image type of the downloaded file.
-
+
@retval EFI_SUCCESS The image type is returned in ImageType.
@retval EFI_INVALID_PARAMETER ImageType, Uri or UriParser is NULL.
@retval EFI_INVALID_PARAMETER HeaderCount is not zero, and Headers is NULL.
@@ -1263,7 +1263,7 @@ HttpBootCheckImageType (
/**
This function register the RAM disk info to the system.
-
+
@param[in] Private The pointer to the driver's private data.
@param[in] BufferSize The size of Buffer in bytes.
@param[in] Buffer The base address of the RAM disk.
@@ -1287,7 +1287,7 @@ HttpBootRegisterRamDisk (
EFI_STATUS Status;
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
EFI_GUID *RamDiskType;
-
+
ASSERT (Private != NULL);
ASSERT (Buffer != NULL);
ASSERT (BufferSize != 0);
@@ -1305,7 +1305,7 @@ HttpBootRegisterRamDisk (
} else {
return EFI_UNSUPPORTED;
}
-
+
Status = RamDisk->Register (
(UINTN)Buffer,
(UINT64)BufferSize,
@@ -1322,7 +1322,7 @@ HttpBootRegisterRamDisk (
/**
Indicate if the HTTP status code indicates a redirection.
-
+
@param[in] StatusCode HTTP status code from server.
@return TRUE if it's redirection.
diff --git a/NetworkPkg/HttpBootDxe/HttpBootSupport.h b/NetworkPkg/HttpBootDxe/HttpBootSupport.h
index 9b7acd9e1b..72a2f1f25a 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootSupport.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootSupport.h
@@ -1,13 +1,13 @@
/** @file
Support functions declaration for UEFI HTTP boot driver.
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<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.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<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.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -107,7 +107,7 @@ typedef struct {
@param[in] MaxHeaderCount The maximun number of HTTP header in this holder.
@return A pointer of the HTTP header holder or NULL if failed.
-
+
**/
HTTP_IO_HEADER *
HttpBootCreateHeader (
@@ -115,7 +115,7 @@ HttpBootCreateHeader (
);
/**
- Destroy the HTTP_IO_HEADER and release the resouces.
+ Destroy the HTTP_IO_HEADER and release the resouces.
@param[in] HttpIoHeader Point to the HTTP header holder to be destroyed.
@@ -129,14 +129,14 @@ HttpBootFreeHeader (
Set or update a HTTP header with the field name and corresponding value.
@param[in] HttpIoHeader Point to the HTTP header holder.
- @param[in] FieldName Null terminated string which describes a field name.
+ @param[in] FieldName Null terminated string which describes a field name.
@param[in] FieldValue Null terminated string which describes the corresponding field value.
@retval EFI_SUCCESS The HTTP header has been set or updated.
@retval EFI_INVALID_PARAMETER Any input parameter is invalid.
@retval EFI_OUT_OF_RESOURCES Insufficient resource to complete the operation.
@retval Other Unexpected error happened.
-
+
**/
EFI_STATUS
HttpBootSetHeader (
@@ -159,7 +159,7 @@ typedef enum {
@param[in] EventType Indicate the Event type that occurs in the current callback.
@param[in] Message HTTP message which will be send to, or just received from HTTP server.
@param[in] Context The Callback Context pointer.
-
+
@retval EFI_SUCCESS Tells the HttpIo to continue the HTTP process.
@retval Others Tells the HttpIo to abort the current HTTP process.
**/
@@ -212,7 +212,7 @@ typedef struct {
EFI_HANDLE Image;
EFI_HANDLE Controller;
EFI_HANDLE Handle;
-
+
EFI_HTTP_PROTOCOL *Http;
HTTP_IO_CALLBACK Callback;
@@ -250,13 +250,13 @@ typedef struct {
@retval EFI_SUCCESS Operation succeeded.
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
- @retval Others Other errors as indicated.
+ @retval Others Other errors as indicated.
**/
EFI_STATUS
HttpBootDns (
IN HTTP_BOOT_PRIVATE_DATA *Private,
IN CHAR16 *HostName,
- OUT EFI_IPv6_ADDRESS *IpAddress
+ OUT EFI_IPv6_ADDRESS *IpAddress
);
/**
@@ -285,7 +285,7 @@ HttpBootCommonNotify (
HTTP_IO_CALLBACK_EVENT happened.
@param[in] Context The Context data which will be passed to the Callback function.
@param[out] HttpIo The HTTP_IO.
-
+
@retval EFI_SUCCESS The HTTP_IO is created and configured.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_UNSUPPORTED One or more of the control options are not
@@ -306,7 +306,7 @@ HttpIoCreateIo (
);
/**
- Destroy the HTTP_IO and release the resouces.
+ Destroy the HTTP_IO and release the resouces.
@param[in] HttpIo The HTTP_IO which wraps the HTTP service to be destroyed.
@@ -318,14 +318,14 @@ HttpIoDestroyIo (
/**
Synchronously send a HTTP REQUEST message to the server.
-
+
@param[in] HttpIo The HttpIo wrapping the HTTP service.
@param[in] Request A pointer to storage such data as URL and HTTP method.
- @param[in] HeaderCount Number of HTTP header structures in Headers list.
+ @param[in] HeaderCount Number of HTTP header structures in Headers list.
@param[in] Headers Array containing list of HTTP headers.
@param[in] BodyLength Length in bytes of the HTTP body.
- @param[in] Body Body associated with the HTTP request.
-
+ @param[in] Body Body associated with the HTTP request.
+
@retval EFI_SUCCESS The HTTP request is trasmitted.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@@ -345,12 +345,12 @@ HttpIoSendRequest (
/**
Synchronously receive a HTTP RESPONSE message from the server.
-
+
@param[in] HttpIo The HttpIo wrapping the HTTP service.
@param[in] RecvMsgHeader TRUE to receive a new HTTP response (from message header).
FALSE to continue receive the previous response message.
@param[out] ResponseData Point to a wrapper of the received response data.
-
+
@retval EFI_SUCCESS The HTTP response is received.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@@ -369,7 +369,7 @@ HttpIoRecvResponse (
This function checks the HTTP(S) URI scheme.
@param[in] Uri The pointer to the URI string.
-
+
@retval EFI_SUCCESS The URI scheme is valid.
@retval EFI_INVALID_PARAMETER The URI scheme is not HTTP or HTTPS.
@retval EFI_ACCESS_DENIED HTTP is disabled and the URI is HTTP.
@@ -384,10 +384,10 @@ HttpBootCheckUriScheme (
Get the URI address string from the input device path.
Caller need to free the buffer in the UriAddress pointer.
-
+
@param[in] FilePath Pointer to the device path which contains a URI device path node.
@param[out] UriAddress The URI address string extract from the device path.
-
+
@retval EFI_SUCCESS The URI string is returned.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@@ -403,11 +403,11 @@ HttpBootParseFilePath (
and also the image's URI info.
@param[in] Uri The pointer to the image's URI string.
- @param[in] UriParser URI Parse result returned by NetHttpParseUrl().
- @param[in] HeaderCount Number of HTTP header structures in Headers list.
+ @param[in] UriParser URI Parse result returned by NetHttpParseUrl().
+ @param[in] HeaderCount Number of HTTP header structures in Headers list.
@param[in] Headers Array containing list of HTTP headers.
@param[out] ImageType The image type of the downloaded file.
-
+
@retval EFI_SUCCESS The image type is returned in ImageType.
@retval EFI_INVALID_PARAMETER ImageType, Uri or UriParser is NULL.
@retval EFI_INVALID_PARAMETER HeaderCount is not zero, and Headers is NULL.
@@ -426,7 +426,7 @@ HttpBootCheckImageType (
/**
This function register the RAM disk info to the system.
-
+
@param[in] Private The pointer to the driver's private data.
@param[in] BufferSize The size of Buffer in bytes.
@param[in] Buffer The base address of the RAM disk.
@@ -448,7 +448,7 @@ HttpBootRegisterRamDisk (
/**
Indicate if the HTTP status code indicates a redirection.
-
+
@param[in] StatusCode HTTP status code from server.
@return TRUE if it's redirection.