diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-11 08:19:29 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-11 08:19:29 +0000 |
commit | 6ac15f7c8a1cfad9e0ca0dfd8643fd9c79b757cd (patch) | |
tree | e329f4622d68000b0beccebe2d044a5d6ee4587a /MdeModulePkg/Universal/PCD/Pei | |
parent | 6ddd3af70b11da43538e98a54a4b7f6b3480f181 (diff) | |
download | edk2-platforms-6ac15f7c8a1cfad9e0ca0dfd8643fd9c79b757cd.tar.xz |
Support HII VOID* dynamic/dynamicEx type PCD.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9990 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/PCD/Pei')
-rw-r--r-- | MdeModulePkg/Universal/PCD/Pei/Service.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.c b/MdeModulePkg/Universal/PCD/Pei/Service.c index ab3059c735..66e72f75e7 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Service.c +++ b/MdeModulePkg/Universal/PCD/Pei/Service.c @@ -412,6 +412,7 @@ SetWorker ( switch (LocalTokenNumber & PCD_TYPE_ALL_SET) {
case PCD_TYPE_VPD:
case PCD_TYPE_HII:
+ case PCD_TYPE_HII|PCD_TYPE_STRING:
{
ASSERT (FALSE);
return EFI_INVALID_PARAMETER;
@@ -624,6 +625,7 @@ GetWorker ( return (VOID *) (UINTN) (PcdGet32 (PcdVpdBaseAddress) + VpdHead->Offset);
}
+ case PCD_TYPE_HII|PCD_TYPE_STRING:
case PCD_TYPE_HII:
{
VariableHead = (VARIABLE_HEAD *) ((UINT8 *)PeiPcdDb + Offset);
@@ -639,7 +641,11 @@ GetWorker ( //
// Return the default value specified by Platform Integrator
//
- return (VOID *) ((UINT8 *) PeiPcdDb + VariableHead->DefaultValueOffset);
+ if ((LocalTokenNumber & PCD_TYPE_ALL_SET) == (PCD_TYPE_HII|PCD_TYPE_STRING)) {
+ return (VOID*)&StringTable[*(UINT16*)((UINT8*)PeiPcdDb + VariableHead->DefaultValueOffset)];
+ } else {
+ return (VOID *) ((UINT8 *) PeiPcdDb + VariableHead->DefaultValueOffset);
+ }
}
}
|