-#include <Ppi/GuidedSectionExtraction.h>\r
-\r
-\r
-\r
-/**\r
- The ExtractSection() function processes the input section and\r
- returns a pointer to the section contents. If the section being\r
- extracted does not require processing (if the section\r
- GuidedSectionHeader.Attributes has the\r
- EFI_GUIDED_SECTION_PROCESSING_REQUIRED field cleared), then\r
- OutputBuffer is just updated to point to the start of the\r
- section's contents. Otherwise, *Buffer must be allocated\r
- from PEI permanent memory.\r
-\r
- @param This Indicates the\r
- EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI instance.\r
- Buffer containing the input GUIDed section to be\r
- processed. OutputBuffer OutputBuffer is\r
- allocated from PEI permanent memory and contains\r
- the new section stream.\r
- @param InputSection A pointer to the input buffer, which contains\r
- the input section to be processed.\r
- @param OutputBuffer A pointer to a caller-allocated buffer, whose\r
- size is specified by the contents of OutputSize.\r
- @param OutputSize A pointer to a caller-allocated\r
- UINTN in which the size of *OutputBuffer\r
- allocation is stored. If the function\r
- returns anything other than EFI_SUCCESS,\r
- the value of OutputSize is undefined.\r
- @param AuthenticationStatus A pointer to a caller-allocated\r
- UINT32 that indicates the\r
- authentication status of the\r
- output buffer. If the input\r
- section's GuidedSectionHeader.\r
- Attributes field has the\r
- EFI_GUIDED_SECTION_AUTH_STATUS_VALID \r
- bit as clear,\r
- AuthenticationStatus must return\r
- zero. These bits reflect the\r
- status of the extraction\r
- operation. If the function\r
- returns anything other than\r
- EFI_SUCCESS, the value of\r
- AuthenticationStatus is\r
- undefined.\r
- \r
- @retval EFI_SUCCESS The InputSection was\r
- successfully processed and the\r
- section contents were returned.\r
- \r
- @retval EFI_OUT_OF_RESOURCES The system has insufficient\r
- resources to process the request.\r
- \r
- @retval EFI_INVALID_PARAMETER The GUID in InputSection does\r
- not match this instance of the\r
- GUIDed Section Extraction PPI.\r
-\r
-**/\r
-EFI_STATUS\r
-CustomGuidedSectionExtract (\r
- IN CONST EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI *This,\r
- IN CONST VOID *InputSection,\r
- OUT VOID **OutputBuffer,\r
- OUT UINTN *OutputSize,\r
- OUT UINT32 *AuthenticationStatus\r
-);\r
-\r
-\r
-/**\r
- Decompresses a section to the output buffer.\r
-\r
- This function lookes up the compression type field in the input section and\r
- applies the appropriate compression algorithm to compress the section to a\r
- callee allocated buffer.\r
- \r
- @param This Points to this instance of the\r
- EFI_PEI_DECOMPRESS_PEI PPI.\r
- @param CompressionSection Points to the compressed section.\r
- @param OutputBuffer Holds the returned pointer to the decompressed\r
- sections.\r
- @param OutputSize Holds the returned size of the decompress\r
- section streams.\r
- \r
- @retval EFI_SUCCESS The section was decompressed successfully.\r
- OutputBuffer contains the resulting data and\r
- OutputSize contains the resulting size.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI \r
-Decompress (\r
- IN CONST EFI_PEI_DECOMPRESS_PPI *This,\r
- IN CONST EFI_COMPRESSION_SECTION *CompressionSection,\r
- OUT VOID **OutputBuffer,\r
- OUT UINTN *OutputSize\r
- );\r
-\r