2 # Copyright (c) 2011-2015, ARM Limited. All rights reserved.
3 # Copyright (c) 2014, Linaro Limited. All rights reserved.
4 # Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.
6 # SPDX-License-Identifier: BSD-2-Clause-Patent
10 ################################################################################
12 # Defines Section - statements that will be processed to create a Makefile.
14 ################################################################################
16 PLATFORM_NAME = ArmVirtQemu
17 PLATFORM_GUID = 37d7e986-f7e9-45c2-8067-e371421a626c
18 PLATFORM_VERSION = 0.1
19 DSC_SPECIFICATION = 0x00010005
20 OUTPUT_DIRECTORY = Build/ArmVirtQemuKernel-$(ARCH)
21 SUPPORTED_ARCHITECTURES = AARCH64|ARM
22 BUILD_TARGETS = DEBUG|RELEASE|NOOPT
23 SKUID_IDENTIFIER = DEFAULT
24 FLASH_DEFINITION = ArmVirtPkg/ArmVirtQemuKernel.fdf
27 # Defines for default states. These can be changed on the command line.
30 DEFINE TTY_TERMINAL = FALSE
31 DEFINE SECURE_BOOT_ENABLE = FALSE
36 DEFINE NETWORK_IP6_ENABLE = FALSE
37 DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE
38 DEFINE NETWORK_SNP_ENABLE = FALSE
39 DEFINE NETWORK_TLS_ENABLE = FALSE
40 DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
41 DEFINE NETWORK_ISCSI_ENABLE = TRUE
43 !if $(NETWORK_SNP_ENABLE) == TRUE
44 !error "NETWORK_SNP_ENABLE is IA32/X64/EBC only"
47 !include NetworkPkg/NetworkDefines.dsc.inc
49 !include ArmVirtPkg/ArmVirt.dsc.inc
51 [LibraryClasses.common]
52 ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
53 ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
56 VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
57 VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf
58 QemuFwCfgLib|ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf
59 QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/BaseQemuFwCfgS3LibNull.inf
60 QemuFwCfgSimpleParserLib|OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParserLib.inf
61 QemuLoadImageLib|OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.inf
63 ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf
65 TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
66 NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf
68 CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
69 BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
70 PlatformBootManagerLib|ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
71 PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf
72 CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
73 FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
74 QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
75 FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
76 PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
77 PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
78 PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
79 TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
81 [LibraryClasses.common.DXE_DRIVER]
82 ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
84 [LibraryClasses.common.UEFI_DRIVER]
85 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
88 !include NetworkPkg/NetworkBuildOptions.dsc.inc
91 # We need to avoid jump tables in SEC modules, so that the PE/COFF
92 # self-relocation code itself is guaranteed to be position independent.
94 GCC:*_*_*_CC_FLAGS = -fno-jump-tables
96 ################################################################################
98 # Pcd Section - list of all EDK II PCD Entries defined by this Platform
100 ################################################################################
102 [PcdsFeatureFlag.common]
103 gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE
104 gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|TRUE
106 ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.
107 # It could be set FALSE to save size.
108 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
109 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
111 gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
113 [PcdsFixedAtBuild.common]
114 !if $(ARCH) == AARCH64
115 gArmTokenSpaceGuid.PcdVFPEnabled|1
118 gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
119 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
120 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
121 !if $(NETWORK_TLS_ENABLE) == TRUE
123 # The cumulative and individual VOLATILE variable size limits should be set
124 # high enough for accommodating several and/or large CA certificates.
126 gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x80000
127 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize|0x40000
130 # Size of the region used by UEFI in permanent memory (Reserved 64MB)
131 gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
137 ## PL011 - Serial Terminal
138 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|38400
140 ## Default Terminal Type
141 ## 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
142 !if $(TTY_TERMINAL) == TRUE
143 gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
144 # Set terminal type to TtyTerm, the value encoded is EFI_TTY_TERM_GUID
145 gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x80, 0x6d, 0x91, 0x7d, 0xb1, 0x5b, 0x8c, 0x45, 0xa4, 0x8f, 0xe2, 0x5f, 0xdd, 0x51, 0xef, 0x94}
147 gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|1
151 # ARM Virtual Architectural Timer -- fetch frequency from QEMU (TCG) or KVM
153 gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0
158 !include NetworkPkg/NetworkPcds.dsc.inc
160 gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
161 gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
164 # The maximum physical I/O addressability of the processor, set with
167 gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16
169 !if $(SECURE_BOOT_ENABLE) == TRUE
170 # override the default values from SecurityPkg to ensure images from all sources are verified in secure boot
171 gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x04
172 gEfiSecurityPkgTokenSpaceGuid.PcdFixedMediaImageVerificationPolicy|0x04
173 gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPolicy|0x04
176 gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|3
178 [PcdsPatchableInModule.common]
179 # we need to provide a resolution for this PCD that supports PcdSet64()
180 # being called from ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c,
181 # even though that call will be compiled out on this platform as it does
182 # not (and cannot) support the TPM2 driver stack
183 gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0
186 # This will be overridden in the code
188 gArmTokenSpaceGuid.PcdSystemMemoryBase|0x0
189 gArmTokenSpaceGuid.PcdSystemMemorySize|0x0
192 # Define a default initial address for the device tree.
193 # Ignored if x0 != 0 at entry.
195 gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000
197 gArmTokenSpaceGuid.PcdFdBaseAddress|0x0
198 gArmTokenSpaceGuid.PcdFvBaseAddress|0x0
200 [PcdsDynamicDefault.common]
201 gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
203 ## If TRUE, OvmfPkg/AcpiPlatformDxe will not wait for PCI
204 # enumeration to complete before installing ACPI tables.
205 gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
207 gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|0x0
208 gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|0x0
209 gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum|0x0
210 gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum|0x0
213 # ARM General Interrupt Controller
215 gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
216 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
217 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
219 ## PL031 RealTimeClock
220 gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0
222 # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this
223 # PCD and PcdPciDisableBusEnumeration above have not been assigned yet
224 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF
226 gArmTokenSpaceGuid.PcdPciIoTranslation|0x0
229 # Set video resolution for boot options and for text setup.
230 # PlatformDxe can set the former at runtime.
232 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800
233 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600
234 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640
235 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
238 # SMBIOS entry point version
240 gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0300
241 gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
242 gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE
245 # IPv4 and IPv6 PXE Boot support.
247 gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01
248 gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01
250 ################################################################################
252 # Components Section - list of all EDK II Modules needed by this Platform
254 ################################################################################
259 ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf {
261 ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
262 LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
263 PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
264 HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
265 PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
266 MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
272 MdeModulePkg/Core/Dxe/DxeMain.inf {
274 NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
275 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
277 MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
279 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
283 # Architectural Protocols
285 ArmPkg/Drivers/CpuDxe/CpuDxe.inf
286 MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
287 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
289 NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
290 NULL|EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedLib.inf
291 # don't use unaligned CopyMem () on the UEFI varstore NOR flash region
292 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
294 !if $(SECURE_BOOT_ENABLE) == TRUE
295 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {
297 NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf
299 SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
300 OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.inf
302 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
304 MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
305 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
306 MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
307 MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
308 EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf {
310 NULL|ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf
312 EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
314 MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
315 MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
316 MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
317 MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
318 MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
320 MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
322 ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
323 ArmPkg/Drivers/TimerDxe/TimerDxe.inf {
325 NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
327 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
328 MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
331 # Status Code Routing
333 MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
338 ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
339 ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
340 ArmVirtPkg/HighMemDxe/HighMemDxe.inf
341 OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
342 OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
343 OvmfPkg/VirtioNetDxe/VirtioNet.inf
344 OvmfPkg/VirtioRngDxe/VirtioRng.inf
347 # FAT filesystem + GPT/MBR partitioning + UDF filesystem
349 MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
350 MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
351 MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
352 FatPkg/EnhancedFatDxe/Fat.inf
353 MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
358 MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
360 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
361 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
363 MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
364 MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
365 MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
366 MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
367 MdeModulePkg/Logo/LogoDxe.inf
368 MdeModulePkg/Application/UiApp/UiApp.inf {
370 NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf
371 NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
372 NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
374 OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf
379 !include NetworkPkg/NetworkComponents.dsc.inc
381 NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf {
383 NULL|OvmfPkg/Library/PxeBcPcdProducerLib/PxeBcPcdProducerLib.inf
386 !if $(NETWORK_TLS_ENABLE) == TRUE
387 NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {
389 NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf
394 # SCSI Bus and Disk Driver
396 MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
397 MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
402 MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
407 MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf {
409 NULL|OvmfPkg/Library/SmbiosVersionLib/DetectSmbiosVersionLib.inf
411 OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
416 ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf {
418 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
420 MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
421 MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {
423 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
425 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
426 OvmfPkg/Virtio10Dxe/Virtio10.inf
431 OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
432 OvmfPkg/VirtioGpuDxe/VirtioGpu.inf
433 OvmfPkg/PlatformDxe/Platform.inf
438 MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
439 MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
440 MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
441 MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
442 MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
443 MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
448 ArmVirtPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.inf
450 MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
451 OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf {
453 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf