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