Make GuidedSection library instance to follow the value of GuidedSectionExtraction protocol/PPI defined in PI spec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4165 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -27,6 +27,7 @@ Abstract:
|
||||
#include <Protocol/SecurityPolicy.h>
|
||||
#include <Library/ExtractGuidedSectionLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
|
||||
typedef struct {
|
||||
@@ -57,10 +58,16 @@ Arguments:
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.
|
||||
EFI_INVALID_PARAMETER - The source data is corrupted
|
||||
EFI_INVALID_PARAMETER - The source data is corrupted, or
|
||||
The GUID in InputSection does not match this instance guid.
|
||||
|
||||
--*/
|
||||
{
|
||||
if (!CompareGuid (
|
||||
&gEfiCrc32GuidedSectionExtractionProtocolGuid,
|
||||
&(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
//
|
||||
// Retrieve the size and attribute of the input section data.
|
||||
//
|
||||
@@ -97,8 +104,9 @@ Arguments:
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS - Decompression is successfull
|
||||
EFI_INVALID_PARAMETER - The source data is corrupted
|
||||
RETURN_SUCCESS - Decompression is successfull
|
||||
RETURN_INVALID_PARAMETER - The source data is corrupted, or
|
||||
The GUID in InputSection does not match this instance guid.
|
||||
|
||||
--*/
|
||||
{
|
||||
@@ -108,6 +116,12 @@ Returns:
|
||||
UINT32 OutputBufferSize;
|
||||
VOID *DummyInterface;
|
||||
|
||||
if (!CompareGuid (
|
||||
&gEfiCrc32GuidedSectionExtractionProtocolGuid,
|
||||
&(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Crc32Checksum = 0;
|
||||
//
|
||||
// Points to the Crc32 section header
|
||||
|
Reference in New Issue
Block a user