]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Ppi/Decompress.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Ppi / Decompress.h
CommitLineData
c311f86b 1/** @file\r
5879b875 2 Provides decompression services to the PEI Foundatoin.\r
3\r
9095d37b 4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
9344f092 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
5879b875 6\r
5879b875 7 @par Revision Reference:\r
0047820e 8 This PPI is introduced in PI Version 1.0.\r
5879b875 9\r
10**/\r
11\r
12#ifndef __DECOMPRESS_PPI_H__\r
13#define __DECOMPRESS_PPI_H__\r
14\r
15#define EFI_PEI_DECOMPRESS_PPI_GUID \\r
00edb218 16 { 0x1a36e4e7, 0xfab6, 0x476a, { 0x8e, 0x75, 0x69, 0x5a, 0x5, 0x76, 0xfd, 0xd7 } }\r
5879b875 17\r
1b2afeaa 18typedef struct _EFI_PEI_DECOMPRESS_PPI EFI_PEI_DECOMPRESS_PPI;\r
5879b875 19\r
9095d37b 20/**\r
d7132512 21 Decompress a single compression section in a firmware file.\r
9095d37b 22\r
5879b875 23 Decompresses the data in a compressed section and returns it\r
24 as a series of standard PI Firmware File Sections. The\r
25 required memory is allocated from permanent memory.\r
26\r
dafa11b1 27 @param This Points to this instance of the\r
28 EFI_PEI_DECOMPRESS_PEI PPI.\r
29 @param InputSection Points to the compressed section.\r
30 @param OutputBuffer Holds the returned pointer to the\r
31 decompressed sections.\r
32 @param OutputSize Holds the returned size of the decompress\r
33 section streams.\r
5879b875 34\r
00edb218
A
35 @retval EFI_SUCCESS The section was decompressed\r
36 successfully. OutputBuffer contains the\r
37 resulting data and OutputSize contains\r
38 the resulting size.\r
00edb218 39 @retval EFI_OUT_OF_RESOURCES Unable to allocate sufficient\r
5879b875 40 memory to hold the decompressed data.\r
00edb218
A
41 @retval EFI_UNSUPPORTED The compression type specified\r
42 in the compression header is unsupported.\r
dafa11b1 43\r
5879b875 44**/\r
45typedef\r
46EFI_STATUS\r
47(EFIAPI *EFI_PEI_DECOMPRESS_DECOMPRESS)(\r
dafa11b1 48 IN CONST EFI_PEI_DECOMPRESS_PPI *This,\r
49 IN CONST EFI_COMPRESSION_SECTION *InputSection,\r
50 OUT VOID **OutputBuffer,\r
51 OUT UINTN *OutputSize\r
5879b875 52);\r
53\r
54\r
dafa11b1 55///\r
56/// This PPI's single member function decompresses a compression\r
57/// encapsulated section. It is used by the PEI Foundation to\r
58/// process sectioned files. Prior to the installation of this PPI,\r
59/// compression sections will be ignored.\r
60///\r
5879b875 61struct _EFI_PEI_DECOMPRESS_PPI {\r
00edb218 62 EFI_PEI_DECOMPRESS_DECOMPRESS Decompress;\r
5879b875 63};\r
64\r
65\r
00edb218 66extern EFI_GUID gEfiPeiDecompressPpiGuid;\r
5879b875 67\r
68#endif\r