2 # Workspace file for KVMTool virtual platform.
4 # Copyright (c) 2018 - 2021, 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
30 !include ArmVirtPkg/ArmVirt.dsc.inc
32 !if $(ARCH) == AARCH64
33 !include DynamicTablesPkg/DynamicTables.dsc.inc
36 !include MdePkg/MdeLibs.dsc.inc
38 [LibraryClasses.common]
39 ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
40 ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
43 VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
44 VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf
46 ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.inf
47 ArmVirtMemInfoLib|ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.inf
49 TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
50 NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf
52 CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
55 UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
56 PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
57 BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
59 CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
60 FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
62 FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
64 PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
65 PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
66 PciHostBridgeLib|OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
67 PciHostBridgeUtilityLib|ArmVirtPkg/Library/ArmVirtPciHostBridgeUtilityLib/ArmVirtPciHostBridgeUtilityLib.inf
69 TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
70 AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
72 PlatformPeiLib|ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf
74 PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
75 PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLib.inf
76 SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
78 HwInfoParserLib|DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParserLib.inf
79 DynamicPlatRepoLib|DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/DynamicPlatRepoLib.inf
81 [LibraryClasses.common.SEC, LibraryClasses.common.PEI_CORE, LibraryClasses.common.PEIM]
82 PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
83 PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf
84 SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
86 [LibraryClasses.common.UEFI_DRIVER]
87 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
90 *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
92 # We need to avoid jump tables in SEC and BASE modules, so that the PE/COFF
93 # self-relocation code itself is guaranteed to be position independent.
95 GCC:*_*_*_CC_XIPFLAGS = -fno-jump-tables
97 ################################################################################
99 # Pcd Section - list of all EDK II PCD Entries defined by this Platform
101 ################################################################################
103 [PcdsFeatureFlag.common]
104 ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.
105 # It could be set FALSE to save size.
106 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
107 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
109 # Use MMIO for accessing RTC controller registers.
110 gPcAtChipsetPkgTokenSpaceGuid.PcdRtcUseMmio|TRUE
112 [PcdsFixedAtBuild.common]
113 gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000000F
115 gArmPlatformTokenSpaceGuid.PcdCoreCount|1
117 !if $(ARCH) == AARCH64
118 gArmTokenSpaceGuid.PcdVFPEnabled|1
121 gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
122 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
123 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
125 # Size of the region used by UEFI in permanent memory (Reserved 64MB)
126 gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
130 # 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
131 gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
134 # ARM Virtual Architectural Timer -- fetch frequency from KVM
136 gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0
138 # Use MMIO for accessing Serial port registers.
139 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE
140 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialPciDeviceInfo|{0xFF}
142 gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
143 gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
146 # The maximum physical I/O addressability of the processor, set with
149 gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16
151 [PcdsPatchableInModule.common]
153 # This will be overridden in the code
155 gArmTokenSpaceGuid.PcdSystemMemoryBase|0x0
156 gArmTokenSpaceGuid.PcdSystemMemorySize|0x0
159 # The device tree base address is handed off by kvmtool.
160 # We are booting from RAM using the Linux kernel boot protocol,
161 # x0 will point to the DTB image in memory.
163 gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0
165 gArmTokenSpaceGuid.PcdFdBaseAddress|0x0
166 gArmTokenSpaceGuid.PcdFvBaseAddress|0x0
168 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x0
170 [PcdsDynamicDefault.common]
171 gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
173 gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|0x0
174 gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|0x0
175 gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum|0x0
176 gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum|0x0
179 # ARM General Interrupt Controller
181 gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
182 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
183 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
188 gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
190 # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this
191 # PCD and PcdPciDisableBusEnumeration above have not been assigned yet
192 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF
194 gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation|0x0
197 # Set video resolution for boot options and for text setup.
198 # PlatformDxe can set the former at runtime.
200 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800
201 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600
202 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640
203 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
205 # Setup Flash storage variables
206 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0
207 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x40000
208 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
209 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x40000
210 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
211 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x40000
213 ## RTC Register address in MMIO space.
214 gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister64|0x0
215 gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister64|0x0
217 ################################################################################
219 # Components Section - list of all EDK II Modules needed by this Platform
221 ################################################################################
226 ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf {
228 ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
229 LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
230 PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
231 HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
232 PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
233 MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
239 MdeModulePkg/Core/Dxe/DxeMain.inf {
241 NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
242 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
244 MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
246 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
250 # Architectural Protocols
252 ArmPkg/Drivers/CpuDxe/CpuDxe.inf
253 MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
254 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
256 NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
257 NULL|EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedLib.inf
258 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
261 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
262 MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
263 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf {
265 NULL|ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf
268 MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
269 MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
270 MdeModulePkg/Universal/Metronome/Metronome.inf
271 PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf {
273 NULL|ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.inf
276 MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
277 MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
278 MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
279 MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
280 MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
282 MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
284 ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
285 ArmPkg/Drivers/TimerDxe/TimerDxe.inf {
287 NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
290 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
292 MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
297 ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf
298 OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
299 EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
300 OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
301 OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
302 OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
303 OvmfPkg/VirtioNetDxe/VirtioNet.inf
304 OvmfPkg/VirtioRngDxe/VirtioRng.inf
307 # FAT filesystem + GPT/MBR partitioning + UDF filesystem
309 MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
310 MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
311 MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
312 FatPkg/EnhancedFatDxe/Fat.inf
313 MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
318 MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
320 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
321 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
323 MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
324 MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
325 MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
326 MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
327 MdeModulePkg/Logo/LogoDxe.inf
328 MdeModulePkg/Application/UiApp/UiApp.inf {
330 NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf
331 NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
332 NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
336 # SCSI Bus and Disk Driver
338 MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
339 MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
343 ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf {
345 NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
346 NULL|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
348 MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf {
350 NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
351 NULL|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
353 MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {
355 NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
356 NULL|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
358 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
359 OvmfPkg/Virtio10Dxe/Virtio10.inf
361 !if $(ARCH) == AARCH64
365 ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManagerDxe.inf