Add comments for parameter.
Add ASSERT for the input parameters. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4749 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -19,6 +19,8 @@
|
|||||||
/**
|
/**
|
||||||
Those capsules supported by the firmwares.
|
Those capsules supported by the firmwares.
|
||||||
|
|
||||||
|
@param CapsuleHeader Point to the UEFI capsule image to be checked.
|
||||||
|
|
||||||
@retval EFI_SUCESS Input capsule is supported by firmware.
|
@retval EFI_SUCESS Input capsule is supported by firmware.
|
||||||
@retval EFI_UNSUPPORTED Input capsule is not supported by the firmware.
|
@retval EFI_UNSUPPORTED Input capsule is not supported by the firmware.
|
||||||
**/
|
**/
|
||||||
@ -32,6 +34,8 @@ SupportCapsuleImage (
|
|||||||
/**
|
/**
|
||||||
The firmware implements to process the capsule image.
|
The firmware implements to process the capsule image.
|
||||||
|
|
||||||
|
@param CapsuleHeader Point to the UEFI capsule image to be processed.
|
||||||
|
|
||||||
@retval EFI_SUCESS Process Capsule Image successfully.
|
@retval EFI_SUCESS Process Capsule Image successfully.
|
||||||
@retval EFI_UNSUPPORTED Capsule image is not supported by the firmware.
|
@retval EFI_UNSUPPORTED Capsule image is not supported by the firmware.
|
||||||
**/
|
**/
|
||||||
|
@ -17,6 +17,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
/**
|
/**
|
||||||
Those capsules supported by the firmwares.
|
Those capsules supported by the firmwares.
|
||||||
|
|
||||||
|
@param CapsuleHeader Point to the UEFI capsule image to be checked.
|
||||||
|
|
||||||
@retval EFI_SUCESS Input capsule is supported by firmware.
|
@retval EFI_SUCESS Input capsule is supported by firmware.
|
||||||
@retval EFI_UNSUPPORTED Input capsule is not supported by the firmware.
|
@retval EFI_UNSUPPORTED Input capsule is not supported by the firmware.
|
||||||
**/
|
**/
|
||||||
@ -32,6 +34,8 @@ SupportCapsuleImage (
|
|||||||
/**
|
/**
|
||||||
The firmware implements to process the capsule image.
|
The firmware implements to process the capsule image.
|
||||||
|
|
||||||
|
@param CapsuleHeader Point to the UEFI capsule image to be processed.
|
||||||
|
|
||||||
@retval EFI_SUCESS Process Capsule Image successfully.
|
@retval EFI_SUCESS Process Capsule Image successfully.
|
||||||
@retval EFI_UNSUPPORTED Capsule image is not supported by the firmware.
|
@retval EFI_UNSUPPORTED Capsule image is not supported by the firmware.
|
||||||
**/
|
**/
|
||||||
|
@ -355,9 +355,12 @@ EfiFvbReadBlock (
|
|||||||
IN EFI_LBA Lba,
|
IN EFI_LBA Lba,
|
||||||
IN UINTN Offset,
|
IN UINTN Offset,
|
||||||
IN OUT UINTN *NumBytes,
|
IN OUT UINTN *NumBytes,
|
||||||
IN UINT8 *Buffer
|
OUT UINT8 *Buffer
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
ASSERT (NumBytes != NULL);
|
||||||
|
ASSERT (Buffer != NULL);
|
||||||
|
|
||||||
if (Instance >= mFvbCount) {
|
if (Instance >= mFvbCount) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
@ -394,6 +397,8 @@ EfiFvbWriteBlock (
|
|||||||
IN UINT8 *Buffer
|
IN UINT8 *Buffer
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
ASSERT (NumBytes != NULL);
|
||||||
|
|
||||||
if (Instance >= mFvbCount) {
|
if (Instance >= mFvbCount) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
@ -449,6 +454,8 @@ EfiFvbGetVolumeAttributes (
|
|||||||
OUT EFI_FVB_ATTRIBUTES *Attributes
|
OUT EFI_FVB_ATTRIBUTES *Attributes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
ASSERT (Attributes != NULL);
|
||||||
|
|
||||||
if (Instance >= mFvbCount) {
|
if (Instance >= mFvbCount) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
@ -481,6 +488,8 @@ EfiFvbSetVolumeAttributes (
|
|||||||
IN OUT EFI_FVB_ATTRIBUTES *Attributes
|
IN OUT EFI_FVB_ATTRIBUTES *Attributes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
ASSERT (Attributes != NULL);
|
||||||
|
|
||||||
if (Instance >= mFvbCount) {
|
if (Instance >= mFvbCount) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
@ -511,6 +520,8 @@ EfiFvbGetPhysicalAddress (
|
|||||||
OUT EFI_PHYSICAL_ADDRESS *BaseAddress
|
OUT EFI_PHYSICAL_ADDRESS *BaseAddress
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
ASSERT (BaseAddress != NULL);
|
||||||
|
|
||||||
if (Instance >= mFvbCount) {
|
if (Instance >= mFvbCount) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
@ -547,6 +558,9 @@ EfiFvbGetBlockSize (
|
|||||||
OUT UINTN *NumOfBlocks
|
OUT UINTN *NumOfBlocks
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
ASSERT (BlockSize != NULL);
|
||||||
|
ASSERT (NumOfBlocks != NULL);
|
||||||
|
|
||||||
if (Instance >= mFvbCount) {
|
if (Instance >= mFvbCount) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user