]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/PCD/Pei/Service.c
Update string offset and default offset from UINT16 to STRING_HEAD to match the gener...
[mirror_edk2.git] / MdeModulePkg / Universal / PCD / Pei / Service.c
index 4769600da762d9f7811b99efd45ce0ff0a7fa437..e5d5f0c2085fbc49af613eb3bff95f8fb80bf443 100644 (file)
@@ -2,7 +2,7 @@
   The driver internal functions are implmented here.\r
   They build Pei PCD database, and provide access service to PCD database.\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -360,7 +360,7 @@ SetWorker (
 {\r
   UINT32              LocalTokenNumber;\r
   PEI_PCD_DATABASE    *PeiPcdDb;\r
-  UINT16              StringTableIdx;\r
+  STRING_HEAD         StringTableIdx;\r
   UINTN               Offset;\r
   VOID                *InternalData;\r
   UINTN               MaxSize;\r
@@ -432,7 +432,7 @@ SetWorker (
 \r
     case PCD_TYPE_STRING:\r
       if (SetPtrTypeSize (TokenNumber, Size, PeiPcdDb)) {\r
-        StringTableIdx = *((UINT16 *)InternalData);\r
+        StringTableIdx = *((STRING_HEAD *)InternalData);\r
         CopyMem (&PeiPcdDb->Init.StringTable[StringTableIdx], Data, *Size);\r
         return EFI_SUCCESS;\r
       } else {\r
@@ -594,7 +594,7 @@ GetWorker (
   UINTN               DataSize;\r
   VOID                *Data;\r
   UINT8               *StringTable;\r
-  UINT16              StringTableIdx;\r
+  STRING_HEAD         StringTableIdx;\r
   PEI_PCD_DATABASE    *PeiPcdDb;\r
   UINT32              LocalTokenNumber;\r
   UINTN               MaxSize;\r
@@ -654,7 +654,7 @@ GetWorker (
         // Return the default value specified by Platform Integrator \r
         //\r
         if ((LocalTokenNumber & PCD_TYPE_ALL_SET) == (PCD_TYPE_HII|PCD_TYPE_STRING)) {\r
-          return (VOID*)&StringTable[*(UINT16*)((UINT8*)PeiPcdDb + VariableHead->DefaultValueOffset)];\r
+          return (VOID*)&StringTable[*(STRING_HEAD*)((UINT8*)PeiPcdDb + VariableHead->DefaultValueOffset)];\r
         } else {\r
           return (VOID *) ((UINT8 *) PeiPcdDb + VariableHead->DefaultValueOffset);\r
         }\r
@@ -665,7 +665,7 @@ GetWorker (
       return (VOID *) ((UINT8 *)PeiPcdDb + Offset);\r
 \r
     case PCD_TYPE_STRING:\r
-      StringTableIdx = * (UINT16*) ((UINT8 *) PeiPcdDb + Offset);\r
+      StringTableIdx = * (STRING_HEAD*) ((UINT8 *) PeiPcdDb + Offset);\r
       return (VOID *) (&StringTable[StringTableIdx]);\r
 \r
     default:\r