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
60 ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf
62 TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
63 NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf
65 CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
66 BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
67 PlatformBootManagerLib|ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
68 PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf
69 CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
70 FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
71 QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
72 FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
73 PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
74 PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
75 PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
76 TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
78 [LibraryClasses.common.DXE_DRIVER]
79 ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
81 [LibraryClasses.common.UEFI_DRIVER]
82 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
84 [BuildOptions.common.EDKII.SEC, BuildOptions.common.EDKII.BASE]
86 # CLANG38 with LTO support enabled uses the GNU GOLD linker, which insists
87 # on emitting GOT based symbol references when running in shared mode, unless
88 # we override visibility to 'hidden' in all modules that make up the PrePi
91 GCC:*_CLANG38_*_CC_FLAGS = -include $(WORKSPACE)/ArmVirtPkg/Include/Platform/Hidden.h
93 ################################################################################
95 # Pcd Section - list of all EDK II PCD Entries defined by this Platform
97 ################################################################################
99 [PcdsFeatureFlag.common]
100 gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE
101 gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|TRUE
103 ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.
104 # It could be set FALSE to save size.
105 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
106 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
108 gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
110 [PcdsFixedAtBuild.common]
111 !if $(ARCH) == AARCH64
112 gArmTokenSpaceGuid.PcdVFPEnabled|1
115 gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
116 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
117 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
118 !if $(NETWORK_TLS_ENABLE) == TRUE
120 # The cumulative and individual VOLATILE variable size limits should be set
121 # high enough for accommodating several and/or large CA certificates.
123 gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x80000
124 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize|0x40000
127 # Size of the region used by UEFI in permanent memory (Reserved 64MB)
128 gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
134 ## PL011 - Serial Terminal
135 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|38400
137 ## Default Terminal Type
138 ## 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
139 !if $(TTY_TERMINAL) == TRUE
140 gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
141 # Set terminal type to TtyTerm, the value encoded is EFI_TTY_TERM_GUID
142 gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x80, 0x6d, 0x91, 0x7d, 0xb1, 0x5b, 0x8c, 0x45, 0xa4, 0x8f, 0xe2, 0x5f, 0xdd, 0x51, 0xef, 0x94}
144 gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|1
148 # ARM Virtual Architectural Timer -- fetch frequency from QEMU (TCG) or KVM
150 gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0
155 !include NetworkPkg/NetworkPcds.dsc.inc
157 gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
158 gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
161 # The maximum physical I/O addressability of the processor, set with
164 gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16
166 !if $(SECURE_BOOT_ENABLE) == TRUE
167 # override the default values from SecurityPkg to ensure images from all sources are verified in secure boot
168 gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x04
169 gEfiSecurityPkgTokenSpaceGuid.PcdFixedMediaImageVerificationPolicy|0x04
170 gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPolicy|0x04
173 gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|3
175 [PcdsPatchableInModule.common]
176 # we need to provide a resolution for this PCD that supports PcdSet64()
177 # being called from ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c,
178 # even though that call will be compiled out on this platform as it does
179 # not (and cannot) support the TPM2 driver stack
180 gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0
183 # This will be overridden in the code
185 gArmTokenSpaceGuid.PcdSystemMemoryBase|0x0
186 gArmTokenSpaceGuid.PcdSystemMemorySize|0x0
189 # Define a default initial address for the device tree.
190 # Ignored if x0 != 0 at entry.
192 gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000
194 gArmTokenSpaceGuid.PcdFdBaseAddress|0x0
195 gArmTokenSpaceGuid.PcdFvBaseAddress|0x0
197 [PcdsDynamicDefault.common]
198 gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
200 ## If TRUE, OvmfPkg/AcpiPlatformDxe will not wait for PCI
201 # enumeration to complete before installing ACPI tables.
202 gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
204 gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|0x0
205 gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|0x0
206 gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum|0x0
207 gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum|0x0
210 # ARM General Interrupt Controller
212 gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
213 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
214 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
216 ## PL031 RealTimeClock
217 gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0
219 # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this
220 # PCD and PcdPciDisableBusEnumeration above have not been assigned yet
221 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF
223 gArmTokenSpaceGuid.PcdPciIoTranslation|0x0
226 # Set video resolution for boot options and for text setup.
227 # PlatformDxe can set the former at runtime.
229 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800
230 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600
231 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640
232 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
235 # SMBIOS entry point version
237 gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0300
238 gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
239 gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE
241 ################################################################################
243 # Components Section - list of all EDK II Modules needed by this Platform
245 ################################################################################
250 ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf {
252 ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
253 LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
254 PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
255 HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
256 PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
257 MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
263 MdeModulePkg/Core/Dxe/DxeMain.inf {
265 NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
266 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
268 MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
270 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
274 # Architectural Protocols
276 ArmPkg/Drivers/CpuDxe/CpuDxe.inf
277 MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
278 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
280 NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
281 NULL|EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedLib.inf
282 # don't use unaligned CopyMem () on the UEFI varstore NOR flash region
283 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
285 !if $(SECURE_BOOT_ENABLE) == TRUE
286 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {
288 NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf
290 SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
291 OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.inf
293 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
295 MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
296 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
297 MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
298 MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
299 EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf {
301 NULL|ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf
303 EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
305 MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
306 MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
307 MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
308 MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
309 MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
311 MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
313 ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
314 ArmPkg/Drivers/TimerDxe/TimerDxe.inf {
316 NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
318 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
319 MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
322 # Status Code Routing
324 MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
329 ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
330 ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
331 ArmVirtPkg/HighMemDxe/HighMemDxe.inf
332 OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
333 OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
334 OvmfPkg/VirtioNetDxe/VirtioNet.inf
335 OvmfPkg/VirtioRngDxe/VirtioRng.inf
338 # FAT filesystem + GPT/MBR partitioning + UDF filesystem
340 MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
341 MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
342 MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
343 FatPkg/EnhancedFatDxe/Fat.inf
344 MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
349 MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
351 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
352 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
354 MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
355 MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
356 MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
357 MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
358 MdeModulePkg/Logo/LogoDxe.inf
359 MdeModulePkg/Application/UiApp/UiApp.inf {
361 NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf
362 NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
363 NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
369 !include NetworkPkg/NetworkComponents.dsc.inc
370 !if $(NETWORK_TLS_ENABLE) == TRUE
371 NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {
373 NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf
378 # SCSI Bus and Disk Driver
380 MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
381 MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
386 MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf {
388 NULL|OvmfPkg/Library/SmbiosVersionLib/DetectSmbiosVersionLib.inf
390 OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
395 ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf {
397 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
399 MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
400 MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {
402 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
404 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
405 OvmfPkg/Virtio10Dxe/Virtio10.inf
410 OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
411 OvmfPkg/VirtioGpuDxe/VirtioGpu.inf
412 OvmfPkg/PlatformDxe/Platform.inf
417 MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
418 MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
419 MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
420 MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
421 MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
422 MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
427 ArmVirtPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.inf
429 MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
430 OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf {
432 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf