ShellPkg/TftpDynamicCommand: Fix the potential assertion and memory leak issue.
[mirror_edk2.git] / ArmVirtPkg / ArmVirtQemuKernel.dsc
1 #
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.
5 #
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
10 #
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.
13 #
14 #
15
16 ################################################################################
17 #
18 # Defines Section - statements that will be processed to create a Makefile.
19 #
20 ################################################################################
21 [Defines]
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/ArmVirtQemuKernel-$(ARCH)
27 SUPPORTED_ARCHITECTURES = AARCH64|ARM
28 BUILD_TARGETS = DEBUG|RELEASE|NOOPT
29 SKUID_IDENTIFIER = DEFAULT
30 FLASH_DEFINITION = ArmVirtPkg/ArmVirtQemuKernel.fdf
31
32 #
33 # Defines for default states. These can be changed on the command line.
34 # -D FLAG=VALUE
35 #
36 DEFINE SECURE_BOOT_ENABLE = FALSE
37 DEFINE HTTP_BOOT_ENABLE = FALSE
38
39 !include ArmVirtPkg/ArmVirt.dsc.inc
40
41 [LibraryClasses.common]
42 ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
43 ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
44
45 # Virtio Support
46 VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
47 VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf
48 QemuFwCfgLib|ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf
49 QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/BaseQemuFwCfgS3LibNull.inf
50
51 ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf
52
53 TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
54 NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf
55
56 CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
57 BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
58 PlatformBootManagerLib|ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
59 CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
60 FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
61 QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
62 FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
63 PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
64 PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
65 PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
66
67 !if $(HTTP_BOOT_ENABLE) == TRUE
68 HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
69 !endif
70
71 [LibraryClasses.common.UEFI_DRIVER]
72 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
73
74 [BuildOptions.ARM.EDKII.SEC, BuildOptions.ARM.EDKII.BASE]
75 # Avoid MOVT/MOVW instruction pairs in code that may end up in the PIE
76 # executable we build for the relocatable PrePi. They are not runtime
77 # relocatable in ELF.
78 *_CLANG35_*_CC_FLAGS = -mno-movt
79
80 ################################################################################
81 #
82 # Pcd Section - list of all EDK II PCD Entries defined by this Platform
83 #
84 ################################################################################
85
86 [PcdsFeatureFlag.common]
87 gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE
88 gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|TRUE
89
90 ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.
91 # It could be set FALSE to save size.
92 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
93 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
94
95 [PcdsFixedAtBuild.common]
96 gArmPlatformTokenSpaceGuid.PcdCoreCount|1
97 !if $(ARCH) == AARCH64
98 gArmTokenSpaceGuid.PcdVFPEnabled|1
99 !endif
100
101 gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0x4007c000
102 gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
103 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
104 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
105
106 # Size of the region used by UEFI in permanent memory (Reserved 64MB)
107 gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
108
109 ## Trustzone enable (to make the transition from EL3 to EL2 in ArmPlatformPkg/Sec)
110 gArmTokenSpaceGuid.PcdTrustzoneSupport|FALSE
111
112 #
113 # ARM PrimeCell
114 #
115
116 ## PL011 - Serial Terminal
117 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|38400
118
119 ## Default Terminal Type
120 ## 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
121 !if $(TTY_TERMINAL) == TRUE
122 gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
123 !else
124 gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|1
125 !endif
126
127 #
128 # ARM Virtual Architectural Timer -- fetch frequency from QEMU (TCG) or KVM
129 #
130 gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0
131
132 !if $(HTTP_BOOT_ENABLE) == TRUE
133 gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
134 !endif
135
136 [PcdsPatchableInModule.common]
137 #
138 # This will be overridden in the code
139 #
140 gArmTokenSpaceGuid.PcdSystemMemoryBase|0x0
141 gArmTokenSpaceGuid.PcdSystemMemorySize|0x0
142
143 #
144 # Define a default initial address for the device tree.
145 # Ignored if x0 != 0 at entry.
146 #
147 gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000
148
149 gArmTokenSpaceGuid.PcdFdBaseAddress|0x0
150 gArmTokenSpaceGuid.PcdFvBaseAddress|0x0
151
152 [PcdsFixedAtBuild.AARCH64]
153
154 gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
155 gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
156
157 #
158 # The maximum physical I/O addressability of the processor, set with
159 # BuildCpuHob().
160 #
161 gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16
162
163 # KVM limits it IPA space to 40 bits (1 TB), so there is no need to
164 # support anything bigger, even if the host hardware does
165 gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize|40
166
167 [PcdsDynamicDefault.common]
168 gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
169
170 ## If TRUE, OvmfPkg/AcpiPlatformDxe will not wait for PCI
171 # enumeration to complete before installing ACPI tables.
172 gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
173
174 gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|0x0
175 gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|0x0
176 gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum|0x0
177 gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum|0x0
178
179 #
180 # ARM General Interrupt Controller
181 #
182 gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
183 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
184 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
185
186 ## PL031 RealTimeClock
187 gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0
188
189 # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this
190 # PCD and PcdPciDisableBusEnumeration above have not been assigned yet
191 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF
192
193 gArmTokenSpaceGuid.PcdPciIoTranslation|0x0
194
195 #
196 # Set video resolution for boot options and for text setup.
197 # PlatformDxe can set the former at runtime.
198 #
199 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800
200 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600
201 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640
202 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
203
204 #
205 # SMBIOS entry point version
206 #
207 gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0300
208 gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
209 gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE
210
211 ################################################################################
212 #
213 # Components Section - list of all EDK II Modules needed by this Platform
214 #
215 ################################################################################
216 [Components.common]
217 #
218 # PEI Phase modules
219 #
220 ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf {
221 <LibraryClasses>
222 ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
223 LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
224 PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
225 HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
226 PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
227 MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
228 }
229
230 #
231 # DXE
232 #
233 MdeModulePkg/Core/Dxe/DxeMain.inf {
234 <LibraryClasses>
235 NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
236 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
237 }
238 MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
239 <LibraryClasses>
240 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
241 }
242
243 #
244 # Architectural Protocols
245 #
246 ArmPkg/Drivers/CpuDxe/CpuDxe.inf
247 MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
248 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
249 <LibraryClasses>
250 NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
251 NULL|EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedLib.inf
252 # don't use unaligned CopyMem () on the UEFI varstore NOR flash region
253 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
254 }
255 !if $(SECURE_BOOT_ENABLE) == TRUE
256 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {
257 <LibraryClasses>
258 NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf
259 }
260 SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
261 !else
262 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
263 !endif
264 MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
265 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
266 MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
267 MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
268 EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf {
269 <LibraryClasses>
270 NULL|ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf
271 }
272 EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
273
274 MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
275 MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
276 MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
277 MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
278 MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
279
280 MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
281
282 ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
283 ArmPkg/Drivers/TimerDxe/TimerDxe.inf {
284 <LibraryClasses>
285 NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
286 }
287 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
288 MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
289
290 #
291 # Platform Driver
292 #
293 ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
294 ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
295 ArmVirtPkg/HighMemDxe/HighMemDxe.inf
296 OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
297 OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
298 OvmfPkg/VirtioNetDxe/VirtioNet.inf
299 OvmfPkg/VirtioRngDxe/VirtioRng.inf
300
301 #
302 # FAT filesystem + GPT/MBR partitioning + UDF filesystem
303 #
304 MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
305 MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
306 MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
307 FatPkg/EnhancedFatDxe/Fat.inf
308 MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
309
310 #
311 # Bds
312 #
313 MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
314 <LibraryClasses>
315 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
316 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
317 }
318 MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
319 MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
320 MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
321 MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
322 MdeModulePkg/Logo/LogoDxe.inf
323 MdeModulePkg/Application/UiApp/UiApp.inf {
324 <LibraryClasses>
325 NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf
326 NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
327 NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
328 }
329
330 #
331 # Networking stack
332 #
333 MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
334 MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
335 MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
336 MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
337 MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
338 MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
339 MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
340 MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
341 MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
342 MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
343 MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
344 !if $(HTTP_BOOT_ENABLE) == TRUE
345 NetworkPkg/DnsDxe/DnsDxe.inf
346 NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
347 NetworkPkg/HttpDxe/HttpDxe.inf
348 NetworkPkg/HttpBootDxe/HttpBootDxe.inf
349 !endif
350
351 #
352 # SCSI Bus and Disk Driver
353 #
354 MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
355 MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
356
357 #
358 # SMBIOS Support
359 #
360 MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf {
361 <LibraryClasses>
362 NULL|OvmfPkg/Library/SmbiosVersionLib/DetectSmbiosVersionLib.inf
363 }
364 OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
365
366 #
367 # PCI support
368 #
369 ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf {
370 <LibraryClasses>
371 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
372 }
373 MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
374 MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {
375 <LibraryClasses>
376 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
377 }
378 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
379 OvmfPkg/Virtio10Dxe/Virtio10.inf
380
381 #
382 # Video support
383 #
384 OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
385 OvmfPkg/VirtioGpuDxe/VirtioGpu.inf
386 OvmfPkg/PlatformDxe/Platform.inf
387
388 #
389 # USB Support
390 #
391 MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
392 MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
393 MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
394 MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
395 MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
396 MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
397
398 #
399 # ACPI Support
400 #
401 ArmVirtPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.inf
402 [Components.AARCH64]
403 MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
404 OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf {
405 <LibraryClasses>
406 NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
407 }