2 # Copyright (c) 2011-2015, ARM Limited. All rights reserved.
3 # Copyright (c) 2014, Linaro Limited. All rights reserved.
4 # Copyright (c) 2015 - 2016, 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
42 !if $(NETWORK_SNP_ENABLE) == TRUE
43 !error "NETWORK_SNP_ENABLE is IA32/X64/EBC only"
46 !include NetworkPkg/NetworkDefines.dsc.inc
48 !include ArmVirtPkg/ArmVirt.dsc.inc
50 [LibraryClasses.common]
51 ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
52 ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
55 VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
56 VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf
57 QemuFwCfgLib|ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf
58 QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/BaseQemuFwCfgS3LibNull.inf
59 QemuLoadImageLib|OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.inf
61 ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf
63 TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
64 NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf
66 CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
67 BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
68 PlatformBootManagerLib|ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
69 PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf
70 CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
71 FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
72 QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
73 FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
74 PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
75 PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
76 PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
77 TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
79 [LibraryClasses.common.DXE_DRIVER]
80 ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
82 [LibraryClasses.common.UEFI_DRIVER]
83 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
85 [BuildOptions.common.EDKII.SEC, BuildOptions.common.EDKII.BASE]
87 # CLANG38 with LTO support enabled uses the GNU GOLD linker, which insists
88 # on emitting GOT based symbol references when running in shared mode, unless
89 # we override visibility to 'hidden' in all modules that make up the PrePi
92 GCC:*_CLANG38_*_CC_FLAGS = -include $(WORKSPACE)/ArmVirtPkg/Include/Platform/Hidden.h
94 ################################################################################
96 # Pcd Section - list of all EDK II PCD Entries defined by this Platform
98 ################################################################################
100 [PcdsFeatureFlag.common]
101 gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE
102 gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|TRUE
104 ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.
105 # It could be set FALSE to save size.
106 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
107 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
109 gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
111 [PcdsFixedAtBuild.common]
112 !if $(ARCH) == AARCH64
113 gArmTokenSpaceGuid.PcdVFPEnabled|1
116 gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
117 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
118 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
119 !if $(NETWORK_TLS_ENABLE) == TRUE
121 # The cumulative and individual VOLATILE variable size limits should be set
122 # high enough for accommodating several and/or large CA certificates.
124 gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x80000
125 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize|0x40000
128 # Size of the region used by UEFI in permanent memory (Reserved 64MB)
129 gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
135 ## PL011 - Serial Terminal
136 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|38400
138 ## Default Terminal Type
139 ## 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
140 !if $(TTY_TERMINAL) == TRUE
141 gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
142 # Set terminal type to TtyTerm, the value encoded is EFI_TTY_TERM_GUID
143 gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x80, 0x6d, 0x91, 0x7d, 0xb1, 0x5b, 0x8c, 0x45, 0xa4, 0x8f, 0xe2, 0x5f, 0xdd, 0x51, 0xef, 0x94}
145 gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|1
149 # ARM Virtual Architectural Timer -- fetch frequency from QEMU (TCG) or KVM
151 gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0
156 !include NetworkPkg/NetworkPcds.dsc.inc
158 gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
159 gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
162 # The maximum physical I/O addressability of the processor, set with
165 gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16
167 !if $(SECURE_BOOT_ENABLE) == TRUE
168 # override the default values from SecurityPkg to ensure images from all sources are verified in secure boot
169 gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x04
170 gEfiSecurityPkgTokenSpaceGuid.PcdFixedMediaImageVerificationPolicy|0x04
171 gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPolicy|0x04
174 gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|3
176 [PcdsPatchableInModule.common]
177 # we need to provide a resolution for this PCD that supports PcdSet64()
178 # being called from ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c,
179 # even though that call will be compiled out on this platform as it does
180 # not (and cannot) support the TPM2 driver stack
181 gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0
184 # This will be overridden in the code
186 gArmTokenSpaceGuid.PcdSystemMemoryBase|0x0
187 gArmTokenSpaceGuid.PcdSystemMemorySize|0x0
190 # Define a default initial address for the device tree.
191 # Ignored if x0 != 0 at entry.
193 gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000
195 gArmTokenSpaceGuid.PcdFdBaseAddress|0x0
196 gArmTokenSpaceGuid.PcdFvBaseAddress|0x0
198 [PcdsDynamicDefault.common]
199 gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
201 ## If TRUE, OvmfPkg/AcpiPlatformDxe will not wait for PCI
202 # enumeration to complete before installing ACPI tables.
203 gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
205 gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|0x0
206 gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|0x0
207 gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum|0x0
208 gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum|0x0
211 # ARM General Interrupt Controller
213 gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
214 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
215 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
217 ## PL031 RealTimeClock
218 gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0
220 # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this
221 # PCD and PcdPciDisableBusEnumeration above have not been assigned yet
222 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF
224 gArmTokenSpaceGuid.PcdPciIoTranslation|0x0
227 # Set video resolution for boot options and for text setup.
228 # PlatformDxe can set the former at runtime.
230 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800
231 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600
232 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640
233 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
236 # SMBIOS entry point version
238 gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0300
239 gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
240 gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE
242 ################################################################################
244 # Components Section - list of all EDK II Modules needed by this Platform
246 ################################################################################
251 ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf {
253 ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
254 LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
255 PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
256 HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
257 PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
258 MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
264 MdeModulePkg/Core/Dxe/DxeMain.inf {
266 NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
267 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
269 MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
271 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
275 # Architectural Protocols
277 ArmPkg/Drivers/CpuDxe/CpuDxe.inf
278 MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
279 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
281 NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
282 NULL|EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedLib.inf
283 # don't use unaligned CopyMem () on the UEFI varstore NOR flash region
284 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
286 !if $(SECURE_BOOT_ENABLE) == TRUE
287 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {
289 NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf
291 SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
292 OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.inf
294 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
296 MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
297 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
298 MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
299 MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
300 EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf {
302 NULL|ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf
304 EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
306 MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
307 MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
308 MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
309 MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
310 MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
312 MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
314 ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
315 ArmPkg/Drivers/TimerDxe/TimerDxe.inf {
317 NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
319 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
320 MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
323 # Status Code Routing
325 MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
330 ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
331 ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
332 ArmVirtPkg/HighMemDxe/HighMemDxe.inf
333 OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
334 OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
335 OvmfPkg/VirtioNetDxe/VirtioNet.inf
336 OvmfPkg/VirtioRngDxe/VirtioRng.inf
339 # FAT filesystem + GPT/MBR partitioning + UDF filesystem
341 MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
342 MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
343 MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
344 FatPkg/EnhancedFatDxe/Fat.inf
345 MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
350 MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
352 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
353 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
355 MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
356 MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
357 MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
358 MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
359 MdeModulePkg/Logo/LogoDxe.inf
360 MdeModulePkg/Application/UiApp/UiApp.inf {
362 NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf
363 NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
364 NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
366 OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf
371 !include NetworkPkg/NetworkComponents.dsc.inc
372 !if $(NETWORK_TLS_ENABLE) == TRUE
373 NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {
375 NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf
380 # SCSI Bus and Disk Driver
382 MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
383 MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
388 MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
393 MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf {
395 NULL|OvmfPkg/Library/SmbiosVersionLib/DetectSmbiosVersionLib.inf
397 OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
402 ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf {
404 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
406 MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
407 MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {
409 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
411 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
412 OvmfPkg/Virtio10Dxe/Virtio10.inf
417 OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
418 OvmfPkg/VirtioGpuDxe/VirtioGpu.inf
419 OvmfPkg/PlatformDxe/Platform.inf
424 MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
425 MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
426 MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
427 MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
428 MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
429 MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
434 ArmVirtPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.inf
436 MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
437 OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf {
439 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf