diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-03-06 08:47:29 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-03-06 08:47:29 +0000 |
commit | 6cfc72925616a2c363300332a0344c16a1da801e (patch) | |
tree | e3171c94b5ae8d0a34529783406342fc8a56a55e /MdeModulePkg/Universal/PCD/Pei | |
parent | fcb6f89d0176c3fa28a20cf3d958ee91f9c18799 (diff) | |
download | edk2-platforms-6cfc72925616a2c363300332a0344c16a1da801e.tar.xz |
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
Diffstat (limited to 'MdeModulePkg/Universal/PCD/Pei')
-rw-r--r-- | MdeModulePkg/Universal/PCD/Pei/Service.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.c b/MdeModulePkg/Universal/PCD/Pei/Service.c index 4769600da7..e5d5f0c208 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Service.c +++ b/MdeModulePkg/Universal/PCD/Pei/Service.c @@ -2,7 +2,7 @@ The driver internal functions are implmented here.
They build Pei PCD database, and provide access service to PCD database.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, 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
which accompanies this distribution. The full text of the license may be found at
@@ -360,7 +360,7 @@ SetWorker ( {
UINT32 LocalTokenNumber;
PEI_PCD_DATABASE *PeiPcdDb;
- UINT16 StringTableIdx;
+ STRING_HEAD StringTableIdx;
UINTN Offset;
VOID *InternalData;
UINTN MaxSize;
@@ -432,7 +432,7 @@ SetWorker ( case PCD_TYPE_STRING:
if (SetPtrTypeSize (TokenNumber, Size, PeiPcdDb)) {
- StringTableIdx = *((UINT16 *)InternalData);
+ StringTableIdx = *((STRING_HEAD *)InternalData);
CopyMem (&PeiPcdDb->Init.StringTable[StringTableIdx], Data, *Size);
return EFI_SUCCESS;
} else {
@@ -594,7 +594,7 @@ GetWorker ( UINTN DataSize;
VOID *Data;
UINT8 *StringTable;
- UINT16 StringTableIdx;
+ STRING_HEAD StringTableIdx;
PEI_PCD_DATABASE *PeiPcdDb;
UINT32 LocalTokenNumber;
UINTN MaxSize;
@@ -654,7 +654,7 @@ GetWorker ( // Return the default value specified by Platform Integrator
//
if ((LocalTokenNumber & PCD_TYPE_ALL_SET) == (PCD_TYPE_HII|PCD_TYPE_STRING)) {
- return (VOID*)&StringTable[*(UINT16*)((UINT8*)PeiPcdDb + VariableHead->DefaultValueOffset)];
+ return (VOID*)&StringTable[*(STRING_HEAD*)((UINT8*)PeiPcdDb + VariableHead->DefaultValueOffset)];
} else {
return (VOID *) ((UINT8 *) PeiPcdDb + VariableHead->DefaultValueOffset);
}
@@ -665,7 +665,7 @@ GetWorker ( return (VOID *) ((UINT8 *)PeiPcdDb + Offset);
case PCD_TYPE_STRING:
- StringTableIdx = * (UINT16*) ((UINT8 *) PeiPcdDb + Offset);
+ StringTableIdx = * (STRING_HEAD*) ((UINT8 *) PeiPcdDb + Offset);
return (VOID *) (&StringTable[StringTableIdx]);
default:
|