TianoCore EDK2 master
Loading...
Searching...
No Matches
RiscVVirt.dsc.inc
1#
2# Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved.
3# Copyright (c) 2011 - 2022, ARM Limited. All rights reserved.
4# Copyright (c) 2014, Linaro Limited. All rights reserved.
5# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
6# Copyright (c) Microsoft Corporation.
7#
8# SPDX-License-Identifier: BSD-2-Clause-Patent
9#
10#
11
12[Defines]
13 DEFINE DEBUG_PRINT_ERROR_LEVEL = 0x80000047
14
15[LibraryClasses.common]
16!ifdef $(SOURCE_DEBUG_ENABLE)
17 PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
18 DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
19!else
20 PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
21 DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
22 DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
23!endif
24!if $(DEBUG_ON_SERIAL_PORT) == TRUE
25 DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
26!else
27 DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
28!endif
29 DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
30 PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
31 BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
32 SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
33 BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.inf
34 SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
35 PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
36 PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
37 PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
38 IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
39 UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
40 CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
41 CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
42 UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
43 HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
44 UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
45 DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
46 UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
47 DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
48 DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
49 UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
50 UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
51 HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
52 UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
53 SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
54 ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
55 ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
56 FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
57 PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
58 UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
59 OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
60 OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
61 PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
62
63 #
64 # Ramdisk Requirements
65 #
66 FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
67
68 # Allow dynamic PCDs
69 #
70
71 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
72
73 # Networking Requirements
74!if $(NETWORK_TLS_ENABLE) == TRUE
75 TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
76!endif
77
78 # RISC-V Architectural Libraries
79 CpuExceptionHandlerLib|UefiCpuPkg/Library/BaseRiscV64CpuExceptionHandlerLib/BaseRiscV64CpuExceptionHandlerLib.inf
80 RiscVSbiLib|MdePkg/Library/BaseRiscVSbiLib/BaseRiscVSbiLib.inf
81 RiscVFpuLib|UefiCpuPkg/Library/BaseRiscVFpuLib/BaseRiscVFpuLib.inf
82 RiscVMmuLib|UefiCpuPkg/Library/BaseRiscVMmuLib/BaseRiscVMmuLib.inf
83 PlatformBootManagerLib|OvmfPkg/RiscVVirt/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
84 ResetSystemLib|OvmfPkg/RiscVVirt/Library/ResetSystemLib/BaseResetSystemLib.inf
85
86 RealTimeClockLib|EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.inf
87 TimeBaseLib|EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf
88 SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
89
90 DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
91 DebugAgentTimerLib|EmbeddedPkg/Library/DebugAgentTimerLibNull/DebugAgentTimerLibNull.inf
92
93 # Flattened Device Tree (FDT) access library
94 FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
95
96 # PCI Libraries
97 PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
98 PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
99 PciCapLib|OvmfPkg/Library/BasePciCapLib/BasePciCapLib.inf
100 PciCapPciSegmentLib|OvmfPkg/Library/BasePciCapPciSegmentLib/BasePciCapPciSegmentLib.inf
101 PciCapPciIoLib|OvmfPkg/Library/UefiPciCapPciIoLib/UefiPciCapPciIoLib.inf
102 DxeHardwareInfoLib|OvmfPkg/Library/HardwareInfoLib/DxeHardwareInfoLib.inf
103
104 # USB Libraries
105 UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
106
107 #
108 # CryptoPkg libraries needed by multiple firmware features
109 #
110 IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
111!if $(NETWORK_TLS_ENABLE) == TRUE
112 OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
113!else
114 OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
115!endif
116 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
117 RngLib|MdeModulePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf
118
119 #
120 # Secure Boot dependencies
121 #
122!if $(SECURE_BOOT_ENABLE) == TRUE
123 AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf
124 SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLib.inf
125 SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariableProvisionLib.inf
126 PlatformPKProtectionLib|SecurityPkg/Library/PlatformPKProtectionLibVarPolicy/PlatformPKProtectionLibVarPolicy.inf
127
128 # re-use the UserPhysicalPresent() dummy implementation from the ovmf tree
129 PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf
130!else
131 AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
132!endif
133 VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
134 VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf
135 VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
136 VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
137 UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
138 ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
139 PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
140 ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
141 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
142 HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
143
144[LibraryClasses.common.SEC]
145 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
146 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
147 PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
148 ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
149 ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
150 PlatformSecLib|UefiCpuPkg/Library/PlatformSecLibNull/PlatformSecLibNull.inf
151 HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
152 PrePiHobListPointerLib|OvmfPkg/RiscVVirt/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
153 MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
154
155[LibraryClasses.common.DXE_CORE]
156 PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
157 HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
158 MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
159 DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
160
161[LibraryClasses.common.DXE_DRIVER]
162 SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
163 MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
164
165[LibraryClasses.common.UEFI_APPLICATION]
166 MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
167 HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
168
169[LibraryClasses.common.UEFI_DRIVER]
170 MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
171
172[LibraryClasses.common.DXE_RUNTIME_DRIVER]
173 MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
174 CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
175!if $(DEBUG_ON_SERIAL_PORT) == TRUE
176 DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf
177!endif
178 VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf
179
180!if $(SECURE_BOOT_ENABLE) == TRUE
181 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
182!endif
183
184################################################################################
185#
186# Pcd Section - list of all EDK II PCD Entries defined by this Platform
187#
188################################################################################
189
190[PcdsFeatureFlag.common]
191 gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
192
193 gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob|TRUE
194
195[PcdsFeatureFlag]
196 #
197 # Activate AcpiSdtProtocol
198 #
199 gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
200
201[PcdsFixedAtBuild.common]
202 gEfiMdePkgTokenSpaceGuid.PcdRiscVFeatureOverride|0xFFFFFFFFFFFFFFF0
203 gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1000000
204 gEfiMdePkgTokenSpaceGuid.PcdMaximumAsciiStringLength|1000000
205 gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|0
206 gEfiMdePkgTokenSpaceGuid.PcdSpinLockTimeout|10000000
207 gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|320
208
209 # DEBUG_ASSERT_ENABLED 0x01
210 # DEBUG_PRINT_ENABLED 0x02
211 # DEBUG_CODE_ENABLED 0x04
212 # CLEAR_MEMORY_ENABLED 0x08
213 # ASSERT_BREAKPOINT_ENABLED 0x10
214 # ASSERT_DEADLOOP_ENABLED 0x20
215!if $(DEBUG_ON_SERIAL_PORT) != TRUE
216 gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x21
217!else
218 gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2f
219!endif
220
221 # DEBUG_INIT 0x00000001 // Initialization
222 # DEBUG_WARN 0x00000002 // Warnings
223 # DEBUG_LOAD 0x00000004 // Load events
224 # DEBUG_FS 0x00000008 // EFI File system
225 # DEBUG_POOL 0x00000010 // Alloc & Free (pool)
226 # DEBUG_PAGE 0x00000020 // Alloc & Free (page)
227 # DEBUG_INFO 0x00000040 // Informational debug messages
228 # DEBUG_DISPATCH 0x00000080 // PEI/DXE/SMM Dispatchers
229 # DEBUG_VARIABLE 0x00000100 // Variable
230 # DEBUG_BM 0x00000400 // Boot Manager
231 # DEBUG_BLKIO 0x00001000 // BlkIo Driver
232 # DEBUG_NET 0x00004000 // SNP Driver
233 # DEBUG_UNDI 0x00010000 // UNDI Driver
234 # DEBUG_LOADFILE 0x00020000 // LoadFile
235 # DEBUG_EVENT 0x00080000 // Event messages
236 # DEBUG_GCD 0x00100000 // Global Coherency Database changes
237 # DEBUG_CACHE 0x00200000 // Memory range cachability changes
238 # DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may
239 # // significantly impact boot performance
240 # DEBUG_ERROR 0x80000000 // Error
241!if $(DEBUG_ON_SERIAL_PORT) == TRUE
242 gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|$(DEBUG_PRINT_ERROR_LEVEL)
243!endif
244
245 #
246 # Optional feature to help prevent EFI memory map fragments
247 # Turned on and off via: PcdPrePiProduceMemoryTypeInformationHob
248 # Values are in EFI Pages (4K). DXE Core will make sure that
249 # at least this much of each type of memory can be allocated
250 # from a single memory range. This way you only end up with
251 # maximum of two fragments for each type in the memory map
252 # (the memory used, and the free memory that was prereserved
253 # but not used).
254 #
255 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory|0
256 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS|0
257 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType|0
258!if $(SECURE_BOOT_ENABLE) == TRUE
259 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|600
260 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|400
261 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesCode|1500
262!else
263 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|300
264 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|150
265 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesCode|1000
266!endif
267 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesData|6000
268 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderCode|20
269 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderData|0
270
271 #
272 # Enable strict image permissions for all images. (This applies
273 # only to images that were built with >= 4 KB section alignment.)
274 #
275 gEfiMdeModulePkgTokenSpaceGuid.PcdImageProtectionPolicy|0x3
276
277 #
278 # Enable NX memory protection for all non-code regions, including OEM and OS
279 # reserved ones, with the exception of LoaderData regions, of which OS loaders
280 # (i.e., GRUB) may assume that its contents are executable.
281 #
282 gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC000000000007FD5
283
284[Components.common]
285 #
286 # Ramdisk support
287 #
288 MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
289
290 ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf {
291 <PcdsFixedAtBuild>
292 gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
293 }
294 ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf {
295 <PcdsFixedAtBuild>
296 gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
297 }
298 OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
299 <PcdsFixedAtBuild>
300 gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
301 }
302 ShellPkg/Application/Shell/Shell.inf {
303 <LibraryClasses>
304 ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
305 NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
306 NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
307 NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
308 NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
309 NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
310!if $(ACPIVIEW_ENABLE) == TRUE
311 NULL|ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.inf
312!endif
313 NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
314 NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
315!if $(NETWORK_IP6_ENABLE) == TRUE
316 NULL|ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.inf
317!endif
318 HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
319 PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
320 BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
321
322 <PcdsFixedAtBuild>
323 gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
324 gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
325 gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
326 }
327
328 #
329 # ACPI Support
330 #
331 MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf {
332 <LibraryClasses>
333 NULL|EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf
334 }
EFI_STATUS EFIAPI BaseSerialPortLib16550(VOID)
#define NULL
Definition: Base.h:319
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
EFI_STATUS EFIAPI ShellCEntryLib(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)