mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 07:04:28 +02:00
According to PI 1.2 spec Vol 3 chapter 8 PCD, if the PCD service determined that the size of the data being set was
incompatible with a call to this function, PCD_PPI/PROTOCOL's SetXEx interfaces should be return EFI_INVALID_PARAEMTER instead of ASSERT(). git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9753 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
62e797a489
commit
149fb6d680
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Help functions used by PCD DXE driver.
|
Help functions used by PCD DXE driver.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2010, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -678,6 +678,7 @@ SetValueWorker (
|
|||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set.
|
@retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set.
|
||||||
@retval EFI_INVALID_PARAMETER If Size can not be set to size table.
|
@retval EFI_INVALID_PARAMETER If Size can not be set to size table.
|
||||||
|
@retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database.
|
||||||
@retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in
|
@retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in
|
||||||
range of UINT8, UINT16, UINT32, UINT64
|
range of UINT8, UINT16, UINT32, UINT64
|
||||||
@retval EFI_NOT_FOUND Can not find the PCD type according to token number.
|
@retval EFI_NOT_FOUND Can not find the PCD type according to token number.
|
||||||
@ -727,8 +728,8 @@ SetWorker (
|
|||||||
//
|
//
|
||||||
ASSERT (TokenNumber + 1 < PCD_TOTAL_TOKEN_NUMBER + 1);
|
ASSERT (TokenNumber + 1 < PCD_TOTAL_TOKEN_NUMBER + 1);
|
||||||
|
|
||||||
if (!PtrType) {
|
if ((!PtrType) && (*Size != DxePcdGetSize (TokenNumber + 1))) {
|
||||||
ASSERT (*Size == DxePcdGetSize (TokenNumber + 1));
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Private functions used by PCD DXE driver.
|
Private functions used by PCD DXE driver.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2010, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -775,6 +775,7 @@ SetValueWorker (
|
|||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set.
|
@retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set.
|
||||||
@retval EFI_INVALID_PARAMETER If Size can not be set to size table.
|
@retval EFI_INVALID_PARAMETER If Size can not be set to size table.
|
||||||
|
@retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database.
|
||||||
@retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in
|
@retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in
|
||||||
range of UINT8, UINT16, UINT32, UINT64
|
range of UINT8, UINT16, UINT32, UINT64
|
||||||
@retval EFI_NOT_FOUND Can not find the PCD type according to token number.
|
@retval EFI_NOT_FOUND Can not find the PCD type according to token number.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
The driver internal functions are implmented here.
|
The driver internal functions are implmented here.
|
||||||
They build Pei PCD database, and provide access service to PCD database.
|
They build Pei PCD database, and provide access service to PCD database.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2009, Intel Corporation
|
Copyright (c) 2006 - 2010, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -344,6 +344,7 @@ SetValueWorker (
|
|||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set.
|
@retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set.
|
||||||
@retval EFI_INVALID_PARAMETER If Size can not be set to size table.
|
@retval EFI_INVALID_PARAMETER If Size can not be set to size table.
|
||||||
|
@retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database.
|
||||||
@retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in
|
@retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in
|
||||||
range of UINT8, UINT16, UINT32, UINT64
|
range of UINT8, UINT16, UINT32, UINT64
|
||||||
@retval EFI_NOT_FOUND Can not find the PCD type according to token number.
|
@retval EFI_NOT_FOUND Can not find the PCD type according to token number.
|
||||||
@ -383,8 +384,8 @@ SetWorker (
|
|||||||
|
|
||||||
LocalTokenNumber = PeiPcdDb->Init.LocalTokenNumberTable[TokenNumber];
|
LocalTokenNumber = PeiPcdDb->Init.LocalTokenNumberTable[TokenNumber];
|
||||||
|
|
||||||
if (!PtrType) {
|
if ((!PtrType) && (PeiPcdGetSize(TokenNumber + 1) != *Size)) {
|
||||||
ASSERT (PeiPcdGetSize(TokenNumber + 1) == *Size);
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The internal header file declares the private functions used by PeiPcd driver.
|
The internal header file declares the private functions used by PeiPcd driver.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2009, Intel Corporation
|
Copyright (c) 2006 - 2010, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -794,6 +794,7 @@ SetValueWorker (
|
|||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set.
|
@retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set.
|
||||||
@retval EFI_INVALID_PARAMETER If Size can not be set to size table.
|
@retval EFI_INVALID_PARAMETER If Size can not be set to size table.
|
||||||
|
@retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database.
|
||||||
@retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in
|
@retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in
|
||||||
range of UINT8, UINT16, UINT32, UINT64
|
range of UINT8, UINT16, UINT32, UINT64
|
||||||
@retval EFI_NOT_FOUND Can not find the PCD type according to token number.
|
@retval EFI_NOT_FOUND Can not find the PCD type according to token number.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user