X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FLibrary%2FDxePcdLib%2FDxePcdLib.inf;h=3d4d21b442b4879c6ffb0b06a40994f805196787;hb=HEAD;hp=de59815f97c65b2adad78d5d92075e0815ef5e09;hpb=25366245f586af7de63fa60ba328879707f25563;p=mirror_edk2.git diff --git a/MdePkg/Library/DxePcdLib/DxePcdLib.inf b/MdePkg/Library/DxePcdLib/DxePcdLib.inf index de59815f97..3d4d21b442 100644 --- a/MdePkg/Library/DxePcdLib/DxePcdLib.inf +++ b/MdePkg/Library/DxePcdLib/DxePcdLib.inf @@ -1,37 +1,44 @@ -#/** @file -# PCD Library instance implemented with PCD Protocol +## @file +# Instance of PCD Library using PCD Protocol. # -# This library instance implement the APIs listed -# in PCD library class defined in MDE library specification. -# It is used by modules in DXE phase. -# Copyright (c) 2007, Intel Corporation. +# There are two PCD protocols as follows: +# 1) PCD_PROTOCOL +# It is EDKII implementation which support Dynamic/DynamicEx Pcds. +# 2) EFI_PCD_PROTOCOL +# It is defined by PI specification 1.2, Vol 3 which only support dynamicEx +# type Pcd. # -# All rights reserved. This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# For dynamicEx type PCD, it is compatible between PCD_PROTOCOL and EFI_PCD_PROTOCOL. # +# This library instance uses the PCD_PROTOCOL to handle dynamic PCD request and use +# EFI_PCD_PROTOCOL to handle dynamicEx type PCD. # -#**/ +# Note: A driver of type DXE_RUNTIME_DRIVER and DXE_SMM_DRIVER can only use this DxePcdLib +# in their initialization without any issues to access Dynamic and DynamicEx PCD. They can't +# access Dynamic and DynamicEx PCD in the implementation of runtime services and SMI handlers. +# Because EFI_PCD_PROTOCOL is DXE protocol that is not available in OS runtime phase. +# +# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# +## [Defines] INF_VERSION = 0x00010005 BASE_NAME = DxePcdLib + MODULE_UNI_FILE = DxePcdLib.uni FILE_GUID = af97eb89-4cc6-45f8-a514-ca025b346480 MODULE_TYPE = DXE_DRIVER VERSION_STRING = 1.0 - LIBRARY_CLASS = PcdLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER - EDK_RELEASE_VERSION = 0x00020000 - EFI_SPECIFICATION_VERSION = 0x00020000 - CONSTRUCTOR = PcdLibConstructor + LIBRARY_CLASS = PcdLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER SMM_CORE UEFI_APPLICATION UEFI_DRIVER # -# VALID_ARCHITECTURES = IA32 X64 IPF EBC +# VALID_ARCHITECTURES = IA32 X64 EBC # -[Sources.common] +[Sources] DxePcdLib.c @@ -46,8 +53,11 @@ [Protocols] - gPcdProtocolGuid # PROTOCOL ALWAYS_CONSUMED + gPcdProtocolGuid ## SOMETIMES_CONSUMES + gEfiPcdProtocolGuid ## CONSUMES + gGetPcdInfoProtocolGuid ## SOMETIMES_CONSUMES + gEfiGetPcdInfoProtocolGuid ## SOMETIMES_CONSUMES -[Depex] - gPcdProtocolGuid +[Depex.common.DXE_DRIVER, Depex.common.DXE_RUNTIME_DRIVER, Depex.common.DXE_SAL_DRIVER, Depex.common.DXE_SMM_DRIVER] + gEfiPcdProtocolGuid