]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Include/Ppi/Decompress.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Ppi / Decompress.h
... / ...
CommitLineData
1/** @file\r
2 Provides decompression services to the PEI Foundatoin.\r
3\r
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7 @par Revision Reference:\r
8 This PPI is introduced in PI Version 1.0.\r
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
16 { 0x1a36e4e7, 0xfab6, 0x476a, { 0x8e, 0x75, 0x69, 0x5a, 0x5, 0x76, 0xfd, 0xd7 } }\r
17\r
18typedef struct _EFI_PEI_DECOMPRESS_PPI EFI_PEI_DECOMPRESS_PPI;\r
19\r
20/**\r
21 Decompress a single compression section in a firmware file.\r
22\r
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
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
34\r
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
39 @retval EFI_OUT_OF_RESOURCES Unable to allocate sufficient\r
40 memory to hold the decompressed data.\r
41 @retval EFI_UNSUPPORTED The compression type specified\r
42 in the compression header is unsupported.\r
43\r
44**/\r
45typedef\r
46EFI_STATUS\r
47(EFIAPI *EFI_PEI_DECOMPRESS_DECOMPRESS)(\r
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
52);\r
53\r
54\r
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
61struct _EFI_PEI_DECOMPRESS_PPI {\r
62 EFI_PEI_DECOMPRESS_DECOMPRESS Decompress;\r
63};\r
64\r
65\r
66extern EFI_GUID gEfiPeiDecompressPpiGuid;\r
67\r
68#endif\r