MdePkg and MdeModulePkg Pcd: Implement PCD Driver for External PCD Database and SKU enable Feature.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Bob C Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14857 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Bob C Feng
2013-11-18 07:45:49 +00:00
committed by lzeng14
parent e8a47801a1
commit 419db80bef
16 changed files with 879 additions and 529 deletions

View File

@@ -1,18 +1,19 @@
## @file
# PCD DXE driver manage database contains all dynamic PCD entries initialized in
# PEI phase, DXE phase and produce the implementation of PCD protocol.
# PCD DXE driver manage database contains all dynamic PCD entries and produce the implementation of PCD protocol.
#
# This version PCD DXE depends on the external PCD database binary file, not built in PCD data base.
# There are two PCD Protocols as follows:
# 1) PCD_PROTOCOL
# It is EDKII implementation which support Dynamic/DynamicEx type Pcds.
# 2) EFI_PCD_PROTOCOL_PPI
# 2) EFI_PCD_PROTOCOL
# It is defined by PI specification 1.2, Vol 3 which only support dynamicEx
# type Pcd.
#
# For dynamicEx type PCD, it is compatible between PCD_PPI and EFI_PEI_PCD_PPI.
# For dynamicEx type PCD, it is compatible between PCD_PROTOCOL and EFI_PCD_PROTOCOL.
# PCD DXE driver will produce above two protocols at same time.
#
# PCD database structure is generated at autogen.h/autogen.c in build time.
# PCD database is generated as the separate binary image at build time. The binary image
# will be intergrated into Firmware volume together with PCD driver.
#
# ////////////////////////////////////////////////////////////////////////////////
# // //
@@ -63,7 +64,7 @@
# b) Variable Storage:
# - The PCD value is stored in variable area.
# - As default storage type, this type PCD could be used for PEI/DXE driver
# communication. But beside it, this type PCD could alsp be used to store
# communication. But beside it, this type PCD could also be used to store
# the value associate with a HII setting via variable interface.
# - In PEI phase, the PCD value could only be got but can not be set due
# to variable area is readonly.
@@ -94,12 +95,12 @@
# PCD information used in PEI phase or use in both PEI/DXE phase. And DXE PCD
# database contains all PCDs used in PEI/DXE phase in memory.
#
# Build tool will generate PCD database into some C structure and variable for
# Build tool will generate PCD database into the separate binary file for
# PEI/DXE PCD driver according to dynamic PCD section in platform DSC file.
#
# 3.1 PcdPeim and PcdDxe
# PEI PCD database is maintained by PcdPeim driver run from flash. PcdPeim driver
# build guid hob in temporary memory and copy auto-generated C structure
# build guid hob in temporary memory and copy the binary data base from flash
# to temporary memory for PEI PCD database.
# DXE PCD database is maintained by PcdDxe driver.At entry point of PcdDxe driver,
# a new PCD database is allocated in boot-time memory which including all
@@ -185,8 +186,10 @@
# Based on local token number, PCD driver could fast determine PCD type, value
# type and get PCD entry from PCD database.
#
# 3.3 PCD Database C structure.
# PCD Database C structure is generated by build tools in PCD driver's autogen.h/
# 3.3 PCD Database binary file
# PCD Database binary file will be created at build time as the standalone binary image.
# To understand the binary image layout, PCD Database C structure is still generated
# as comments by build tools in PCD driver's autogen.h/
# autogen.c file. In generated C structure, following information is stored:
# - ExMapTable: This table is used translate a binary dynamicex type PCD's
# "tokenguid + token" to local token number.
@@ -195,7 +198,7 @@
# token number" as array index to get PCD entry's offset fastly.
# - SizeTable: This table stores the size information for all PCD entry.
# - GuidTable: This table stores guid value for DynamicEx's token space,
# HII type PCD's variable.
# HII type PCD's variable GUID.
# - SkuIdTable: TBD
# - SystemSkuId: TBD
# - PCD value structure:
@@ -275,8 +278,8 @@
# GuidTable array is used to store all related GUID value in PCD database:
# - Variable GUID for HII type PCD
# - Token space GUID for dynamicex type PCD
#
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
#
# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -293,7 +296,7 @@
BASE_NAME = PcdDxe
FILE_GUID = 80CF7257-87AB-47f9-A3FE-D50B76D89541
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
VERSION_STRING = 4.0
PCD_IS_DRIVER = DXE_PCD_DRIVER
ENTRY_POINT = PcdDxeInit
@@ -323,16 +326,18 @@
DebugLib
BaseLib
PcdLib
DxeServicesLib
[Guids]
gPcdDataBaseHobGuid ## CONSUMES ## Hob: GUID_EXTENSION
gPcdDataBaseHobGuid ## SOMETIMES_CONSUMES ## HOB
gPcdDataBaseSignatureGuid ## CONSUMES ## UNDEFINED # PCD database signature GUID.
[Protocols]
gPcdProtocolGuid ## PRODUCES
gEfiPcdProtocolGuid ## PRODUCES
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress
gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress ## SOMETIMES_CONSUMES
[Depex]
TRUE