Commit Graph

120 Commits

Author SHA1 Message Date
Michael D Kinney 9d510e61fc MdeModulePkg: Replace BSD License with BSD+Patent License
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>
2019-04-09 10:58:08 -07:00
Liming Gao 534efca06f MdeModulePkg PCD: Add DynamicEx PcdVpdBaseAddress64 for non SPI platform
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-11-27 11:29:21 +08:00
Star Zeng 425084cd45 MdeModulePkg PcdDxe: ASSERT PcdSetNvStoreDefaultId set
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-10-15 14:11:31 +08:00
Chen A Chen de005223b7 MdeModulePkg: Removing ipf which is no longer supported from edk2.
Removing rules for Ipf sources file:
* Remove the source file which path with "ipf" and also listed in
  [Sources.IPF] section of INF file.
* Remove the source file which listed in [Components.IPF] section
  of DSC file and not listed in any other [Components] section.
* Remove the embedded Ipf code for MDE_CPU_IPF.

Removing rules for Inf file:
* Remove IPF from VALID_ARCHITECTURES comments.
* Remove DXE_SAL_DRIVER from LIBRARY_CLASS in [Defines] section.
* Remove the INF which only listed in [Components.IPF] section in DSC.
* Remove statements from [BuildOptions] that provide IPF specific flags.
* Remove any IPF sepcific sections.

Removing rules for Dec file:
* Remove [Includes.IPF] section from Dec.

Removing rules for Dsc file:
* Remove IPF from SUPPORTED_ARCHITECTURES in [Defines] section of DSC.
* Remove any IPF specific sections.
* Remove statements from [BuildOptions] that provide IPF specific flags.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2018-09-06 15:25:16 +08:00
Liming Gao d1102dba72 MdeModulePkg: Clean up source files
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-06-28 11:19:45 +08:00
Gao, Liming e8d2a98052 MdeModulePkg PCD: Remove unused PCD attribute PCD_TYPE_SKU_ENABLED
PcdDb optimization has handled PCD DB for each SKU, not for single PCD.
So, this PCD attribute is not used any more.

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-03-13 15:57:05 +08:00
Liming Gao f0c69b614c MdeModulePkg PCD: Fix the issue to set the big SkuId
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>
2018-02-27 18:43:31 +08:00
Liming Gao f71503c37c MdeModulePkg PCD: Add more debug message to show SkuId update
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>
2018-02-27 18:43:30 +08:00
Liming Gao 7c73626513 MdeModulePkg: Update PCD driver to support the optimized PcdDataBase
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-12-25 11:05:57 +08:00
Liming Gao 219247e164 MdeModulePkg PCD: Enable Firmware to retrieve the default setting
https://bugzilla.tianocore.org/show_bug.cgi?id=611
Update PCD driver to retrieve the default setting and set the initial
EFI variable when PcdSetNvStoreDefaultId is set.

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-12-25 11:05:57 +08:00
Star Zeng da0df6ca8f MdeModulePkg PCD: Fix TmpTokenSpaceBufferCount not assigned correctly
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-05-19 11:32:11 +08:00
Liming Gao 307a19a7ec MdeModulePkg: Remove unsupported PcdExpression usage in module INF
https://bugzilla.tianocore.org/show_bug.cgi?id=442

PcdExpression used in INF to control PCD and Source is unsupported feature.
Current sample usage in module INF brings confuse.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-04-06 12:54:49 +08:00
Star Zeng 2db48a1ff4 MdeModulePkg PCD: Allow SkuId to be changed only once
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>
2017-03-16 10:17:00 +08:00
Hao Wu 16f6922709 MdeModulePkg: Refine casting expression result to bigger size
There are cases that the operands of an expression are all with rank less
than UINT64/INT64 and the result of the expression is explicitly cast to
UINT64/INT64 to fit the target size.

An example will be:
UINT32 a,b;
// a and b can be any unsigned int type with rank less than UINT64, like
// UINT8, UINT16, etc.
UINT64 c;
c = (UINT64) (a + b);

Some static code checkers may warn that the expression result might
overflow within the rank of "int" (integer promotions) and the result is
then cast to a bigger size.

The commit refines codes by the following rules:
1). When the expression is possible to overflow the range of unsigned int/
int:
c = (UINT64)a + b;

2). When the expression will not overflow within the rank of "int", remove
the explicit type casts:
c = a + b;

3). When the expression will be cast to pointer of possible greater size:
UINT32 a,b;
VOID *c;
c = (VOID *)(UINTN)(a + b); --> c = (VOID *)((UINTN)a + b);

4). When one side of a comparison expression contains only operands with
rank less than UINT32:
UINT8 a;
UINT16 b;
UINTN c;
if ((UINTN)(a + b) > c) {...} --> if (((UINT32)a + b) > c) {...}

For rule 4), if we remove the 'UINTN' type cast like:
if (a + b > c) {...}
The VS compiler will complain with warning C4018 (signed/unsigned
mismatch, level 3 warning) due to promoting 'a + b' to type 'int'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
2017-03-06 14:33:20 +08:00
Cinnamon Shia bfb4c2ba37 MdeModulePkg/PCD: Fix PcdGetNextToken may get a wrong PCD token
If there are two DynamicEx PCDs have the same PCD token number but
in different PCD token spaces, the PcdGetNextToken function may get
the wrong PCD token.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2016-11-03 11:00:52 +08:00
Star Zeng b6e89910dd MdeModulePkg PCD: Update PCD database structure definition to match BaseTools
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-09-20 16:50:52 +08:00
Star Zeng c73cf87552 MdeModulePkg PCD: Avoid DynamicHii PCD set to override other values
When Hii variable is not present and if we try to update a variable offset
with some value, we are creating a new variable by Zeroing all the variable
offsets except the one which we are trying to update.
This will override all the other variable default values which are
programmed as a part of initial PCD definition.

DXE PCD driver could be enhanced to combine the DynamicHii
PCDs(related to same variable) default values and only update the offset
PcdSetXXX want to set, then set the combined values to variable.

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>
2016-06-20 17:27:58 +08:00
Star Zeng 120ca3ceae MdeModulePkg PCD: Follow PI1.4a to fix artificial limitation of SkuId range
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>
2016-05-23 10:48:52 +08:00
Jordan Justen 3f5287971f MdeModulePkg: Convert all .uni files to utf-8
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py MdeModulePkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19257 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-15 04:56:23 +00:00
Qiu Shumin e85e284e25 MdeModulePkg/Universal/PCD: Use safe string functions to refine code.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17786 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 08:27:03 +00:00
Star Zeng a856128a15 MdeModulePkg PcdDxe: TokenNumber should start from 1.
Because 0 is reserved as invalid token number.

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@17613 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-11 01:23:15 +00:00
Laszlo Ersek a78d3a279b MdeModulePkg: PCD/Pei: eliminate unused but set variable
- SVN r14866:

  MdePkg and MdeModulePkg Pcd: Add the new EFI_GET_PCD_INFO_PROTOCOL and
  EFI_GET_PCD_INFO_PPI support for PI 1.2.1 compliance.

added the "DataBase" local variable to PcdPeimInit(), and both set it and
used it.

- SVN r14869:

  MdeModulePkg and Nt32Pkg Pcd: Add the new EFI_GET_PCD_INFO_PROTOCOL and
  EFI_GET_PCD_INFO_PPI support for PI 1.2.1  compliance.

changed the PcdPeimInit() function, but "DataBase" remained both set and
used.

- SVN r17173:

  MdeModulePkg Pcd: Check the input SkuId in SetSku()

changed the function again; and this time "DataBase" became
set-but-unused. It triggers the following build error, when building
ArmVirtualizationQemu.dsc with gcc-4.8:

  MdeModulePkg/Universal/PCD/Pei/Pcd.c:150:21: error: variable 'DataBase'
  set but not used [-Werror=unused-but-set-variable]
     PEI_PCD_DATABASE  *DataBase;
                       ^
  cc1: all warnings being treated as errors

Fix the error by removing the DataBase variable, restoring the pre-r14866
state locally, when the BuildPcdDatabase() function was called, but its
return value was thrown away.

Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17179 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-15 01:06:15 +00:00
Star Zeng 85d0b97d8d MdeModulePkg Pcd: Check the input SkuId in SetSku()
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-14 08:54:11 +00:00
Star Zeng 23f3e119c7 MdeModulePkg: Add ATTRIBUTE (+/-RT, RO) support in PCD declaration in DSC file.
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
2015-04-10 09:01:46 +00:00
Samer El-Haj-Mahmoud 8cc87d32c6 Fix an issue in the PCD service to prevent potential out of bound array access
that can cause an exception. mPeiExMapppingTableSize is the table size, but the 
code needs to check the entry number.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hp.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16448 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-26 07:17:31 +00:00
Gao, Liming 35c77daed9 MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files.
1. Module UNI and Package UNI files are not DOS format. Convert them to DOS format.
2. Remove unused SectionExtractionDxeModStrs.uni and SectionExtractionPeiModStrs.uni

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16044 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-03 08:39:12 +00:00
Zeng, Star fea55a1661 MdeModulePkg: INF/DEC file updates to EDK II packages
2. Add MODULE_UNI_FILE file that contains the localized Abstract and Description of a module.
a. Addresses an information gap between INF files and the UEFI Distribution Packaging Specification XML schema
b. There will be an associated update to UPT in BaseTools to consume MODULE_UNI_FILE and associated UNI file during UDP creation that performs the INF -> XML conversion.
c. There will be an associated update to UPT in BaseTools to produce MODULE_UNI_FILE and associated UNI file during UDP installation that performs the XML -> INF conversion.

3. Add Module Extra UNI file that provides the localized Name of a module.
a. [UserExtensions.TianoCore."ExtraFiles"] provides an easy method for a module to specify extra files not listed in [Sources] or [Binaries] sections to be added to a UDP without having to list the files in the UPT package information data file.
b. There will be an associated update to UPT in BaseTools to package up files listed in [UserExtensions.TianoCore."ExtraFiles"] during UDP creation.
c. UNI file contains localized name of a module to go along with the localized Abstract and Description from the MODULE_UNI_FILE.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zeng, Star <star.zeng@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15963 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-28 06:53:43 +00:00
Zeng, Star 6036e94dc9 MdeModulePkg: INF/DEC file updates to EDK II packages
1. Usage information in INF file comment blocks are either incomplete or incorrect.  
This includes usage information for Protocols/PPIs/GUIDs/PCDs/HOBs/Events/BootModes.  
The syntax for usage information in comment blocks is defined in the EDK II Module Information (INF) Specification

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zeng, Star <star.zeng@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15962 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-28 06:34:06 +00:00
Star Zeng 553e86699d MdeModulePkg PCD: Fix PCD driver to return default data if size mismatch.
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@15357 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-21 01:16:07 +00:00
Star Zeng efd6b412c6 MdeModulePkg Pcd DXE: Handle the case gPcdDataBaseHobGuid HOB is not present.
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-12-29 07:14:57 +00:00
Star Zeng d5ad0813ac MdeModulePkg Pcd(DXE): Use correct TokenNumber to call GetPtrTypeSize () when SKU ID enabled.
In GetLocalTokenNumber () of Service.c(DXE), the TokenNumber is wrong to call GetPtrTypeSize ().
GetPtrTypeSize need the original TokenNumber.

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: Bob C Feng <bob.c.feng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14936 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-06 09:24:47 +00:00
Star Zeng b5bd21b012 MdeModulePkg Pcd: Refine the code to avoid error report.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14924 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-02 10:18:59 +00:00
Star Zeng f47fc1cb25 MdeModulePkg Pcd: Refine the code to avoid error report.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14879 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-21 09:31:28 +00:00
Gary Ching-Pang Lin 2fc67057f0 MdeModulePkg Pcd: Remove the EFIAPI of PeiGetPcdInfo () typedef in Service.h.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14873 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-20 11:21:06 +00:00
Star Zeng 61d8989f87 MdeModulePkg and Nt32Pkg Pcd: Add the new EFI_GET_PCD_INFO_PROTOCOL and 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-20 02:04:23 +00:00
Star Zeng 96d6d004aa MdePkg and MdeModulePkg Pcd: Add the new EFI_GET_PCD_INFO_PROTOCOL and 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-20 00:44:25 +00:00
Star Zeng 7df095713a MdeModulePkg Pcd: Refine the code to avoid error report.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14861 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-19 05:42:51 +00:00
Bob C Feng 419db80bef 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
2013-11-18 07:45:49 +00:00
lgao4 0b1ef27500 Adds ASSERT check in DxePcd driver when error status of read DynamicHii PCD is not EFI_NOT_FOUND to avoid the incorrect value is used.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14147 6f19259b-4bc3-4df7-8a09-765794883524
2013-02-27 03:01:40 +00:00
lgao4 6cfc729256 Update string offset and default offset from UINT16 to STRING_HEAD to match the generated PCD database.
Signed-off-by: lgao4
Reviewed-by: jliu66

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13081 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-06 08:47:29 +00:00
lgao4 e9d97d08d9 Enable PCD version check on PCD driver and PCD database.
Signed-off-by: lgao4
Reviewed-by: jliu66 djboyer

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13015 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-15 03:33:03 +00:00
lgao4 cb40609c75 Update PcdSetPtr() API to set the output buffer size to the max buffer size when the input buffer size is larger than the max buffer size. This behavior follows API description.
Signed-off-by: lgao4
Reviewed-by: jlin16

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12875 6f19259b-4bc3-4df7-8a09-765794883524
2011-12-15 06:56:57 +00:00
lgao4 573e0a48c8 Correctly use GetPtrTypeSize() to get MaxSize.
Signed-off-by: lgao4


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12790 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-28 03:43:26 +00:00
lgao4 648944102a Fix PcdSetPtr() service to use the max buffer size to check whether new buffer data is filled into.
Signed-off-by: lgao4
Reviewed-by: jlin16

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12789 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-28 03:36:25 +00:00
ydong10 639710791a Enhance inf and dec file to follow specs.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11392 6f19259b-4bc3-4df7-8a09-765794883524
2011-03-14 08:43:59 +00:00
hhtian e5eed7d364 Update the copyright notice format
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10418 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-24 09:33:45 +00:00
klu2 8ec8bed439 1, For Pcd_PPI, UnregistedCallBack should return EFI_INVALID_PARAMETER if Callback function can not be found.
2, PCD_PPI/PROTOCOL should return EFI_INVALID_PARAMETER if size is unmatched

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10276 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-18 06:24:53 +00:00
niruiyu 6a429dfa5f Change back the TPL of PCD from TPL_CALLBACK to TPL_NOTIFY because the 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-03-04 09:38:02 +00:00
jljusten b05ad4a765 Cleanup: Remove PcdDxePcdDatabaseTraverseEnabled
gEfiEdkModulePkgTokenSpaceGuid.PcdDxePcdDatabaseTraverseEnabled does not
exist.  Remove references to it in .dsc files and within the comments of
the DXE PCD driver.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10092 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-25 21:53:22 +00:00
lgao4 6bfbb5f0e0 1. Correct File header to ## @file
2. Remove unnecessary .common] postfix on section.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10052 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-24 00:21:16 +00:00