/** @file\r
Implementation of the boot file download function.\r
\r
-Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
HTTP_IO_CONFIG_DATA ConfigData;\r
EFI_STATUS Status;\r
EFI_HANDLE ImageHandle;\r
+ UINT32 TimeoutValue;\r
\r
ASSERT (Private != NULL);\r
\r
+ //\r
+ // Get HTTP timeout value\r
+ //\r
+ TimeoutValue = PcdGet32 (PcdHttpIoTimeout);\r
+\r
ZeroMem (&ConfigData, sizeof (HTTP_IO_CONFIG_DATA));\r
if (!Private->UsingIpv6) {\r
ConfigData.Config4.HttpVersion = HttpVersion11;\r
- ConfigData.Config4.RequestTimeOut = HTTP_BOOT_REQUEST_TIMEOUT;\r
+ ConfigData.Config4.RequestTimeOut = TimeoutValue;\r
IP4_COPY_ADDRESS (&ConfigData.Config4.LocalIp, &Private->StationIp.v4);\r
IP4_COPY_ADDRESS (&ConfigData.Config4.SubnetMask, &Private->SubnetMask.v4);\r
ImageHandle = Private->Ip4Nic->ImageHandle;\r
} else {\r
ConfigData.Config6.HttpVersion = HttpVersion11;\r
- ConfigData.Config6.RequestTimeOut = HTTP_BOOT_REQUEST_TIMEOUT;\r
+ ConfigData.Config6.RequestTimeOut = TimeoutValue;\r
IP6_COPY_ADDRESS (&ConfigData.Config6.LocalIp, &Private->StationIp.v6);\r
ImageHandle = Private->Ip6Nic->ImageHandle;\r
}\r
/** @file\r
Declaration of the boot file download function.\r
\r
-Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
#ifndef __EFI_HTTP_BOOT_HTTP_H__\r
#define __EFI_HTTP_BOOT_HTTP_H__\r
\r
-#define HTTP_BOOT_REQUEST_TIMEOUT 5000 // 5 seconds in uints of millisecond.\r
-#define HTTP_BOOT_RESPONSE_TIMEOUT 5000 // 5 seconds in uints of millisecond.\r
#define HTTP_BOOT_BLOCK_SIZE 1500\r
-\r
-\r
-\r
#define HTTP_USER_AGENT_EFI_HTTP_BOOT "UefiHttpBoot/1.0"\r
\r
//\r
## @file\r
# This modules produce the Load File Protocol for UEFI HTTP boot.\r
#\r
-# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.<BR>\r
# (C) Copyright 2020 Hewlett-Packard Development Company, L.P.<BR>\r
# SPDX-License-Identifier: BSD-2-Clause-Patent\r
#\r
\r
[Pcd]\r
gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections ## CONSUMES\r
+ gEfiNetworkPkgTokenSpaceGuid.PcdHttpIoTimeout ## CONSUMES\r
\r
[UserExtensions.TianoCore."ExtraFiles"]\r
HttpBootDxeExtra.uni\r
## @file\r
# Implementation of EFI HTTP protocol interfaces.\r
#\r
-# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.<BR>\r
#\r
# SPDX-License-Identifier: BSD-2-Clause-Patent\r
#\r
\r
[Pcd]\r
gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections ## CONSUMES\r
+ gEfiNetworkPkgTokenSpaceGuid.PcdHttpIoTimeout ## CONSUMES\r
\r
[UserExtensions.TianoCore."ExtraFiles"]\r
HttpDxeExtra.uni\r
/** @file\r
Implementation of EFI_HTTP_PROTOCOL protocol interfaces.\r
\r
- Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>\r
\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
HTTP_TOKEN_WRAP *ValueInItem;\r
UINTN HdrLen;\r
NET_FRAGMENT Fragment;\r
+ UINT32 TimeoutValue;\r
\r
if (Wrap == NULL || Wrap->HttpInstance == NULL) {\r
return EFI_INVALID_PARAMETER;\r
}\r
}\r
\r
+ //\r
+ // Get HTTP timeout value\r
+ //\r
+ TimeoutValue = PcdGet32 (PcdHttpIoTimeout);\r
+\r
//\r
// Start the timer, and wait Timeout seconds to receive the header packet.\r
//\r
- Status = gBS->SetTimer (HttpInstance->TimeoutEvent, TimerRelative, HTTP_RESPONSE_TIMEOUT * TICKS_PER_SECOND);\r
+ Status = gBS->SetTimer (HttpInstance->TimeoutEvent, TimerRelative, TimeoutValue * TICKS_PER_MS);\r
if (EFI_ERROR (Status)) {\r
goto Error;\r
}\r
}\r
}\r
\r
+ //\r
+ // Get HTTP timeout value\r
+ //\r
+ TimeoutValue = PcdGet32 (PcdHttpIoTimeout);\r
+\r
//\r
// Start the timer, and wait Timeout seconds to receive the body packet.\r
//\r
- Status = gBS->SetTimer (HttpInstance->TimeoutEvent, TimerRelative, HTTP_RESPONSE_TIMEOUT * TICKS_PER_SECOND);\r
+ Status = gBS->SetTimer (HttpInstance->TimeoutEvent, TimerRelative, TimeoutValue * TICKS_PER_MS);\r
if (EFI_ERROR (Status)) {\r
goto Error2;\r
}\r
/** @file\r
The header files of miscellaneous routines for HttpDxe driver.\r
\r
-Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
#define HTTP_BUFFER_SIZE_DEAULT 65535\r
#define HTTP_MAX_SYN_BACK_LOG 5\r
#define HTTP_CONNECTION_TIMEOUT 60\r
-#define HTTP_RESPONSE_TIMEOUT 5\r
#define HTTP_DATA_RETRIES 12\r
#define HTTP_FIN_TIMEOUT 2\r
#define HTTP_KEEP_ALIVE_PROBES 6\r
# @Prompt Max size of total HTTP chunk transfer. the default value is 12MB.\r
gEfiNetworkPkgTokenSpaceGuid.PcdMaxHttpChunkTransfer|0x0C00000|UINT32|0x0000000E\r
\r
- ## The Timeout value of HTTP IO.\r
- # @Prompt The Timeout value of HTTP Io. Default value is 5000.\r
- gEfiNetworkPkgTokenSpaceGuid.PcdHttpIoTimeout|5000|UINT32|0x0000000F\r
-\r
[PcdsFixedAtBuild, PcdsPatchableInModule]\r
## Indicates whether HTTP connections (i.e., unsecured) are permitted or not.\r
# TRUE - HTTP connections are allowed. Both the "https://" and "http://" URI schemes are permitted.\r
# 0x00 = PXE Disabled\r
gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01|UINT8|0x1000000a\r
\r
+ ## The Timeout value of HTTP IO.\r
+ # @Prompt The Timeout value of HTTP Io. Default value is 5000.\r
+ gEfiNetworkPkgTokenSpaceGuid.PcdHttpIoTimeout|5000|UINT32|0x0000000F\r
+\r
[UserExtensions.TianoCore."ExtraFiles"]\r
NetworkPkgExtra.uni\r
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2f\r
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000000\r
\r
+[PcdsDynamicDefault]\r
+ gEfiNetworkPkgTokenSpaceGuid.PcdHttpIoTimeout|5000\r
+\r
###################################################################################################\r
#\r
# Components Section - list of the modules and components that will be processed by compilation\r
//\r
// This package provides network modules that conform to UEFI 2.4 specification.\r
//\r
-// Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.<BR>\r
//\r
// SPDX-License-Identifier: BSD-2-Clause-Patent\r
//\r
#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdTftpBlockSize_HELP #language en-US "This setting can override the default TFTP block size. A value of 0 computes "\r
"the default from MTU information. A non-zero value will be used as block size "\r
"in bytes."\r
+\r
+#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdHttpIoTimeout_PROMPT #language en-US "HTTP Boot Image Request and Response Timeout"\r
+\r
+#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdHttpIoTimeout_HELP #language en-US "This value is used to configure the request and response timeout when getting "\r
+ "the recovery image from the remote source during an HTTP recovery boot."\r
+ "The default value set is 5 seconds."\r