\r
RETURN_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.\r
RETURN_INVALID_PARAMETER - The source data is corrupted\r
+ The GUID in InputSection does not match this instance guid.\r
\r
--*/\r
{\r
if (InputSection == NULL) {\r
return RETURN_INVALID_PARAMETER;\r
}\r
+\r
+ if (!CompareGuid (\r
+ &gTianoCustomDecompressGuid, \r
+ &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {\r
+ return RETURN_INVALID_PARAMETER;\r
+ }\r
//\r
// Get guid attribute of guid section. \r
//\r
Returns:\r
\r
RETURN_SUCCESS - Decompression is successfull\r
- RETURN_INVALID_PARAMETER - The source data is corrupted\r
+ RETURN_INVALID_PARAMETER - The source data is corrupted, or\r
+ The GUID in InputSection does not match this instance guid.\r
\r
--*/\r
{\r
\r
if (InputSection == NULL) {\r
return RETURN_INVALID_PARAMETER;\r
- } \r
+ }\r
+\r
+ if (!CompareGuid (\r
+ &gTianoCustomDecompressGuid, \r
+ &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {\r
+ return RETURN_INVALID_PARAMETER;\r
+ }\r
+\r
//\r
// Set Authentication to Zero.\r
//\r
\r
[LibraryClasses]\r
DebugLib\r
+ BaseMemoryLib\r
ExtractGuidedSectionLib\r
\r
[Guids]\r
\r
#include <Library/UefiDecompressLib.h>\r
#include <Library/DebugLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
#include <Library/ExtractGuidedSectionLib.h>\r
\r
//\r
#include <Protocol/SecurityPolicy.h>\r
#include <Library/ExtractGuidedSectionLib.h>\r
#include <Library/DebugLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
\r
typedef struct {\r
Returns:\r
\r
EFI_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.\r
- EFI_INVALID_PARAMETER - The source data is corrupted\r
+ EFI_INVALID_PARAMETER - The source data is corrupted, or\r
+ The GUID in InputSection does not match this instance guid.\r
\r
--*/\r
{\r
+ if (!CompareGuid (\r
+ &gEfiCrc32GuidedSectionExtractionProtocolGuid, \r
+ &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
//\r
// Retrieve the size and attribute of the input section data.\r
//\r
\r
Returns:\r
\r
- EFI_SUCCESS - Decompression is successfull\r
- EFI_INVALID_PARAMETER - The source data is corrupted\r
+ RETURN_SUCCESS - Decompression is successfull\r
+ RETURN_INVALID_PARAMETER - The source data is corrupted, or\r
+ The GUID in InputSection does not match this instance guid.\r
\r
--*/\r
{\r
UINT32 OutputBufferSize;\r
VOID *DummyInterface;\r
\r
+ if (!CompareGuid (\r
+ &gEfiCrc32GuidedSectionExtractionProtocolGuid, \r
+ &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
+\r
Crc32Checksum = 0;\r
//\r
// Points to the Crc32 section header\r
ExtractGuidedSectionLib\r
UefiBootServicesTableLib\r
DebugLib\r
+ BaseMemoryLib\r
\r
[Protocols]\r
gEfiCrc32GuidedSectionExtractionProtocolGuid\r
Get information from the guided section. This function first gets the guid value\r
from guided section header, then match this guid in the registered extract Handler list\r
to its corresponding getinfo Handler. \r
- If not found, RETURN_UNSUPPORTED will be return. \r
+ If not found, RETURN_INVALID_PARAMETER will be return. \r
If found, it will call the getinfo Handler to get the required size and attribute.\r
\r
It will ASSERT () if the pointer to OutputBufferSize is NULL.\r
@param[out] SectionAttribute The attribute of the input guided section.\r
@retval RETURN_SUCCESS Get the required information successfully.\r
- @retval RETURN_UNSUPPORTED Guided section data is not supported.\r
- @retval RETURN_INVALID_PARAMETER The input data can't be parsed correctly.\r
+ @retval RETURN_INVALID_PARAMETER The input data can't be parsed correctly. \r
+ The GUID in InputSection does not match any registered guid list.\r
\r
**/\r
RETURN_STATUS\r
// Not found, the input guided section is not supported. \r
//\r
if (Index == mNumberOfExtractHandler) {\r
- return RETURN_UNSUPPORTED;\r
+ return RETURN_INVALID_PARAMETER;\r
}\r
\r
//\r
Extract data from the guided section. This function first gets the guid value\r
from guided section header, then match this guid in the registered extract Handler list\r
to its corresponding extract Handler. \r
- If not found, RETURN_UNSUPPORTED will be return. \r
+ If not found, RETURN_INVALID_PARAMETER will be return. \r
If found, it will call this extract Handler to get output data and AuthenticationStatus.
\r
It will ASSERT () if the pointer to OutputBuffer is NULL.\r
authentication status of the output buffer.
@retval RETURN_SUCCESS Get the output data, size and AuthenticationStatus successfully.\r
- @retval RETURN_UNSUPPORTED Guided section data is not supported to be decoded.\r
- @retval RETURN_INVALID_PARAMETER The input data can't be parsed correctly.\r
+ @retval RETURN_INVALID_PARAMETER The input data can't be parsed correctly. \r
+ The GUID in InputSection does not match any registered guid.\r
**/\r
RETURN_STATUS\r
// Not found, the input guided section is not supported. \r
//\r
if (Index == mNumberOfExtractHandler) {\r
- return RETURN_UNSUPPORTED;\r
+ return RETURN_INVALID_PARAMETER;\r
}\r
\r
//\r
Get information from the guided section. This function first gets the guid value\r
from guided section header, then match this guid in the registered extract Handler list\r
to its corresponding getinfo Handler. \r
- If not found, RETURN_UNSUPPORTED will be return. \r
+ If not found, RETURN_INVALID_PARAMETER will be return. \r
If found, it will call the getinfo Handler to get the required size and attribute.\r
\r
It will ASSERT () if the pointer to OutputBufferSize is NULL.\r
@param[out] SectionAttribute The attribute of the input guided section.\r
@retval RETURN_SUCCESS Get the required information successfully.\r
- @retval RETURN_UNSUPPORTED Guided section data is not supported.\r
- @retval RETURN_INVALID_PARAMETER The input data can't be parsed correctly.\r
+ @retval RETURN_INVALID_PARAMETER The input data can't be parsed correctly. \r
+ The GUID in InputSection does not match any registered guid list.\r
\r
**/\r
RETURN_STATUS\r
// Not found, the input guided section is not supported. \r
//\r
if (Index == HandlerInfo->NumberOfExtractHandler) {\r
- return RETURN_UNSUPPORTED;\r
+ return RETURN_INVALID_PARAMETER;\r
}\r
\r
//\r
Extract data from the guided section. This function first gets the guid value\r
from guided section header, then match this guid in the registered extract Handler list\r
to its corresponding extract Handler. \r
- If not found, RETURN_UNSUPPORTED will be return. \r
+ If not found, RETURN_INVALID_PARAMETER will be return. \r
If found, it will call this extract Handler to get output data and AuthenticationStatus.
\r
It will ASSERT () if the pointer to OutputBuffer is NULL.\r
authentication status of the output buffer.
@retval RETURN_SUCCESS Get the output data, size and AuthenticationStatus successfully.\r
- @retval RETURN_UNSUPPORTED Guided section data is not supported to be decoded.\r
- @retval RETURN_INVALID_PARAMETER The input data can't be parsed correctly.\r
+ @retval RETURN_INVALID_PARAMETER The input data can't be parsed correctly. \r
+ The GUID in InputSection does not match any registered guid list.\r
**/\r
RETURN_STATUS\r
// Not found, the input guided section is not supported. \r
//\r
if (Index == HandlerInfo->NumberOfExtractHandler) {\r
- return RETURN_UNSUPPORTED;\r
+ return RETURN_INVALID_PARAMETER;\r
}\r
\r
//\r