/** @file\r
Help functions used by PCD DXE driver.\r
\r
-Copyright (c) 2006 - 2007, Intel Corporation\r
+Copyright (c) 2006 - 2010, Intel Corporation\r
All rights reserved. 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
@retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set.\r
@retval EFI_INVALID_PARAMETER If Size can not be set to size table.\r
+ @retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database. \r
@retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in\r
range of UINT8, UINT16, UINT32, UINT64\r
@retval EFI_NOT_FOUND Can not find the PCD type according to token number. \r
//\r
ASSERT (TokenNumber + 1 < PCD_TOTAL_TOKEN_NUMBER + 1);\r
\r
- if (!PtrType) {\r
- ASSERT (*Size == DxePcdGetSize (TokenNumber + 1));\r
+ if ((!PtrType) && (*Size != DxePcdGetSize (TokenNumber + 1))) {\r
+ return EFI_INVALID_PARAMETER;\r
}\r
\r
//\r
/** @file\r
Private functions used by PCD DXE driver.\r
\r
-Copyright (c) 2006 - 2007, Intel Corporation\r
+Copyright (c) 2006 - 2010, Intel Corporation\r
All rights reserved. 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
@retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set.\r
@retval EFI_INVALID_PARAMETER If Size can not be set to size table.\r
+ @retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database. \r
@retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in\r
range of UINT8, UINT16, UINT32, UINT64\r
@retval EFI_NOT_FOUND Can not find the PCD type according to token number. \r
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 - 2009, Intel Corporation\r
+Copyright (c) 2006 - 2010, Intel Corporation\r
All rights reserved. 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
@retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set.\r
@retval EFI_INVALID_PARAMETER If Size can not be set to size table.\r
+ @retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database.\r
@retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in\r
range of UINT8, UINT16, UINT32, UINT64\r
@retval EFI_NOT_FOUND Can not find the PCD type according to token number. \r
\r
LocalTokenNumber = PeiPcdDb->Init.LocalTokenNumberTable[TokenNumber];\r
\r
- if (!PtrType) {\r
- ASSERT (PeiPcdGetSize(TokenNumber + 1) == *Size);\r
+ if ((!PtrType) && (PeiPcdGetSize(TokenNumber + 1) != *Size)) {\r
+ return EFI_INVALID_PARAMETER;\r
}\r
\r
//\r
/** @file\r
The internal header file declares the private functions used by PeiPcd driver.\r
\r
-Copyright (c) 2006 - 2009, Intel Corporation\r
+Copyright (c) 2006 - 2010, Intel Corporation\r
All rights reserved. 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
@retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set.\r
@retval EFI_INVALID_PARAMETER If Size can not be set to size table.\r
+ @retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database.\r
@retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in\r
range of UINT8, UINT16, UINT32, UINT64\r
@retval EFI_NOT_FOUND Can not find the PCD type according to token number. \r