mirror of https://github.com/acidanthera/audk.git
According to PI specification, if token number can not be found for dynamic-ex type PCD, return EFI_NOT_FOUND but not ASSERT().
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9511 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
dc6f9b3542
commit
86714ccd8e
|
@ -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 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2009, 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
|
||||||
|
@ -57,7 +57,10 @@ PeiRegisterCallBackWorker (
|
||||||
ASSERT (TokenNumber + 1 < PEI_NEX_TOKEN_NUMBER + 1);
|
ASSERT (TokenNumber + 1 < PEI_NEX_TOKEN_NUMBER + 1);
|
||||||
} else {
|
} else {
|
||||||
TokenNumber = GetExPcdTokenNumber (Guid, ExTokenNumber);
|
TokenNumber = GetExPcdTokenNumber (Guid, ExTokenNumber);
|
||||||
|
if (TokenNumber == PCD_INVALID_TOKEN_NUMBER) {
|
||||||
|
return EFI_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// TokenNumber Zero is reserved as PCD_INVALID_TOKEN_NUMBER.
|
// TokenNumber Zero is reserved as PCD_INVALID_TOKEN_NUMBER.
|
||||||
// We have to decrement TokenNumber by 1 to make it usable
|
// We have to decrement TokenNumber by 1 to make it usable
|
||||||
|
@ -519,7 +522,10 @@ ExSetWorker (
|
||||||
}
|
}
|
||||||
|
|
||||||
TokenNumber = GetExPcdTokenNumber (Guid, ExTokenNumber);
|
TokenNumber = GetExPcdTokenNumber (Guid, ExTokenNumber);
|
||||||
|
if (TokenNumber == PCD_INVALID_TOKEN_NUMBER) {
|
||||||
|
return EFI_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
InvokeCallbackOnSet (ExTokenNumber, Guid, TokenNumber, Data, *Size);
|
InvokeCallbackOnSet (ExTokenNumber, Guid, TokenNumber, Data, *Size);
|
||||||
|
|
||||||
return SetWorker (TokenNumber, Data, Size, PtrType);
|
return SetWorker (TokenNumber, Data, Size, PtrType);
|
||||||
|
@ -702,9 +708,7 @@ GetExPcdTokenNumber (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT (FALSE);
|
return PCD_INVALID_TOKEN_NUMBER;
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue