diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.c b/NetworkPkg/HttpBootDxe/HttpBootDxe.c index 168d4b7c10..5b92d772a4 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootDxe.c +++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.c @@ -305,6 +305,10 @@ HttpBootIp4DxeDriverBindingSupported ( { EFI_STATUS Status; + if (PcdGetBool (PcdIPv4HttpSupport) == FALSE) { + return EFI_UNSUPPORTED; + } + // // Try to open the DHCP4, HTTP4 and Device Path protocol. // @@ -795,6 +799,10 @@ HttpBootIp6DxeDriverBindingSupported ( { EFI_STATUS Status; + if (PcdGetBool (PcdIPv6HttpSupport) == FALSE) { + return EFI_UNSUPPORTED; + } + // // Try to open the DHCP6, HTTP and Device Path protocol. // diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.inf b/NetworkPkg/HttpBootDxe/HttpBootDxe.inf index 3f87e58a14..6caa30f2d2 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootDxe.inf +++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.inf @@ -99,6 +99,8 @@ gEfiNetworkPkgTokenSpaceGuid.PcdHttpIoTimeout ## CONSUMES gEfiNetworkPkgTokenSpaceGuid.PcdMaxHttpResumeRetries ## CONSUMES gEfiNetworkPkgTokenSpaceGuid.PcdHttpDelayBetweenResumeRetries ## CONSUMES + gEfiNetworkPkgTokenSpaceGuid.PcdIPv4HttpSupport ## CONSUMES + gEfiNetworkPkgTokenSpaceGuid.PcdIPv6HttpSupport ## CONSUMES [UserExtensions.TianoCore."ExtraFiles"] HttpBootDxeExtra.uni diff --git a/NetworkPkg/NetworkDynamicPcds.dsc.inc b/NetworkPkg/NetworkDynamicPcds.dsc.inc index b26105bd66..a3e89e586d 100644 --- a/NetworkPkg/NetworkDynamicPcds.dsc.inc +++ b/NetworkPkg/NetworkDynamicPcds.dsc.inc @@ -18,3 +18,8 @@ gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01 gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01 !endif +# +# IPv4 and IPv6 HTTP Boot support. +# + gEfiNetworkPkgTokenSpaceGuid.PcdIPv4HttpSupport|TRUE + gEfiNetworkPkgTokenSpaceGuid.PcdIPv6HttpSupport|TRUE diff --git a/NetworkPkg/NetworkPkg.dec b/NetworkPkg/NetworkPkg.dec index 2158dc3f8a..6ff3848ab1 100644 --- a/NetworkPkg/NetworkPkg.dec +++ b/NetworkPkg/NetworkPkg.dec @@ -187,6 +187,12 @@ # @Prompt The value of Retry Count, Default value is 0. gEfiNetworkPkgTokenSpaceGuid.PcdHttpDnsRetryCount|0|UINT32|0x00000011 + ## IPv4 HTTP support + gEfiNetworkPkgTokenSpaceGuid.PcdIPv4HttpSupport|TRUE|BOOLEAN|0x10000012 + + ## IPv6 HTTP support + gEfiNetworkPkgTokenSpaceGuid.PcdIPv6HttpSupport|TRUE|BOOLEAN|0x10000013 + ## The default size of the HTTP transfer data buffer in bytes. # This size is used for HTTP transfers, with a default value of 2MB. # Increasing the buffer size can enhance performance for high-bandwidth connections.