2 # Copyright (c) 2011-2015, ARM Limited. All rights reserved.
3 # Copyright (c) 2014, Linaro Limited. All rights reserved.
4 # Copyright (c) 2015, Intel Corporation. All rights reserved.
6 # This program and the accompanying materials
7 # are licensed and made available under the terms and conditions of the BSD License
8 # which accompanies this distribution. The full text of the license may be found at
9 # http://opensource.org/licenses/bsd-license.php
11 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 ################################################################################
18 # Defines Section - statements that will be processed to create a Makefile.
20 ################################################################################
22 PLATFORM_NAME = ArmVirtQemu
23 PLATFORM_GUID = 37d7e986-f7e9-45c2-8067-e371421a626c
24 PLATFORM_VERSION = 0.1
25 DSC_SPECIFICATION = 0x00010005
26 OUTPUT_DIRECTORY = Build/ArmVirtQemu-$(ARCH)
27 SUPPORTED_ARCHITECTURES = AARCH64|ARM
28 BUILD_TARGETS = DEBUG|RELEASE
29 SKUID_IDENTIFIER = DEFAULT
30 FLASH_DEFINITION = ArmVirtPkg/ArmVirtQemu.fdf
33 # Defines for default states. These can be changed on the command line.
36 DEFINE SECURE_BOOT_ENABLE = FALSE
38 !include ArmVirtPkg/ArmVirt.dsc.inc
40 [LibraryClasses.AARCH64]
41 ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf
42 ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexAEMv8Lib/ArmCortexAEMv8Lib.inf
45 ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf
46 ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexA15Lib/ArmCortexA15Lib.inf
48 [LibraryClasses.common]
50 VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
51 VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf
52 QemuFwCfgLib|ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf
54 ArmPlatformLib|ArmVirtPkg/Library/ArmVirtPlatformLib/ArmVirtPlatformLib.inf
55 ArmPlatformSysConfigLib|ArmPlatformPkg/Library/ArmPlatformSysConfigLibNull/ArmPlatformSysConfigLibNull.inf
57 TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
58 NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf
61 CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
62 GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
63 PlatformBdsLib|ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
64 CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
65 QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
68 [LibraryClasses.common.UEFI_DRIVER]
69 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
71 [LibraryClasses.AARCH64.SEC]
72 ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64LibSec.inf
74 [LibraryClasses.ARM.SEC]
75 ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf
78 RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 -I$(WORKSPACE)/ArmVirtPkg/Include
79 GCC:*_*_ARM_PLATFORM_FLAGS == -mcpu=cortex-a15 -I$(WORKSPACE)/ArmVirtPkg/Include
80 *_*_AARCH64_PLATFORM_FLAGS == -I$(WORKSPACE)/ArmVirtPkg/Include
83 ################################################################################
85 # Pcd Section - list of all EDK II PCD Entries defined by this Platform
87 ################################################################################
89 [PcdsFeatureFlag.common]
90 gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE
91 gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|TRUE
93 ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.
94 # It could be set FALSE to save size.
95 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
96 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
98 # Activate KVM workaround for now.
99 gArmVirtTokenSpaceGuid.PcdKludgeMapPciMmioAsCached|TRUE
101 [PcdsFixedAtBuild.common]
102 gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"QEMU"
104 gArmPlatformTokenSpaceGuid.PcdCoreCount|1
105 !if $(ARCH) == AARCH64
106 gArmTokenSpaceGuid.PcdVFPEnabled|1
109 gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0x4007c000
110 gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
112 # Size of the region used by UEFI in permanent memory (Reserved 64MB)
113 gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
118 gArmTokenSpaceGuid.PcdArmUncachedMemoryMask|0x0000000040000000
120 ## Trustzone enable (to make the transition from EL3 to EL2 in ArmPlatformPkg/Sec)
121 gArmTokenSpaceGuid.PcdTrustzoneSupport|FALSE
127 ## PL011 - Serial Terminal
128 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|38400
133 gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"Linux (EFI stub) on virtio31:hd0:part0"
134 gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(837DCA9E-E874-4D82-B29A-23FE0E23D1E2,003E000A00000000)/HD(1,MBR,0x00000000,0x3F,0x19FC0)/Image"
135 gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"root=/dev/vda2 console=ttyAMA0 earlycon uefi_debug"
136 gArmPlatformTokenSpaceGuid.PcdDefaultBootType|0
139 # Settings for ARM BDS -- use the serial console (ConIn & ConOut).
141 gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenVt100()"
142 gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenVt100()"
143 gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
146 # ARM Virtual Architectural Timer -- fetch frequency from QEMU (TCG) or KVM
148 gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0
151 # NV Storage PCDs. Use base of 0x04000000 for NOR1
153 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x04000000
154 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x00040000
155 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x04040000
156 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00040000
157 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x04080000
158 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00040000
160 # System Memory Base -- fixed at 0x4000_0000
161 gArmTokenSpaceGuid.PcdSystemMemoryBase|0x40000000
163 # initial location of the device tree blob passed by QEMU -- base of DRAM
164 gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000
167 gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
168 gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0x83, 0xA5, 0x04, 0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1 }
172 # The maximum physical I/O addressability of the processor, set with
175 gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16
177 [PcdsDynamicDefault.common]
178 ## If TRUE, OvmfPkg/AcpiPlatformDxe will not wait for PCI
179 # enumeration to complete before installing ACPI tables.
180 gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
182 # System Memory Size -- 1 MB initially, actual size will be fetched from DT
183 gArmTokenSpaceGuid.PcdSystemMemorySize|0x00100000
185 gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|0x0
186 gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|0x0
187 gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum|0x0
188 gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum|0x0
191 # ARM General Interrupt Controller
193 gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
194 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
195 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
197 ## PL031 RealTimeClock
198 gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0
200 gArmPlatformTokenSpaceGuid.PcdPciBusMin|0x0
201 gArmPlatformTokenSpaceGuid.PcdPciBusMax|0x0
202 gArmPlatformTokenSpaceGuid.PcdPciIoBase|0x0
203 gArmPlatformTokenSpaceGuid.PcdPciIoSize|0x0
204 gArmPlatformTokenSpaceGuid.PcdPciIoTranslation|0x0
205 gArmPlatformTokenSpaceGuid.PcdPciMmio32Base|0x0
206 gArmPlatformTokenSpaceGuid.PcdPciMmio32Size|0x0
207 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x0
209 gArmVirtTokenSpaceGuid.PcdArmPsciMethod|0
211 gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress|0x0
212 gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress|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
223 ################################################################################
225 # Components Section - list of all EDK II Modules needed by this Platform
227 ################################################################################
232 ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf {
234 ArmPlatformGlobalVariableLib|ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/Pei/PeiArmPlatformGlobalVariableLib.inf
236 MdeModulePkg/Core/Pei/PeiMain.inf
237 MdeModulePkg/Universal/PCD/Pei/Pcd.inf
238 ArmPlatformPkg/PlatformPei/PlatformPeim.inf
239 ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
240 ArmPkg/Drivers/CpuPei/CpuPei.inf
242 MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
244 MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf {
246 NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
252 MdeModulePkg/Core/Dxe/DxeMain.inf {
254 NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
256 MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
259 # Architectural Protocols
261 ArmPkg/Drivers/CpuDxe/CpuDxe.inf
262 MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
263 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
264 !if $(SECURE_BOOT_ENABLE) == TRUE
265 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {
267 NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf
269 SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
271 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
273 MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
274 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
275 MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
276 EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
277 EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
278 EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
280 MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
281 MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
282 MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
283 MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
284 EmbeddedPkg/SerialDxe/SerialDxe.inf
286 MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
288 ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
289 ArmPkg/Drivers/TimerDxe/TimerDxe.inf
290 !if $(SECURE_BOOT_ENABLE) == TRUE
291 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashAuthenticatedDxe.inf
293 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
295 MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
300 ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
301 OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
302 OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
303 OvmfPkg/VirtioNetDxe/VirtioNet.inf
306 # FAT filesystem + GPT/MBR partitioning
308 MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
309 MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
310 MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
315 MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
317 MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
318 MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
319 IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
321 ArmPlatformPkg/Bds/Bds.inf
325 # SCSI Bus and Disk Driver
327 MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
328 MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
333 MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
334 OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf
339 ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
340 MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
341 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
346 OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf {
348 BltLib|OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
350 OvmfPkg/PlatformDxe/Platform.inf
355 MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
356 MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
357 MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
358 MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
359 MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf