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.
8# SPDX-License-Identifier: BSD-2-Clause-Patent
13 DEFINE DEBUG_PRINT_ERROR_LEVEL = 0x80000047
15[LibraryClasses.common]
16!ifdef $(SOURCE_DEBUG_ENABLE)
17 PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
18 DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
20 PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
21 DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
22 DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
24!
if $(DEBUG_ON_SERIAL_PORT) ==
TRUE
25 DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
27 DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
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
64 # Ramdisk Requirements
66 FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
71 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
73 # Networking Requirements
74!
if $(NETWORK_TLS_ENABLE) ==
TRUE
75 TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
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
86 RealTimeClockLib|EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.inf
87 TimeBaseLib|EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf
90 DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
91 DebugAgentTimerLib|EmbeddedPkg/Library/DebugAgentTimerLibNull/DebugAgentTimerLibNull.inf
93 # Flattened Device Tree (FDT) access library
94 FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
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
105 UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
108 # CryptoPkg libraries needed by multiple firmware features
110 IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
111!
if $(NETWORK_TLS_ENABLE) ==
TRUE
112 OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
114 OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
116 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
117 RngLib|MdeModulePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf
120 # Secure Boot dependencies
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
128 # re-use the UserPhysicalPresent() dummy implementation from the ovmf tree
129 PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf
131 AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
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
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
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
161[LibraryClasses.common.DXE_DRIVER]
162 SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
163 MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
165[LibraryClasses.common.UEFI_APPLICATION]
166 MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
167 HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
169[LibraryClasses.common.UEFI_DRIVER]
170 MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
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
178 VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf
180!
if $(SECURE_BOOT_ENABLE) ==
TRUE
181 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
184################################################################################
186# Pcd Section - list of all EDK II PCD Entries defined by this Platform
188################################################################################
190[PcdsFeatureFlag.common]
191 gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|
FALSE
193 gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob|
TRUE
197 # Activate AcpiSdtProtocol
199 gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|
TRUE
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
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
218 gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2f
221 # DEBUG_INIT 0x00000001
222 # DEBUG_WARN 0x00000002
223 # DEBUG_LOAD 0x00000004
224 # DEBUG_FS 0x00000008
225 # DEBUG_POOL 0x00000010
226 # DEBUG_PAGE 0x00000020
227 # DEBUG_INFO 0x00000040
228 # DEBUG_DISPATCH 0x00000080
229 # DEBUG_VARIABLE 0x00000100
230 # DEBUG_BM 0x00000400
231 # DEBUG_BLKIO 0x00001000
232 # DEBUG_NET 0x00004000
233 # DEBUG_UNDI 0x00010000
234 # DEBUG_LOADFILE 0x00020000
235 # DEBUG_EVENT 0x00080000
236 # DEBUG_GCD 0x00100000
237 # DEBUG_CACHE 0x00200000
238 # DEBUG_VERBOSE 0x00400000
240 # DEBUG_ERROR 0x80000000
241!
if $(DEBUG_ON_SERIAL_PORT) ==
TRUE
242 gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|$(DEBUG_PRINT_ERROR_LEVEL)
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
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
263 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|300
264 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|150
265 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesCode|1000
267 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesData|6000
268 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderCode|20
269 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderData|0
272 # Enable strict image permissions for all images. (This applies
273 # only to images that were built with >= 4 KB section alignment.)
275 gEfiMdeModulePkgTokenSpaceGuid.PcdImageProtectionPolicy|0x3
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.
282 gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC000000000007FD5
288 MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
290 ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf {
292 gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|
FALSE
294 ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf {
296 gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|
FALSE
298 OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
300 gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|
FALSE
302 ShellPkg/Application/Shell/Shell.inf {
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
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
318 HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
319 PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
320 BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
323 gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
324 gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|
FALSE
325 gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
331 MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf {
333 NULL|EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf
EFI_STATUS EFIAPI BaseSerialPortLib16550(VOID)
EFI_STATUS EFIAPI ShellCEntryLib(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)