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/ArmVirtQemu-$(ARCH)
21 SUPPORTED_ARCHITECTURES = AARCH64|ARM
22 BUILD_TARGETS = DEBUG|RELEASE|NOOPT
23 SKUID_IDENTIFIER = DEFAULT
24 FLASH_DEFINITION = ArmVirtPkg/ArmVirtQemu.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 !if $(NETWORK_TLS_ENABLE) == TRUE
47 !error "NETWORK_TLS_ENABLE is tracked at <https://bugzilla.tianocore.org/show_bug.cgi?id=1009>"
50 !include NetworkPkg/NetworkDefines.dsc.inc
52 !include ArmVirtPkg/ArmVirt.dsc.inc
54 [LibraryClasses.common]
55 ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
56 ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
59 VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
60 VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf
61 QemuFwCfgLib|ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf
62 QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/BaseQemuFwCfgS3LibNull.inf
64 ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.inf
66 TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
67 NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf
69 CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
70 BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
71 PlatformBootManagerLib|ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
72 PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf
73 CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
74 FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
75 QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
76 FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
77 PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
78 PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
79 PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
81 [LibraryClasses.common.PEIM]
82 ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf
84 [LibraryClasses.common.DXE_DRIVER]
85 ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
87 [LibraryClasses.common.UEFI_DRIVER]
88 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
90 ################################################################################
92 # Pcd Section - list of all EDK II PCD Entries defined by this Platform
94 ################################################################################
96 [PcdsFeatureFlag.common]
97 gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE
98 gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|TRUE
100 ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.
101 # It could be set FALSE to save size.
102 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
103 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
105 gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
107 [PcdsFixedAtBuild.common]
108 !if $(ARCH) == AARCH64
109 gArmTokenSpaceGuid.PcdVFPEnabled|1
112 gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0x4007c000
113 gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
114 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
115 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
117 # Size of the region used by UEFI in permanent memory (Reserved 64MB)
118 gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
124 ## PL011 - Serial Terminal
125 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|38400
127 ## Default Terminal Type
128 ## 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
129 !if $(TTY_TERMINAL) == TRUE
130 gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
131 # Set terminal type to TtyTerm, the value encoded is EFI_TTY_TERM_GUID
132 gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x80, 0x6d, 0x91, 0x7d, 0xb1, 0x5b, 0x8c, 0x45, 0xa4, 0x8f, 0xe2, 0x5f, 0xdd, 0x51, 0xef, 0x94}
134 gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|1
138 # ARM Virtual Architectural Timer -- fetch frequency from QEMU (TCG) or KVM
140 gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0
145 !include NetworkPkg/NetworkPcds.dsc.inc
147 # System Memory Base -- fixed at 0x4000_0000
148 gArmTokenSpaceGuid.PcdSystemMemoryBase|0x40000000
150 # initial location of the device tree blob passed by QEMU -- base of DRAM
151 gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000
153 gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
154 gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
157 # The maximum physical I/O addressability of the processor, set with
160 gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16
163 # Enable the non-executable DXE stack. (This gets set up by DxeIpl)
165 gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE
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 [PcdsFixedAtBuild.AARCH64]
177 # Clearing BIT0 in this PCD prevents installing a 32-bit SMBIOS entry point,
178 # if the entry point version is >= 3.0. AARCH64 OSes cannot assume the
179 # presence of the 32-bit entry point anyway (because many AARCH64 systems
180 # don't have 32-bit addressable physical RAM), and the additional allocations
181 # below 4 GB needlessly fragment the memory map. So expose the 64-bit entry
182 # point only, for entry point versions >= 3.0.
183 gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosEntryPointProvideMethod|0x2
185 # ACPI predates the AARCH64 architecture by 5 versions, so
186 # we only target OSes that support ACPI v5.0 or later
187 gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20
189 [PcdsDynamicDefault.common]
190 gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
192 ## If TRUE, OvmfPkg/AcpiPlatformDxe will not wait for PCI
193 # enumeration to complete before installing ACPI tables.
194 gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
196 # System Memory Size -- 1 MB initially, actual size will be fetched from DT
197 gArmTokenSpaceGuid.PcdSystemMemorySize|0x00100000
199 gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|0x0
200 gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|0x0
201 gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum|0x0
202 gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum|0x0
205 # ARM General Interrupt Controller
207 gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
208 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
209 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
211 ## PL031 RealTimeClock
212 gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0
214 # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this
215 # PCD and PcdPciDisableBusEnumeration above have not been assigned yet
216 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF
218 gArmTokenSpaceGuid.PcdPciIoTranslation|0x0
221 # Set video resolution for boot options and for text setup.
222 # PlatformDxe can set the former at runtime.
224 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800
225 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600
226 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640
227 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
230 # SMBIOS entry point version
232 gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0300
233 gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
234 gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE
237 gArmVirtTokenSpaceGuid.PcdForceNoAcpi|L"ForceNoAcpi"|gArmVirtVariableGuid|0x0|FALSE|NV,BS
239 ################################################################################
241 # Components Section - list of all EDK II Modules needed by this Platform
243 ################################################################################
248 ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
249 MdeModulePkg/Core/Pei/PeiMain.inf
250 MdeModulePkg/Universal/PCD/Pei/Pcd.inf {
252 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
254 ArmPlatformPkg/PlatformPei/PlatformPeim.inf
255 ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
256 ArmPkg/Drivers/CpuPei/CpuPei.inf
258 MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
260 MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf {
262 NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
268 MdeModulePkg/Core/Dxe/DxeMain.inf {
270 NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
271 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
273 MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
275 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
279 # Architectural Protocols
281 ArmPkg/Drivers/CpuDxe/CpuDxe.inf
282 MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
283 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
285 NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
286 NULL|EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedLib.inf
287 # don't use unaligned CopyMem () on the UEFI varstore NOR flash region
288 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
290 !if $(SECURE_BOOT_ENABLE) == TRUE
291 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {
293 NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf
295 SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
296 OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.inf
298 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
300 MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
301 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
302 MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
303 MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
304 EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf {
306 NULL|ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf
308 EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
310 MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
311 MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
312 MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
313 MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
314 MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
316 MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
318 ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
319 ArmPkg/Drivers/TimerDxe/TimerDxe.inf {
321 NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
323 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
324 MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
327 # Status Code Routing
329 MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
334 ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
335 ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
336 ArmVirtPkg/HighMemDxe/HighMemDxe.inf
337 OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
338 OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
339 OvmfPkg/VirtioNetDxe/VirtioNet.inf
340 OvmfPkg/VirtioRngDxe/VirtioRng.inf
343 # FAT filesystem + GPT/MBR partitioning + UDF filesystem
345 MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
346 MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
347 MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
348 FatPkg/EnhancedFatDxe/Fat.inf
349 MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
354 MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
356 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
357 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
359 MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
360 MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
361 MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
362 MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
363 MdeModulePkg/Logo/LogoDxe.inf
364 MdeModulePkg/Application/UiApp/UiApp.inf {
366 NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf
367 NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
368 NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
374 !include NetworkPkg/NetworkComponents.dsc.inc
377 # SCSI Bus and Disk Driver
379 MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
380 MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
385 MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf {
387 NULL|OvmfPkg/Library/SmbiosVersionLib/DetectSmbiosVersionLib.inf
389 OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
394 ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf {
396 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
398 MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
399 MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {
401 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
403 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
404 OvmfPkg/Virtio10Dxe/Virtio10.inf
409 OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
410 OvmfPkg/VirtioGpuDxe/VirtioGpu.inf
411 OvmfPkg/PlatformDxe/Platform.inf
416 MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
417 MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
418 MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
419 MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
420 MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
421 MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
426 ArmVirtPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.inf
428 MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
429 OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf {
431 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf