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>
\r
Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>\r
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
\r
Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>\r
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP<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
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
}\r
\r
for ( ; Index < ExMapTableCount; Index++) {\r
}\r
\r
for ( ; Index < ExMapTableCount; Index++) {\r
- if (ExMapTable[Index].ExTokenNumber == *TokenNumber) {\r
+ if ((ExMapTable[Index].ExTokenNumber == *TokenNumber) && (ExMapTable[Index].ExGuidIndex == GuidTableIdx)) {\r
All Pcd Ppi services are implemented here.\r
\r
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
All Pcd Ppi services are implemented here.\r
\r
Copyright (c) 2006 - 2016, 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
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP<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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ //\r
+ // If given token number is PCD_INVALID_TOKEN_NUMBER, then return the first\r
+ // token number in found token space.\r
+ //\r
if (*TokenNumber == PCD_INVALID_TOKEN_NUMBER) {\r
*TokenNumber = ExMapTable[Index].ExTokenNumber;\r
return EFI_SUCCESS;\r
}\r
\r
for ( ; Index < PeiPcdDb->ExTokenCount; Index++) {\r
if (*TokenNumber == PCD_INVALID_TOKEN_NUMBER) {\r
*TokenNumber = ExMapTable[Index].ExTokenNumber;\r
return EFI_SUCCESS;\r
}\r
\r
for ( ; Index < PeiPcdDb->ExTokenCount; Index++) {\r
- if (ExMapTable[Index].ExTokenNumber == *TokenNumber) {\r
+ if ((ExMapTable[Index].ExTokenNumber == *TokenNumber) && (ExMapTable[Index].ExGuidIndex == GuidTableIdx)) {\r