2 # Workspace file for KVMTool virtual platform.
4 # Copyright (c) 2018 - 2020, 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 !include MdePkg/MdeLibs.dsc.inc
34 [LibraryClasses.common]
35 ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
36 ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
39 VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
40 VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf
42 ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.inf
43 ArmVirtMemInfoLib|ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.inf
45 TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
46 NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf
48 CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
51 UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
52 PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
53 BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
55 CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
56 FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
58 FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
60 PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
61 PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
62 PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
63 PciHostBridgeUtilityLib|OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.inf
65 TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
66 AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
68 PlatformPeiLib|ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf
70 PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
71 PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLib.inf
72 SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
74 [LibraryClasses.common.SEC, LibraryClasses.common.PEI_CORE, LibraryClasses.common.PEIM]
75 PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
76 PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf
77 SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
79 [LibraryClasses.common.UEFI_DRIVER]
80 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
83 *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
85 # We need to avoid jump tables in SEC and BASE modules, so that the PE/COFF
86 # self-relocation code itself is guaranteed to be position independent.
88 GCC:*_*_*_CC_XIPFLAGS = -fno-jump-tables
90 ################################################################################
92 # Pcd Section - list of all EDK II PCD Entries defined by this Platform
94 ################################################################################
96 [PcdsFeatureFlag.common]
97 ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.
98 # It could be set FALSE to save size.
99 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
100 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
102 # Use MMIO for accessing RTC controller registers.
103 gPcAtChipsetPkgTokenSpaceGuid.PcdRtcUseMmio|TRUE
105 [PcdsFixedAtBuild.common]
106 gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000000F
108 gArmPlatformTokenSpaceGuid.PcdCoreCount|1
110 !if $(ARCH) == AARCH64
111 gArmTokenSpaceGuid.PcdVFPEnabled|1
114 gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
115 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
116 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
118 # Size of the region used by UEFI in permanent memory (Reserved 64MB)
119 gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
123 # 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
124 gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
127 # ARM Virtual Architectural Timer -- fetch frequency from KVM
129 gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0
131 # Use MMIO for accessing Serial port registers.
132 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE
133 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialPciDeviceInfo|{0xFF}
135 gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
136 gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
139 # The maximum physical I/O addressability of the processor, set with
142 gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16
144 [PcdsPatchableInModule.common]
146 # This will be overridden in the code
148 gArmTokenSpaceGuid.PcdSystemMemoryBase|0x0
149 gArmTokenSpaceGuid.PcdSystemMemorySize|0x0
152 # The device tree base address is handed off by kvmtool.
153 # We are booting from RAM using the Linux kernel boot protocol,
154 # x0 will point to the DTB image in memory.
156 gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0
158 gArmTokenSpaceGuid.PcdFdBaseAddress|0x0
159 gArmTokenSpaceGuid.PcdFvBaseAddress|0x0
161 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x0
163 [PcdsDynamicDefault.common]
164 gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
166 gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|0x0
167 gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|0x0
168 gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum|0x0
169 gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum|0x0
172 # ARM General Interrupt Controller
174 gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
175 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
176 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
179 # Set video resolution for boot options and for text setup.
180 # PlatformDxe can set the former at runtime.
182 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800
183 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600
184 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640
185 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
188 gArmVirtTokenSpaceGuid.PcdForceNoAcpi|TRUE
190 # Setup Flash storage variables
191 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0
192 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x40000
193 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
194 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x40000
195 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
196 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x40000
198 ## RTC Register address in MMIO space.
199 gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister64|0x0
200 gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister64|0x0
202 ################################################################################
204 # Components Section - list of all EDK II Modules needed by this Platform
206 ################################################################################
211 ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf {
213 ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
214 LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
215 PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
216 HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
217 PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
218 MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
224 MdeModulePkg/Core/Dxe/DxeMain.inf {
226 NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
227 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
229 MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
231 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
235 # Architectural Protocols
237 ArmPkg/Drivers/CpuDxe/CpuDxe.inf
238 MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
239 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
241 NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
242 NULL|EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedLib.inf
243 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
246 MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
247 MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
248 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf {
250 NULL|ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf
253 MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
254 MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
255 MdeModulePkg/Universal/Metronome/Metronome.inf
256 PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf {
258 NULL|ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.inf
261 MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
262 MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
263 MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
264 MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
265 MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
267 MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
269 ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
270 ArmPkg/Drivers/TimerDxe/TimerDxe.inf {
272 NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
275 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
277 MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
282 ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf
283 ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
284 ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
285 ArmVirtPkg/HighMemDxe/HighMemDxe.inf
286 OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
287 OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
288 OvmfPkg/VirtioNetDxe/VirtioNet.inf
289 OvmfPkg/VirtioRngDxe/VirtioRng.inf
292 # FAT filesystem + GPT/MBR partitioning + UDF filesystem
294 MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
295 MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
296 MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
297 FatPkg/EnhancedFatDxe/Fat.inf
298 MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
303 MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
305 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
306 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
308 MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
309 MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
310 MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
311 MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
312 MdeModulePkg/Logo/LogoDxe.inf
313 MdeModulePkg/Application/UiApp/UiApp.inf {
315 NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf
316 NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
317 NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
321 # SCSI Bus and Disk Driver
323 MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
324 MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf