2 # Workspace file for KVMTool virtual platform.
4 # Copyright (c) 2018 - 2022, ARM Limited. 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 = 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)
23 OUTPUT_DIRECTORY = Build/ArmVirtKvmTool-$(ARCH)
25 SUPPORTED_ARCHITECTURES = AARCH64|ARM
26 BUILD_TARGETS = DEBUG|RELEASE
27 SKUID_IDENTIFIER = DEFAULT
28 FLASH_DEFINITION = ArmVirtPkg/ArmVirtKvmTool.fdf
31 DEFINE ACPIVIEW_ENABLE = TRUE
33 !include ArmVirtPkg/ArmVirt.dsc.inc
35 !if $(ARCH) == AARCH64
36 !include DynamicTablesPkg/DynamicTables.dsc.inc
39 !include MdePkg/MdeLibs.dsc.inc
41 [LibraryClasses.common]
42 ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
43 ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
46 VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
47 VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf
49 ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.inf
50 ArmVirtMemInfoLib|ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.inf
52 TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
53 NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf
55 CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
58 UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
59 PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
60 BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
62 CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
63 FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
65 FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
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
72 TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
73 AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
75 PlatformPeiLib|ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf
77 PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
78 PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLib.inf
79 SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
81 HwInfoParserLib|DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParserLib.inf
82 DynamicPlatRepoLib|DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/DynamicPlatRepoLib.inf
84 [LibraryClasses.common.SEC, LibraryClasses.common.PEI_CORE, LibraryClasses.common.PEIM]
85 PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
86 PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf
87 SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
89 [LibraryClasses.common.UEFI_DRIVER]
90 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
93 *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
95 # We need to avoid jump tables in SEC and BASE modules, so that the PE/COFF
96 # self-relocation code itself is guaranteed to be position independent.
98 GCC:*_*_*_CC_XIPFLAGS = -fno-jump-tables
100 ################################################################################
102 # Pcd Section - list of all EDK II PCD Entries defined by this Platform
104 ################################################################################
106 [PcdsFeatureFlag.common]
107 ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.
108 # It could be set FALSE to save size.
109 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
110 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
112 # Use MMIO for accessing RTC controller registers.
113 gPcAtChipsetPkgTokenSpaceGuid.PcdRtcUseMmio|TRUE
115 [PcdsFixedAtBuild.common]
116 gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000000F
118 gArmPlatformTokenSpaceGuid.PcdCoreCount|1
120 !if $(ARCH) == AARCH64
121 gArmTokenSpaceGuid.PcdVFPEnabled|1
124 gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
125 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
126 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
128 # Size of the region used by UEFI in permanent memory (Reserved 64MB)
129 gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
133 # 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
134 gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
137 # ARM Virtual Architectural Timer -- fetch frequency from KVM
139 gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0
141 # Use MMIO for accessing Serial port registers.
142 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE
143 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialPciDeviceInfo|{0xFF}
145 gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
146 gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
149 # The maximum physical I/O addressability of the processor, set with
152 gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16
154 [PcdsPatchableInModule.common]
156 # This will be overridden in the code
158 gArmTokenSpaceGuid.PcdSystemMemoryBase|0x0
159 gArmTokenSpaceGuid.PcdSystemMemorySize|0x0
162 # The device tree base address is handed off by kvmtool.
163 # We are booting from RAM using the Linux kernel boot protocol,
164 # x0 will point to the DTB image in memory.
166 gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0
168 gArmTokenSpaceGuid.PcdFdBaseAddress|0x0
169 gArmTokenSpaceGuid.PcdFvBaseAddress|0x0
171 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x0
174 gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0|5
176 [PcdsDynamicDefault.common]
177 gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|0x0
178 gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|0x0
179 gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum|0x0
180 gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum|0x0
183 # ARM General Interrupt Controller
185 gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
186 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
187 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
192 gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
194 # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this
195 # PCD and PcdPciDisableBusEnumeration above have not been assigned yet
196 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF
198 gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation|0x0
201 # Set video resolution for boot options and for text setup.
202 # PlatformDxe can set the former at runtime.
204 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800
205 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600
206 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640
207 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
209 # Setup Flash storage variables
210 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0
211 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x40000
212 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
213 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x40000
214 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
215 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x40000
217 ## RTC Register address in MMIO space.
218 gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister64|0x0
219 gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister64|0x0
221 ################################################################################
223 # Components Section - list of all EDK II Modules needed by this Platform
225 ################################################################################
230 ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf {
232 ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
233 LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
234 PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
235 HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
236 PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
237 MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
243 MdeModulePkg/Core/Dxe/DxeMain.inf {
245 NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
246 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
248 MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
250 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
254 # Architectural Protocols
256 ArmPkg/Drivers/CpuDxe/CpuDxe.inf
257 MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
258 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
260 NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
261 NULL|EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedLib.inf
262 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
265 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
266 MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
267 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf {
269 NULL|ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf
272 MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
273 MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
274 MdeModulePkg/Universal/Metronome/Metronome.inf
275 PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf {
277 NULL|ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.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 MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
286 MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
288 ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
289 ArmPkg/Drivers/TimerDxe/TimerDxe.inf {
291 NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
294 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
296 MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
301 ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf
302 OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
303 EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
304 OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
305 OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
306 OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
307 OvmfPkg/VirtioNetDxe/VirtioNet.inf
308 OvmfPkg/VirtioRngDxe/VirtioRng.inf
311 # FAT filesystem + GPT/MBR partitioning + UDF filesystem
313 MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
314 MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
315 MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
316 FatPkg/EnhancedFatDxe/Fat.inf
317 MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
322 MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
324 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
325 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
327 MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
328 MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
329 MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
330 MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
331 MdeModulePkg/Logo/LogoDxe.inf
332 MdeModulePkg/Application/UiApp/UiApp.inf {
334 NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf
335 NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
336 NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
340 # SCSI Bus and Disk Driver
342 MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
343 MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
347 ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf {
349 NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
350 NULL|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
352 MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf {
354 NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
355 NULL|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
357 MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {
359 NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
360 NULL|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
362 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
363 OvmfPkg/Virtio10Dxe/Virtio10.inf
365 !if $(ARCH) == AARCH64
369 ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManagerDxe.inf