summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/PCD/Dxe/Pcd.c
AgeCommit message (Collapse)AuthorFilesLines
2021-12-07MdeModulePkg: Apply uncrustify changesMichael Kubacki1-172/+185
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdeModulePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2021-12-07MdeModulePkg: Change OPTIONAL keyword usage styleMichael D Kinney1-5/+3
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760 Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2019-04-09MdeModulePkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney1-7/+1
https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
2018-11-27MdeModulePkg PCD: Add DynamicEx PcdVpdBaseAddress64 for non SPI platformLiming Gao1-0/+16
https://bugzilla.tianocore.org/show_bug.cgi?id=1356 Current PcdVpdBaseAddress is 32bit static Pcd. NON SPI platform needs to configure it as Dynamic PCD. Emulator platform (such as NT32) may set its value to 64bit address. To meet with this usage, 64bit DynamicEx PcdVpdBaseAddress64 is introduced. If its value is not zero, it will be used. If its value is zero, static PcdVpdBaseAddress will be used. When NON SPI platform enables VPD PCD, they need to set PcdVpdBaseAddress64. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Dandan Bi <dandan.bi@intel.com>
2018-10-15MdeModulePkg PcdDxe: ASSERT PcdSetNvStoreDefaultId setStar Zeng1-0/+5
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1245 In current implementation and according to the description in MdeModulePkg.dec, PcdSetNvStoreDefaultId should be set in PEI phase to take effect. This patch ASSERTs PcdSetNvStoreDefaultId set in PcdDxe to alert the invalid operation. Cc: Liming Gao <liming.gao@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
2018-06-28MdeModulePkg: Clean up source filesLiming Gao1-191/+191
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2018-02-27MdeModulePkg PCD: Add more debug message to show SkuId updateLiming Gao1-1/+5
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-12-25MdeModulePkg: Update PCD driver to support the optimized PcdDataBaseLiming Gao1-6/+10
https://bugzilla.tianocore.org/show_bug.cgi?id=546 BaseTools will generate the optimized PCD database to save the image size at build time for multiple SKUs. The optimized PCD database layout will be like below, the PCD database will be composed of the full default SKU data (PCD_DATABASE_INIT) and the non-default SKU delta data(PCD_DATABASE_SKU_DELTA). PCD driver will build HOB to store the full default SKU data, and patch HOB data based on non-default SKU delta data for the SKU set by SetSku(), it can save memory resource at boot time. // // PCD database layout: // +---------------------------------+ // | PCD_DATABASE_INIT (DEFAULT SKU) | // +---------------------------------+ // | PCD_DATABASE_SKU_DELTA (SKU A) | // +---------------------------------+ // | PCD_DATABASE_SKU_DELTA (SKU B) | // +---------------------------------+ // | ...... | // +---------------------------------+ // BaseTools, PCD database and driver updates are needed for this proposal. For single SKU (default) case, this proposal is expected to have no impact. For multi-SKU case, PCD database format will be changed. So, PcdDataBase Version is also updated from 6 to 7. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-05-19MdeModulePkg PCD: Fix TmpTokenSpaceBufferCount not assigned correctlyStar Zeng1-0/+1
When DynamicEx PCD is only used in PEI code, but not DXE code, current implementation of DxePcdGetNextTokenSpace does not assign TmpTokenSpaceBufferCount correctly, but leaves it as initial value, then DxePcdGetNextTokenSpace may return incorrect token space guid and status. This patch is to fix this issue. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-03-16MdeModulePkg PCD: Allow SkuId to be changed only onceStar Zeng1-4/+23
Current PI spec has no clear description about whether the SkuId could be changed multiple times or not during one boot. If the SkuId could be changed multiple times during one boot, different modules may get inconsistent PCD values. And DynamicHii PCD maps to UEFI variable, once one DynamicHii PCD(UEFI variable) is set for one SkuId, then the PCD value will be always from UEFI variable but not PCD database, even the SkuId is set to other value. This patch is to update PCD drivers to allow SkuId to be changed only once during one boot. Cc: Liming Gao <liming.gao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-09-20MdeModulePkg PCD: Update PCD database structure definition to match BaseToolsStar Zeng1-1/+1
To follow PI1.4a, BaseTools has be updated to fix artificial limitation of SkuId range. This patch is to update PCD database structure definition to match BaseTools. Note: The source code and BaseTools need to be upgraded at the same time, and if they are not upgraded at the same time, build error like below will be triggered to help user identify the problem. "Please make sure the version of PCD PEIM Service and the generated PCD PEI Database match." Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-05-23MdeModulePkg PCD: Follow PI1.4a to fix artificial limitation of SkuId rangeStar Zeng1-3/+3
There is absolutely no reason to artificially limit the SKU range to 1-255. PI1.4a spec fixed the artificial limitation. This patch is to follow PI1.4a spec to remove the sentence "The valid SkuId range is 1 to 255." from SetSku function comments. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2015-04-14MdeModulePkg Pcd: Check the input SkuId in SetSku()Star Zeng1-16/+25
then GetSku() could return the currently active SkuId. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17173 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-10MdeModulePkg: Add ATTRIBUTE (+/-RT, RO) support in PCD declaration in DSC file.Star Zeng1-2/+15
Also update PCD_SERVICE_PEI_VERSION and PCD_SERVICE_DXE_VERSION to match with the new PcdDataBase binary generated by BaseTools. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17161 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-29MdeModulePkg Pcd DXE: Handle the case gPcdDataBaseHobGuid HOB is not present.Star Zeng1-2/+2
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15027 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-20MdeModulePkg and Nt32Pkg Pcd: Add the new EFI_GET_PCD_INFO_PROTOCOL and ↵Star Zeng1-4/+4
EFI_GET_PCD_INFO_PPI support for PI 1.2.1 compliance. It has no obviously benefit to reduce size by PcdPcdInfoGeneration, so remove this PCD. And PCD_INFO_GENERATION flag can be used to enable/disable PCD info feature, a sample is added in Nt32Pkg to show how to use this flag. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14869 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-20MdePkg and MdeModulePkg Pcd: Add the new EFI_GET_PCD_INFO_PROTOCOL and ↵Star Zeng1-1/+99
EFI_GET_PCD_INFO_PPI support for PI 1.2.1 compliance. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14866 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-18MdePkg and MdeModulePkg Pcd: Implement PCD Driver for External PCD Database ↵Bob C Feng1-70/+88
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
2010-04-24Update the copyright notice formathhtian1-2/+2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10418 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-04Change back the TPL of PCD from TPL_CALLBACK to TPL_NOTIFY because the ↵niruiyu1-1/+1
following issue is found: When we manually connect a device path mapping to the serial terminal with non-default band rate, the SerialIo driver would Reinstall its device path protocol eventually causing ConSplitter::DriverBindingStart() to run and finally would call PcdGet32 (PcdConOutColumn) in ConsplitterSetConsoleOutMode(). Since SerialIo driver raises TPL to TPL_NOTIFY initially, the call to PcdGet32 would cause TPL assertion if TPL of PCD is TPL_CALLBACK. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10188 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-22TPL of Pcd Dxe driver was changed to TPL_CALLBACK from TPL_NOTIFY to follow ↵niruiyu1-1/+1
UEFI spec that caller of variable interface should run at TPL <= TPL_CALLBACK. The change is to enable PcdsDynamicHii in Duet platform. Duet's variable driver should run at TPL <= TPL_CALLBACK so Pcd Dxe driver should run at TPL <= TPL_CALLBACK. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10040 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-11Coding style fix and minor improvements.rsun31-2/+2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9977 6f19259b-4bc3-4df7-8a09-765794883524
2009-11-24Clean up code.klu21-19/+14
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9471 6f19259b-4bc3-4df7-8a09-765794883524
2009-11-231, Correct the PCD PEIM to produce gEfiPcdPpi and gPcdPpi at same time;klu21-20/+22
2, Combine two action of InstallProtocolInstance for gEfiPcdProtocol and gPcdProtocol into InstallMultipleProtocolInstances. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9468 6f19259b-4bc3-4df7-8a09-765794883524
2009-11-10Make PcdPeim/PcdDxe driver also produce EFI_PCD_PPI/EFI_PCD_PROTOCOL defined ↵klu21-1/+34
in PI 1.2 vol3. The EFI_PCD_PPI/EFI_PCD_PROTOCOL only support dynamic-ex type PCD, but original PCD_PPI/PCD_PROTOCOL in MdePkg support dynamic and dynamic-ex type PCDs. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9401 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-06Synchronize PCD_Infrastructure 0.55 with source code.klu21-12/+22
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8249 6f19259b-4bc3-4df7-8a09-765794883524
2009-02-25Add a work around to set the PCD protocol lock to TPL_NOTIFY to relax the ↵qhuang81-1/+1
restriction on caller of PCD protocol. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7695 6f19259b-4bc3-4df7-8a09-765794883524
2009-02-25Use single one PcdFrameworkCompatibilitySupport PCD to support framework HII ↵lgao41-12/+1
and FvHob. Remove patchable type Flash related PCD. Simplify single one PcdPeiFullPcdDatabaseEnable to produce full or minimal Pei PCD services. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7678 6f19259b-4bc3-4df7-8a09-765794883524
2009-02-10Correct typo in comments, clean IfrSupportLib.hlgao41-3/+0
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7494 6f19259b-4bc3-4df7-8a09-765794883524
2009-02-01Update the protocol function to return EFI_INVALID_PARAMETER if ↵qwang121-3/+6
CallBackFunction == NULL. The PCD library function will do ASSERT if CallBackFunction is NULL. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7385 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-27Fix ECC issue for PCD Dxe and Peimklu21-2/+0
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6745 6f19259b-4bc3-4df7-8a09-765794883524
2008-10-30Patch to remove STATIC modifier. This is on longer recommended by EFI ↵jji41-2/+2
Framework coding style. All duplicated symbols has been renamed accordingly. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6296 6f19259b-4bc3-4df7-8a09-765794883524
2008-07-10Add function header and pass ECC toolsklu21-16/+454
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5443 6f19259b-4bc3-4df7-8a09-765794883524
2007-07-10Removed CommonHeader.h from MdePkg & MdeModulePkgAJFISH1-5/+0
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3180 6f19259b-4bc3-4df7-8a09-765794883524
2007-07-03Import PCD dxe and PCD pei modules.vanjeff1-0/+737
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2994 6f19259b-4bc3-4df7-8a09-765794883524