Revert "Capsule-on-Disk entire Patch
This reverts commit0d4aa276d1
,6470a43160
,fd72860895
,7837d12498
,6b32af2e10
,8636f70b5a
,f17935321a
due to incorrect review process. Cc: Wei6 Xu <wei6.xu@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Zhang, Chao B <chao.b.zhang@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
ValidateFmpCapsule(), and DisplayCapsuleImage() receives untrusted input and
|
||||
performs basic validation.
|
||||
|
||||
Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
@@ -80,7 +80,6 @@ RecordCapsuleStatusVariable (
|
||||
@param[in] PayloadIndex FMP payload index
|
||||
@param[in] ImageHeader FMP image header
|
||||
@param[in] FmpDevicePath DevicePath associated with the FMP producer
|
||||
@param[in] CapFileName Capsule file name
|
||||
|
||||
@retval EFI_SUCCESS The capsule status variable is recorded.
|
||||
@retval EFI_OUT_OF_RESOURCES No resource to record the capsule status variable.
|
||||
@@ -91,8 +90,7 @@ RecordFmpCapsuleStatusVariable (
|
||||
IN EFI_STATUS CapsuleStatus,
|
||||
IN UINTN PayloadIndex,
|
||||
IN EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER *ImageHeader,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *FmpDevicePath, OPTIONAL
|
||||
IN CHAR16 *CapFileName OPTIONAL
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *FmpDevicePath OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -111,22 +109,6 @@ UpdateImageProgress (
|
||||
IN UINTN Completion
|
||||
);
|
||||
|
||||
/**
|
||||
Return if this capsule is a capsule name capsule, based upon CapsuleHeader.
|
||||
|
||||
@param[in] CapsuleHeader A pointer to EFI_CAPSULE_HEADER
|
||||
|
||||
@retval TRUE It is a capsule name capsule.
|
||||
@retval FALSE It is not a capsule name capsule.
|
||||
**/
|
||||
BOOLEAN
|
||||
IsCapsuleNameCapsule (
|
||||
IN EFI_CAPSULE_HEADER *CapsuleHeader
|
||||
)
|
||||
{
|
||||
return CompareGuid (&CapsuleHeader->CapsuleGuid, &gEdkiiCapsuleOnDiskNameGuid);
|
||||
}
|
||||
|
||||
/**
|
||||
Return if this CapsuleGuid is a FMP capsule GUID or not.
|
||||
|
||||
@@ -1052,12 +1034,11 @@ StartFmpImage (
|
||||
/**
|
||||
Record FMP capsule status.
|
||||
|
||||
@param[in] Handle A FMP handle.
|
||||
@param[in] Handle A FMP handle.
|
||||
@param[in] CapsuleHeader The capsule image header
|
||||
@param[in] CapsuleStatus The capsule process stauts
|
||||
@param[in] PayloadIndex FMP payload index
|
||||
@param[in] ImageHeader FMP image header
|
||||
@param[in] CapFileName Capsule file name
|
||||
**/
|
||||
VOID
|
||||
RecordFmpCapsuleStatus (
|
||||
@@ -1065,8 +1046,7 @@ RecordFmpCapsuleStatus (
|
||||
IN EFI_CAPSULE_HEADER *CapsuleHeader,
|
||||
IN EFI_STATUS CapsuleStatus,
|
||||
IN UINTN PayloadIndex,
|
||||
IN EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER *ImageHeader,
|
||||
IN CHAR16 *CapFileName OPTIONAL
|
||||
IN EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER *ImageHeader
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
@@ -1090,8 +1070,7 @@ RecordFmpCapsuleStatus (
|
||||
CapsuleStatus,
|
||||
PayloadIndex,
|
||||
ImageHeader,
|
||||
FmpDevicePath,
|
||||
CapFileName
|
||||
FmpDevicePath
|
||||
);
|
||||
|
||||
//
|
||||
@@ -1136,7 +1115,6 @@ RecordFmpCapsuleStatus (
|
||||
This function need support nested FMP capsule.
|
||||
|
||||
@param[in] CapsuleHeader Points to a capsule header.
|
||||
@param[in] CapFileName Capsule file name.
|
||||
@param[out] ResetRequired Indicates whether reset is required or not.
|
||||
|
||||
@retval EFI_SUCESS Process Capsule Image successfully.
|
||||
@@ -1148,7 +1126,6 @@ RecordFmpCapsuleStatus (
|
||||
EFI_STATUS
|
||||
ProcessFmpCapsuleImage (
|
||||
IN EFI_CAPSULE_HEADER *CapsuleHeader,
|
||||
IN CHAR16 *CapFileName, OPTIONAL
|
||||
OUT BOOLEAN *ResetRequired OPTIONAL
|
||||
)
|
||||
{
|
||||
@@ -1168,7 +1145,7 @@ ProcessFmpCapsuleImage (
|
||||
BOOLEAN Abort;
|
||||
|
||||
if (!IsFmpCapsuleGuid(&CapsuleHeader->CapsuleGuid)) {
|
||||
return ProcessFmpCapsuleImage ((EFI_CAPSULE_HEADER *)((UINTN)CapsuleHeader + CapsuleHeader->HeaderSize), CapFileName, ResetRequired);
|
||||
return ProcessFmpCapsuleImage ((EFI_CAPSULE_HEADER *)((UINTN)CapsuleHeader + CapsuleHeader->HeaderSize), ResetRequired);
|
||||
}
|
||||
|
||||
NotReady = FALSE;
|
||||
@@ -1250,8 +1227,7 @@ ProcessFmpCapsuleImage (
|
||||
CapsuleHeader,
|
||||
EFI_NOT_READY,
|
||||
Index - FmpCapsuleHeader->EmbeddedDriverCount,
|
||||
ImageHeader,
|
||||
CapFileName
|
||||
ImageHeader
|
||||
);
|
||||
continue;
|
||||
}
|
||||
@@ -1263,8 +1239,7 @@ ProcessFmpCapsuleImage (
|
||||
CapsuleHeader,
|
||||
EFI_ABORTED,
|
||||
Index - FmpCapsuleHeader->EmbeddedDriverCount,
|
||||
ImageHeader,
|
||||
CapFileName
|
||||
ImageHeader
|
||||
);
|
||||
continue;
|
||||
}
|
||||
@@ -1287,8 +1262,7 @@ ProcessFmpCapsuleImage (
|
||||
CapsuleHeader,
|
||||
Status,
|
||||
Index - FmpCapsuleHeader->EmbeddedDriverCount,
|
||||
ImageHeader,
|
||||
CapFileName
|
||||
ImageHeader
|
||||
);
|
||||
}
|
||||
if (HandleBuffer != NULL) {
|
||||
@@ -1440,13 +1414,6 @@ SupportCapsuleImage (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
//
|
||||
// Check capsule file name capsule
|
||||
//
|
||||
if (IsCapsuleNameCapsule(CapsuleHeader)) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
if (IsFmpCapsule(CapsuleHeader)) {
|
||||
//
|
||||
// Fake capsule header is valid case in QueryCapsuleCpapbilities().
|
||||
@@ -1469,7 +1436,6 @@ SupportCapsuleImage (
|
||||
Caution: This function may receive untrusted input.
|
||||
|
||||
@param[in] CapsuleHeader Points to a capsule header.
|
||||
@param[in] CapFileName Capsule file name.
|
||||
@param[out] ResetRequired Indicates whether reset is required or not.
|
||||
|
||||
@retval EFI_SUCESS Process Capsule Image successfully.
|
||||
@@ -1481,7 +1447,6 @@ EFI_STATUS
|
||||
EFIAPI
|
||||
ProcessThisCapsuleImage (
|
||||
IN EFI_CAPSULE_HEADER *CapsuleHeader,
|
||||
IN CHAR16 *CapFileName, OPTIONAL
|
||||
OUT BOOLEAN *ResetRequired OPTIONAL
|
||||
)
|
||||
{
|
||||
@@ -1519,7 +1484,7 @@ ProcessThisCapsuleImage (
|
||||
// Process EFI FMP Capsule
|
||||
//
|
||||
DEBUG((DEBUG_INFO, "ProcessFmpCapsuleImage ...\n"));
|
||||
Status = ProcessFmpCapsuleImage(CapsuleHeader, CapFileName, ResetRequired);
|
||||
Status = ProcessFmpCapsuleImage(CapsuleHeader, ResetRequired);
|
||||
DEBUG((DEBUG_INFO, "ProcessFmpCapsuleImage - %r\n", Status));
|
||||
|
||||
return Status;
|
||||
@@ -1546,7 +1511,7 @@ ProcessCapsuleImage (
|
||||
IN EFI_CAPSULE_HEADER *CapsuleHeader
|
||||
)
|
||||
{
|
||||
return ProcessThisCapsuleImage (CapsuleHeader, NULL, NULL);
|
||||
return ProcessThisCapsuleImage (CapsuleHeader, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user