]> git.proxmox.com Git - mirror_edk2.git/blob - ArmVirtPkg/ArmVirtKvmTool.dsc
ArmVirt: don't use unaligned CopyMem () on NOR flash
[mirror_edk2.git] / ArmVirtPkg / ArmVirtKvmTool.dsc
1 # @file
2 # Workspace file for KVMTool virtual platform.
3 #
4 # Copyright (c) 2018 - 2022, ARM Limited. All rights reserved.
5 #
6 # SPDX-License-Identifier: BSD-2-Clause-Patent
7 #
8 #
9
10 ################################################################################
11 #
12 # Defines Section - statements that will be processed to create a Makefile.
13 #
14 ################################################################################
15 [Defines]
16 PLATFORM_NAME = ArmVirtKvmTool
17 PLATFORM_GUID = 4CB2C61E-FA32-4130-8E37-54ABC71A1A43
18 PLATFORM_VERSION = 0.1
19 DSC_SPECIFICATION = 0x0001001B
20 !ifdef $(EDK2_OUT_DIR)
21 OUTPUT_DIRECTORY = $(EDK2_OUT_DIR)
22 !else
23 OUTPUT_DIRECTORY = Build/ArmVirtKvmTool-$(ARCH)
24 !endif
25 SUPPORTED_ARCHITECTURES = AARCH64|ARM
26 BUILD_TARGETS = DEBUG|RELEASE
27 SKUID_IDENTIFIER = DEFAULT
28 FLASH_DEFINITION = ArmVirtPkg/ArmVirtKvmTool.fdf
29
30 [Defines.AARCH64]
31 DEFINE ACPIVIEW_ENABLE = TRUE
32
33 !include ArmVirtPkg/ArmVirt.dsc.inc
34
35 !if $(ARCH) == AARCH64
36 !include DynamicTablesPkg/DynamicTables.dsc.inc
37 !endif
38
39 !include MdePkg/MdeLibs.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
49 ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.inf
50 ArmVirtMemInfoLib|ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.inf
51
52 TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
53 VirtNorFlashPlatformLib|ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf
54
55 CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
56
57 # BDS Libraries
58 UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
59 PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
60 BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
61
62 CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
63 FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
64
65 FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
66
67 PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
68 PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
69 PciHostBridgeLib|OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
70 PciHostBridgeUtilityLib|ArmVirtPkg/Library/ArmVirtPciHostBridgeUtilityLib/ArmVirtPciHostBridgeUtilityLib.inf
71
72 TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
73 AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
74
75 PlatformPeiLib|ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf
76
77 PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
78 PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLib.inf
79 SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
80
81 HwInfoParserLib|DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParserLib.inf
82 DynamicPlatRepoLib|DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/DynamicPlatRepoLib.inf
83
84 ArmMonitorLib|ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.inf
85 ArmTrngLib|ArmPkg/Library/ArmTrngLib/ArmTrngLib.inf
86
87 [LibraryClasses.common.SEC, LibraryClasses.common.PEI_CORE, LibraryClasses.common.PEIM]
88 PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
89 PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf
90 SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
91
92 [LibraryClasses.common.UEFI_DRIVER]
93 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
94
95 [BuildOptions]
96 *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
97 #
98 # We need to avoid jump tables in SEC and BASE modules, so that the PE/COFF
99 # self-relocation code itself is guaranteed to be position independent.
100 #
101 GCC:*_*_*_CC_XIPFLAGS = -fno-jump-tables
102
103 ################################################################################
104 #
105 # Pcd Section - list of all EDK II PCD Entries defined by this Platform
106 #
107 ################################################################################
108
109 [PcdsFeatureFlag.common]
110 ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.
111 # It could be set FALSE to save size.
112 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
113 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
114
115 # Use MMIO for accessing RTC controller registers.
116 gPcAtChipsetPkgTokenSpaceGuid.PcdRtcUseMmio|TRUE
117
118 gArmTokenSpaceGuid.PcdMonitorConduitHvc|TRUE
119
120 [PcdsFixedAtBuild.common]
121 gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000000F
122
123 gArmPlatformTokenSpaceGuid.PcdCoreCount|1
124
125 !if $(ARCH) == AARCH64
126 gArmTokenSpaceGuid.PcdVFPEnabled|1
127 !endif
128
129 gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
130 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
131 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
132
133 # Size of the region used by UEFI in permanent memory (Reserved 64MB)
134 gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
135
136 #
137 # TTY Terminal Type
138 # 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
139 gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
140
141 #
142 # ARM Virtual Architectural Timer -- fetch frequency from KVM
143 #
144 gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0
145
146 # Use MMIO for accessing Serial port registers.
147 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE
148 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialPciDeviceInfo|{0xFF}
149
150 gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
151 gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
152
153 #
154 # The maximum physical I/O addressability of the processor, set with
155 # BuildCpuHob().
156 #
157 gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16
158
159 [PcdsPatchableInModule.common]
160 #
161 # This will be overridden in the code
162 #
163 gArmTokenSpaceGuid.PcdSystemMemoryBase|0x0
164 gArmTokenSpaceGuid.PcdSystemMemorySize|0x0
165
166 #
167 # The device tree base address is handed off by kvmtool.
168 # We are booting from RAM using the Linux kernel boot protocol,
169 # x0 will point to the DTB image in memory.
170 #
171 gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0
172
173 gArmTokenSpaceGuid.PcdFdBaseAddress|0x0
174 gArmTokenSpaceGuid.PcdFvBaseAddress|0x0
175
176 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x0
177
178 [PcdsDynamicHii]
179 gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0|5
180
181 [PcdsDynamicDefault.common]
182 gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|0x0
183 gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|0x0
184 gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum|0x0
185 gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum|0x0
186
187 #
188 # ARM General Interrupt Controller
189 #
190 gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
191 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
192 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
193
194 #
195 # PCI settings
196 #
197 gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
198
199 # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this
200 # PCD and PcdPciDisableBusEnumeration above have not been assigned yet
201 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF
202
203 gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation|0x0
204
205 #
206 # Set video resolution for boot options and for text setup.
207 # PlatformDxe can set the former at runtime.
208 #
209 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800
210 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600
211 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640
212 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
213
214 # Setup Flash storage variables
215 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0
216 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x40000
217 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
218 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x40000
219 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
220 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x40000
221
222 ## RTC Register address in MMIO space.
223 gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister64|0x0
224 gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister64|0x0
225
226 ################################################################################
227 #
228 # Components Section - list of all EDK II Modules needed by this Platform
229 #
230 ################################################################################
231 [Components.common]
232 #
233 # PEI Phase modules
234 #
235 ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf {
236 <LibraryClasses>
237 ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
238 LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
239 PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
240 HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
241 PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
242 MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
243 }
244
245 #
246 # DXE
247 #
248 MdeModulePkg/Core/Dxe/DxeMain.inf {
249 <LibraryClasses>
250 NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
251 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
252 }
253 MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
254 <LibraryClasses>
255 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
256 }
257
258 #
259 # Architectural Protocols
260 #
261 ArmPkg/Drivers/CpuDxe/CpuDxe.inf
262 MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
263 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
264 <LibraryClasses>
265 NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
266 NULL|EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedLib.inf
267 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
268 }
269
270 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
271 MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
272 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf {
273 <LibraryClasses>
274 NULL|ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf
275 }
276
277 MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
278 MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
279 MdeModulePkg/Universal/Metronome/Metronome.inf
280 PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf {
281 <LibraryClasses>
282 NULL|ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.inf
283 }
284
285 MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
286 MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
287 MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
288 MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
289 MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
290
291 MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
292
293 ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
294 ArmPkg/Drivers/TimerDxe/TimerDxe.inf {
295 <LibraryClasses>
296 NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
297 }
298
299 OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf {
300 <LibraryClasses>
301 # don't use unaligned CopyMem () on the UEFI varstore NOR flash region
302 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
303 }
304
305 MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
306
307 #
308 # Platform Driver
309 #
310 ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf
311 OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
312 EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
313 OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
314 OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
315 OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
316 OvmfPkg/VirtioNetDxe/VirtioNet.inf
317 OvmfPkg/VirtioRngDxe/VirtioRng.inf
318
319 #
320 # FAT filesystem + GPT/MBR partitioning + UDF filesystem
321 #
322 MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
323 MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
324 MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
325 FatPkg/EnhancedFatDxe/Fat.inf
326 MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
327
328 #
329 # Bds
330 #
331 MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
332 <LibraryClasses>
333 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
334 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
335 }
336 MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
337 MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
338 MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
339 MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
340 MdeModulePkg/Logo/LogoDxe.inf
341 MdeModulePkg/Application/UiApp/UiApp.inf {
342 <LibraryClasses>
343 NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf
344 NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
345 NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
346 }
347
348 #
349 # SCSI Bus and Disk Driver
350 #
351 MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
352 MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
353 #
354 # PCI support
355 #
356 ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf {
357 <LibraryClasses>
358 NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
359 NULL|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
360 }
361 MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf {
362 <LibraryClasses>
363 NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
364 NULL|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
365 }
366 MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {
367 <LibraryClasses>
368 NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
369 NULL|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
370 }
371 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
372 OvmfPkg/Virtio10Dxe/Virtio10.inf
373
374 #
375 # Rng Support
376 #
377 SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
378
379 !if $(ARCH) == AARCH64
380 #
381 # ACPI Support
382 #
383 ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManagerDxe.inf
384 !endif