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 !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 ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.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.DXE_DRIVER]
82 ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
84 [LibraryClasses.common.UEFI_DRIVER]
85 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
87 [BuildOptions.common.EDKII.SEC, BuildOptions.common.EDKII.BASE]
89 # CLANG38 with LTO support enabled uses the GNU GOLD linker, which insists
90 # on emitting GOT based symbol references when running in shared mode, unless
91 # we override visibility to 'hidden' in all modules that make up the PrePi
94 GCC:*_CLANG38_*_CC_FLAGS = -include $(WORKSPACE)/ArmVirtPkg/Include/Platform/Hidden.h
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
122 # Size of the region used by UEFI in permanent memory (Reserved 64MB)
123 gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
129 ## PL011 - Serial Terminal
130 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|38400
132 ## Default Terminal Type
133 ## 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
134 !if $(TTY_TERMINAL) == TRUE
135 gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
136 # Set terminal type to TtyTerm, the value encoded is EFI_TTY_TERM_GUID
137 gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x80, 0x6d, 0x91, 0x7d, 0xb1, 0x5b, 0x8c, 0x45, 0xa4, 0x8f, 0xe2, 0x5f, 0xdd, 0x51, 0xef, 0x94}
139 gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|1
143 # ARM Virtual Architectural Timer -- fetch frequency from QEMU (TCG) or KVM
145 gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0
150 !include NetworkPkg/NetworkPcds.dsc.inc
152 gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
153 gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
156 # The maximum physical I/O addressability of the processor, set with
159 gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16
161 !if $(SECURE_BOOT_ENABLE) == TRUE
162 # override the default values from SecurityPkg to ensure images from all sources are verified in secure boot
163 gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x04
164 gEfiSecurityPkgTokenSpaceGuid.PcdFixedMediaImageVerificationPolicy|0x04
165 gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPolicy|0x04
168 gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|3
170 [PcdsPatchableInModule.common]
172 # This will be overridden in the code
174 gArmTokenSpaceGuid.PcdSystemMemoryBase|0x0
175 gArmTokenSpaceGuid.PcdSystemMemorySize|0x0
178 # Define a default initial address for the device tree.
179 # Ignored if x0 != 0 at entry.
181 gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000
183 gArmTokenSpaceGuid.PcdFdBaseAddress|0x0
184 gArmTokenSpaceGuid.PcdFvBaseAddress|0x0
186 [PcdsDynamicDefault.common]
187 gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
189 ## If TRUE, OvmfPkg/AcpiPlatformDxe will not wait for PCI
190 # enumeration to complete before installing ACPI tables.
191 gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
193 gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|0x0
194 gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|0x0
195 gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum|0x0
196 gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum|0x0
199 # ARM General Interrupt Controller
201 gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
202 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
203 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
205 ## PL031 RealTimeClock
206 gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0
208 # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this
209 # PCD and PcdPciDisableBusEnumeration above have not been assigned yet
210 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF
212 gArmTokenSpaceGuid.PcdPciIoTranslation|0x0
215 # Set video resolution for boot options and for text setup.
216 # PlatformDxe can set the former at runtime.
218 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800
219 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600
220 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640
221 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
224 # SMBIOS entry point version
226 gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0300
227 gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
228 gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE
230 ################################################################################
232 # Components Section - list of all EDK II Modules needed by this Platform
234 ################################################################################
239 ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf {
241 ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
242 LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
243 PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
244 HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
245 PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
246 MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
252 MdeModulePkg/Core/Dxe/DxeMain.inf {
254 NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
255 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
257 MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
259 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
263 # Architectural Protocols
265 ArmPkg/Drivers/CpuDxe/CpuDxe.inf
266 MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
267 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
269 NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
270 NULL|EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedLib.inf
271 # don't use unaligned CopyMem () on the UEFI varstore NOR flash region
272 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
274 !if $(SECURE_BOOT_ENABLE) == TRUE
275 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {
277 NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf
279 SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
280 OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.inf
282 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
284 MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
285 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
286 MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
287 MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
288 EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf {
290 NULL|ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf
292 EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
294 MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
295 MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
296 MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
297 MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
298 MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
300 MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
302 ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
303 ArmPkg/Drivers/TimerDxe/TimerDxe.inf {
305 NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
307 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
308 MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
311 # Status Code Routing
313 MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
318 ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
319 ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
320 ArmVirtPkg/HighMemDxe/HighMemDxe.inf
321 OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
322 OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
323 OvmfPkg/VirtioNetDxe/VirtioNet.inf
324 OvmfPkg/VirtioRngDxe/VirtioRng.inf
327 # FAT filesystem + GPT/MBR partitioning + UDF filesystem
329 MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
330 MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
331 MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
332 FatPkg/EnhancedFatDxe/Fat.inf
333 MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
338 MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
340 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
341 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
343 MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
344 MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
345 MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
346 MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
347 MdeModulePkg/Logo/LogoDxe.inf
348 MdeModulePkg/Application/UiApp/UiApp.inf {
350 NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf
351 NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
352 NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
358 !include NetworkPkg/NetworkComponents.dsc.inc
361 # SCSI Bus and Disk Driver
363 MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
364 MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
369 MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf {
371 NULL|OvmfPkg/Library/SmbiosVersionLib/DetectSmbiosVersionLib.inf
373 OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
378 ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf {
380 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
382 MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
383 MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {
385 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
387 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
388 OvmfPkg/Virtio10Dxe/Virtio10.inf
393 OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
394 OvmfPkg/VirtioGpuDxe/VirtioGpu.inf
395 OvmfPkg/PlatformDxe/Platform.inf
400 MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
401 MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
402 MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
403 MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
404 MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
405 MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
410 ArmVirtPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.inf
412 MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
413 OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf {
415 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf