]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmVirtPkg/ArmVirtQemu.dsc
ArmVirtPkg: unshare TpmMeasurementLib resolution between platforms
[mirror_edk2.git] / ArmVirtPkg / ArmVirtQemu.dsc
index a77d71bcea36093e10fb5fd2d38184ff9de01a23..2f0aac5f1cb804bb5db6150fa2cf1a730ea49209 100644 (file)
@@ -3,13 +3,7 @@
 #  Copyright (c) 2014, Linaro Limited. All rights reserved.\r
 #  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.\r
 #\r
-#  This program and the accompanying materials\r
-#  are licensed and made available under the terms and conditions of the BSD License\r
-#  which accompanies this distribution.  The full text of the license may be found at\r
-#  http://opensource.org/licenses/bsd-license.php\r
-#\r
-#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
 #\r
 \r
   #\r
   DEFINE TTY_TERMINAL            = FALSE\r
   DEFINE SECURE_BOOT_ENABLE      = FALSE\r
-  DEFINE NETWORK_IP6_ENABLE      = FALSE\r
-  DEFINE HTTP_BOOT_ENABLE        = FALSE\r
+  DEFINE TPM2_ENABLE             = FALSE\r
+\r
+  #\r
+  # Network definition\r
+  #\r
+  DEFINE NETWORK_IP6_ENABLE              = FALSE\r
+  DEFINE NETWORK_HTTP_BOOT_ENABLE        = FALSE\r
+  DEFINE NETWORK_SNP_ENABLE              = FALSE\r
+  DEFINE NETWORK_TLS_ENABLE              = FALSE\r
+  DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS  = TRUE\r
+\r
+!if $(NETWORK_SNP_ENABLE) == TRUE\r
+  !error "NETWORK_SNP_ENABLE is IA32/X64/EBC only"\r
+!endif\r
+\r
+!include NetworkPkg/NetworkDefines.dsc.inc\r
 \r
 !include ArmVirtPkg/ArmVirt.dsc.inc\r
 \r
   PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf\r
   PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf\r
   PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf\r
+  TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf\r
+\r
+!if $(TPM2_ENABLE) == TRUE\r
+  Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf\r
+!endif\r
 \r
 [LibraryClasses.common.PEIM]\r
   ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf\r
 \r
+!if $(TPM2_ENABLE) == TRUE\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf\r
+  ResetSystemLib|MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.inf\r
+  Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf\r
+!endif\r
+\r
 [LibraryClasses.common.DXE_DRIVER]\r
   ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf\r
 \r
 \r
   gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE\r
 \r
+  gArmVirtTokenSpaceGuid.PcdTpm2SupportEnabled|$(TPM2_ENABLE)\r
+\r
 [PcdsFixedAtBuild.common]\r
 !if $(ARCH) == AARCH64\r
   gArmTokenSpaceGuid.PcdVFPEnabled|1\r
   gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800\r
+!if $(NETWORK_TLS_ENABLE) == TRUE\r
+  #\r
+  # The cumulative and individual VOLATILE variable size limits should be set\r
+  # high enough for accommodating several and/or large CA certificates.\r
+  #\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x80000\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize|0x40000\r
+!endif\r
 \r
   # Size of the region used by UEFI in permanent memory (Reserved 64MB)\r
   gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000\r
   #\r
   gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0\r
 \r
-!if $(HTTP_BOOT_ENABLE) == TRUE\r
-  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE\r
-!endif\r
+  #\r
+  # Network Pcds\r
+  #\r
+!include NetworkPkg/NetworkPcds.dsc.inc\r
 \r
   # System Memory Base -- fixed at 0x4000_0000\r
   gArmTokenSpaceGuid.PcdSystemMemoryBase|0x40000000\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0\r
   gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE\r
 \r
+  #\r
+  # TPM2 support\r
+  #\r
+  gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0\r
+!if $(TPM2_ENABLE) == TRUE\r
+  gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}\r
+  gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask|0\r
+!endif\r
+\r
 [PcdsDynamicHii]\r
   gArmVirtTokenSpaceGuid.PcdForceNoAcpi|L"ForceNoAcpi"|gArmVirtVariableGuid|0x0|FALSE|NV,BS\r
 \r
 \r
   MdeModulePkg/Universal/Variable/Pei/VariablePei.inf\r
 \r
+!if $(TPM2_ENABLE) == TRUE\r
+  MdeModulePkg/Universal/ResetSystemPei/ResetSystemPei.inf {\r
+    <LibraryClasses>\r
+      ResetSystemLib|ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.inf\r
+  }\r
+  OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf\r
+  SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf {\r
+    <LibraryClasses>\r
+      HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf\r
+      NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf\r
+      NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf\r
+      NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf\r
+      NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf\r
+      NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf\r
+  }\r
+!endif\r
+\r
   MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf {\r
     <LibraryClasses>\r
       NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf\r
       NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf\r
   }\r
   SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf\r
+  OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.inf\r
 !else\r
   MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf\r
 !endif\r
   #\r
   # Networking stack\r
   #\r
-  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf\r
-  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf\r
-  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf\r
-  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf\r
-  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf\r
-  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf\r
-  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf\r
-  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf\r
-  NetworkPkg/TcpDxe/TcpDxe.inf\r
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf\r
-  NetworkPkg/IScsiDxe/IScsiDxe.inf\r
-!if $(NETWORK_IP6_ENABLE) == TRUE\r
-  NetworkPkg/Ip6Dxe/Ip6Dxe.inf\r
-  NetworkPkg/Udp6Dxe/Udp6Dxe.inf\r
-  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf\r
-  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf\r
-!endif\r
-!if $(HTTP_BOOT_ENABLE) == TRUE\r
-  NetworkPkg/DnsDxe/DnsDxe.inf\r
-  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf\r
-  NetworkPkg/HttpDxe/HttpDxe.inf\r
-  NetworkPkg/HttpBootDxe/HttpBootDxe.inf\r
+!include NetworkPkg/NetworkComponents.dsc.inc\r
+!if $(NETWORK_TLS_ENABLE) == TRUE\r
+  NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {\r
+    <LibraryClasses>\r
+      NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf\r
+  }\r
 !endif\r
 \r
   #\r