render / rpms / edk2

Forked from rpms/edk2 3 months ago
Clone

Blame 0054-ArmVirtPkg-ArmVirtQemu-enable-the-IPv6-stack.patch

Paolo Bonzini 720bc3
From ae08ea246fe9b4a4e05b7ee6cdbd5b0fa38f3f69 Mon Sep 17 00:00:00 2001
Paolo Bonzini 720bc3
From: Laszlo Ersek <lersek@redhat.com>
Paolo Bonzini 720bc3
Date: Fri, 13 Jul 2018 01:41:12 +0200
Paolo Bonzini 720bc3
Subject: [PATCH 2/2] ArmVirtPkg/ArmVirtQemu: enable the IPv6 stack
Paolo Bonzini 720bc3
Paolo Bonzini 720bc3
Add the IPv6 stack to ArmVirtQemu with a cumulative port of the following
Paolo Bonzini 720bc3
OvmfPkg commits:
Paolo Bonzini 720bc3
Paolo Bonzini 720bc3
* 36c6413f76e5 "OvmfPkg: enable the IPv6 support", 2014-12-19
Paolo Bonzini 720bc3
Paolo Bonzini 720bc3
* 96302b80d90e "OvmfPkg: Enable Network2 Shell Commands for IPv6",
Paolo Bonzini 720bc3
               2016-03-08
Paolo Bonzini 720bc3
Paolo Bonzini 720bc3
* 6d0f8941bdc2 "OvmfPkg: always resolve OpenSslLib, IntrinsicLib and
Paolo Bonzini 720bc3
               BaseCryptLib", 2017-01-17
Paolo Bonzini 720bc3
Paolo Bonzini 720bc3
* 32e22f20c985 "OvmfPkg: correct the IScsiDxe module included for the IPv6
Paolo Bonzini 720bc3
               stack", 2017-01-17
Paolo Bonzini 720bc3
Paolo Bonzini 720bc3
The IPv6-enabled IScsiDxe driver depends on BaseCryptLib, and the
Paolo Bonzini 720bc3
"CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf" instance depends on
Paolo Bonzini 720bc3
IntrinsicLib and OpensslLib. This is why commit 6d0f8941bdc2 is relevant.
Paolo Bonzini 720bc3
Paolo Bonzini 720bc3
However, unlike in OvmfPkg, in ArmVirtPkg we'll precisely track the
Paolo Bonzini 720bc3
firmware features that require these library classes. (The OvmfPkg
Paolo Bonzini 720bc3
discussion was quite complex, and the OvmfPkg solution was a compromise:
Paolo Bonzini 720bc3
<http://mid.mail-archive.com/1484569332-13440-1-git-send-email-jiaxin.wu@intel.com>.)
Paolo Bonzini 720bc3
Paolo Bonzini 720bc3
The ArmVirtXen platform is not extended with the relevant drivers because
Paolo Bonzini 720bc3
currently it doesn't include any networking support.
Paolo Bonzini 720bc3
Paolo Bonzini 720bc3
Cc: Julien Grall <julien.grall@linaro.org>
Paolo Bonzini 720bc3
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1007
Paolo Bonzini 720bc3
Contributed-under: TianoCore Contribution Agreement 1.1
Paolo Bonzini 720bc3
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Paolo Bonzini 720bc3
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Paolo Bonzini 720bc3
---
Paolo Bonzini 720bc3
 ArmVirtPkg/ArmVirt.dsc.inc           | 18 +++++++++++++++---
Paolo Bonzini 720bc3
 ArmVirtPkg/ArmVirtQemu.dsc           | 13 ++++++++++++-
Paolo Bonzini 720bc3
 ArmVirtPkg/ArmVirtQemuKernel.dsc     | 13 ++++++++++++-
Paolo Bonzini 720bc3
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 12 +++++++++++-
Paolo Bonzini 720bc3
 4 files changed, 50 insertions(+), 6 deletions(-)
Paolo Bonzini 720bc3
Paolo Bonzini 720bc3
diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
Paolo Bonzini 720bc3
index 76c400a5de..8bb54c5e65 100644
Paolo Bonzini 720bc3
--- a/ArmVirtPkg/ArmVirt.dsc.inc
Paolo Bonzini 720bc3
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
Paolo Bonzini 720bc3
@@ -80,6 +80,9 @@ [LibraryClasses.common]
Paolo Bonzini 720bc3
   DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
Paolo Bonzini 720bc3
   UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
Paolo Bonzini 720bc3
   IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
Paolo Bonzini 720bc3
+!if $(NETWORK_IP6_ENABLE) == TRUE
Paolo Bonzini 720bc3
+  TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
Paolo Bonzini 720bc3
+!endif
Paolo Bonzini 720bc3
 !if $(HTTP_BOOT_ENABLE) == TRUE
Paolo Bonzini 720bc3
   HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
Paolo Bonzini 720bc3
 !endif
Paolo Bonzini 720bc3
@@ -144,14 +147,20 @@ [LibraryClasses.common]
Paolo Bonzini 720bc3
   XenIoMmioLib|OvmfPkg/Library/XenIoMmioLib/XenIoMmioLib.inf
Paolo Bonzini 720bc3
 
Paolo Bonzini 720bc3
   #
Paolo Bonzini 720bc3
-  # Secure Boot dependencies
Paolo Bonzini 720bc3
+  # CryptoPkg libraries needed by multiple firmware features
Paolo Bonzini 720bc3
   #
Paolo Bonzini 720bc3
-!if $(SECURE_BOOT_ENABLE) == TRUE
Paolo Bonzini 720bc3
+!if ($(SECURE_BOOT_ENABLE) == TRUE) || ($(NETWORK_IP6_ENABLE) == TRUE)
Paolo Bonzini 720bc3
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
Paolo Bonzini 720bc3
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
Paolo Bonzini 720bc3
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
Paolo Bonzini 720bc3
+!endif
Paolo Bonzini 720bc3
+
Paolo Bonzini 720bc3
+  #
Paolo Bonzini 720bc3
+  # Secure Boot dependencies
Paolo Bonzini 720bc3
+  #
Paolo Bonzini 720bc3
+!if $(SECURE_BOOT_ENABLE) == TRUE
Paolo Bonzini 720bc3
   TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf
Paolo Bonzini 720bc3
   AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf
Paolo Bonzini 720bc3
-  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
Paolo Bonzini 720bc3
 
Paolo Bonzini 720bc3
   # re-use the UserPhysicalPresent() dummy implementation from the ovmf tree
Paolo Bonzini 720bc3
   PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf
Paolo Bonzini 720bc3
@@ -406,6 +415,9 @@ [Components.common]
Paolo Bonzini 720bc3
       NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
Paolo Bonzini 720bc3
       NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
Paolo Bonzini 720bc3
       NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
Paolo Bonzini 720bc3
+!if $(NETWORK_IP6_ENABLE) == TRUE
Paolo Bonzini 720bc3
+      NULL|ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.inf
Paolo Bonzini 720bc3
+!endif
Paolo Bonzini 720bc3
       HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
Paolo Bonzini 720bc3
       PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
Paolo Bonzini 720bc3
       BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
Paolo Bonzini 720bc3
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
Paolo Bonzini 720bc3
index 742df36285..885c6b14b8 100644
Paolo Bonzini 720bc3
--- a/ArmVirtPkg/ArmVirtQemu.dsc
Paolo Bonzini 720bc3
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
Paolo Bonzini 720bc3
@@ -34,6 +34,7 @@ [Defines]
Paolo Bonzini 720bc3
   # -D FLAG=VALUE
Paolo Bonzini 720bc3
   #
Paolo Bonzini 720bc3
   DEFINE SECURE_BOOT_ENABLE      = FALSE
Paolo Bonzini 720bc3
+  DEFINE NETWORK_IP6_ENABLE      = FALSE
Paolo Bonzini 720bc3
   DEFINE HTTP_BOOT_ENABLE        = FALSE
Paolo Bonzini 720bc3
 
Paolo Bonzini 720bc3
 !include ArmVirtPkg/ArmVirt.dsc.inc
Paolo Bonzini 720bc3
@@ -344,10 +345,20 @@ [Components.common]
Paolo Bonzini 720bc3
   MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
Paolo Bonzini 720bc3
   MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
Paolo Bonzini 720bc3
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
Paolo Bonzini 720bc3
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
Paolo Bonzini 720bc3
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
Paolo Bonzini 720bc3
+!if $(NETWORK_IP6_ENABLE) == TRUE
Paolo Bonzini 720bc3
+  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
Paolo Bonzini 720bc3
+  NetworkPkg/TcpDxe/TcpDxe.inf
Paolo Bonzini 720bc3
+  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
Paolo Bonzini 720bc3
+  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
Paolo Bonzini 720bc3
+  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
Paolo Bonzini 720bc3
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
Paolo Bonzini 720bc3
+  NetworkPkg/IScsiDxe/IScsiDxe.inf
Paolo Bonzini 720bc3
+!else
Paolo Bonzini 720bc3
+  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
Paolo Bonzini 720bc3
   MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
Paolo Bonzini 720bc3
   MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
Paolo Bonzini 720bc3
+!endif
Paolo Bonzini 720bc3
 !if $(HTTP_BOOT_ENABLE) == TRUE
Paolo Bonzini 720bc3
   NetworkPkg/DnsDxe/DnsDxe.inf
Paolo Bonzini 720bc3
   NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
Paolo Bonzini 720bc3
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
Paolo Bonzini 720bc3
index 4ae61ec635..434d6861a5 100644
Paolo Bonzini 720bc3
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
Paolo Bonzini 720bc3
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
Paolo Bonzini 720bc3
@@ -34,6 +34,7 @@ [Defines]
Paolo Bonzini 720bc3
   # -D FLAG=VALUE
Paolo Bonzini 720bc3
   #
Paolo Bonzini 720bc3
   DEFINE SECURE_BOOT_ENABLE      = FALSE
Paolo Bonzini 720bc3
+  DEFINE NETWORK_IP6_ENABLE      = FALSE
Paolo Bonzini 720bc3
   DEFINE HTTP_BOOT_ENABLE        = FALSE
Paolo Bonzini 720bc3
 
Paolo Bonzini 720bc3
 !include ArmVirtPkg/ArmVirt.dsc.inc
Paolo Bonzini 720bc3
@@ -333,10 +334,20 @@ [Components.common]
Paolo Bonzini 720bc3
   MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
Paolo Bonzini 720bc3
   MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
Paolo Bonzini 720bc3
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
Paolo Bonzini 720bc3
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
Paolo Bonzini 720bc3
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
Paolo Bonzini 720bc3
+!if $(NETWORK_IP6_ENABLE) == TRUE
Paolo Bonzini 720bc3
+  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
Paolo Bonzini 720bc3
+  NetworkPkg/TcpDxe/TcpDxe.inf
Paolo Bonzini 720bc3
+  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
Paolo Bonzini 720bc3
+  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
Paolo Bonzini 720bc3
+  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
Paolo Bonzini 720bc3
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
Paolo Bonzini 720bc3
+  NetworkPkg/IScsiDxe/IScsiDxe.inf
Paolo Bonzini 720bc3
+!else
Paolo Bonzini 720bc3
+  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
Paolo Bonzini 720bc3
   MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
Paolo Bonzini 720bc3
   MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
Paolo Bonzini 720bc3
+!endif
Paolo Bonzini 720bc3
 !if $(HTTP_BOOT_ENABLE) == TRUE
Paolo Bonzini 720bc3
   NetworkPkg/DnsDxe/DnsDxe.inf
Paolo Bonzini 720bc3
   NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
Paolo Bonzini 720bc3
diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
Paolo Bonzini 720bc3
index 63a202c788..a6390bd4b8 100644
Paolo Bonzini 720bc3
--- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
Paolo Bonzini 720bc3
+++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
Paolo Bonzini 720bc3
@@ -125,10 +125,20 @@ [FV.FvMain]
Paolo Bonzini 720bc3
   INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
Paolo Bonzini 720bc3
   INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
Paolo Bonzini 720bc3
   INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
Paolo Bonzini 720bc3
-  INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
Paolo Bonzini 720bc3
   INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
Paolo Bonzini 720bc3
+!if $(NETWORK_IP6_ENABLE) == TRUE
Paolo Bonzini 720bc3
+  INF NetworkPkg/Ip6Dxe/Ip6Dxe.inf
Paolo Bonzini 720bc3
+  INF NetworkPkg/TcpDxe/TcpDxe.inf
Paolo Bonzini 720bc3
+  INF NetworkPkg/Udp6Dxe/Udp6Dxe.inf
Paolo Bonzini 720bc3
+  INF NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
Paolo Bonzini 720bc3
+  INF NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
Paolo Bonzini 720bc3
+  INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
Paolo Bonzini 720bc3
+  INF NetworkPkg/IScsiDxe/IScsiDxe.inf
Paolo Bonzini 720bc3
+!else
Paolo Bonzini 720bc3
+  INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
Paolo Bonzini 720bc3
   INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
Paolo Bonzini 720bc3
   INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
Paolo Bonzini 720bc3
+!endif
Paolo Bonzini 720bc3
 !if $(HTTP_BOOT_ENABLE) == TRUE
Paolo Bonzini 720bc3
   INF NetworkPkg/DnsDxe/DnsDxe.inf
Paolo Bonzini 720bc3
   INF NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
Paolo Bonzini 720bc3
-- 
Paolo Bonzini 720bc3
2.17.1
Paolo Bonzini 720bc3