]>
Commit | Line | Data |
---|---|---|
c311f86b | 1 | /** @file\r |
5879b875 | 2 | Provides decompression services to the PEI Foundatoin.\r |
3 | \r | |
d7132512 | 4 | Copyright (c) 2006 - 2008, Intel Corporation \r |
5879b875 | 5 | All rights reserved. This program and the accompanying materials \r |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php \r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
12 | \r | |
5879b875 | 13 | @par Revision Reference:\r |
14 | This PPI is defined in PI Version 1.00.\r | |
15 | \r | |
16 | **/\r | |
17 | \r | |
18 | #ifndef __DECOMPRESS_PPI_H__\r | |
19 | #define __DECOMPRESS_PPI_H__\r | |
20 | \r | |
21 | #define EFI_PEI_DECOMPRESS_PPI_GUID \\r | |
00edb218 | 22 | { 0x1a36e4e7, 0xfab6, 0x476a, { 0x8e, 0x75, 0x69, 0x5a, 0x5, 0x76, 0xfd, 0xd7 } }\r |
5879b875 | 23 | \r |
1b2afeaa | 24 | typedef struct _EFI_PEI_DECOMPRESS_PPI EFI_PEI_DECOMPRESS_PPI;\r |
5879b875 | 25 | \r |
d7132512 LG |
26 | /** \r |
27 | Decompress a single compression section in a firmware file.\r | |
28 | \r | |
5879b875 | 29 | Decompresses the data in a compressed section and returns it\r |
30 | as a series of standard PI Firmware File Sections. The\r | |
31 | required memory is allocated from permanent memory.\r | |
32 | \r | |
00edb218 A |
33 | @param This Points to this instance of the\r |
34 | EFI_PEI_DECOMPRESS_PEI PPI. InputSection Points to\r | |
35 | the compressed section.\r | |
5879b875 | 36 | \r |
37 | @param OutputBuffer Holds the returned pointer to the\r | |
38 | decompressed sections.\r | |
39 | \r | |
00edb218 | 40 | @param OutputSize Holds the returned size of the decompress\r |
5879b875 | 41 | section streams.\r |
42 | \r | |
00edb218 A |
43 | @retval EFI_SUCCESS The section was decompressed\r |
44 | successfully. OutputBuffer contains the\r | |
45 | resulting data and OutputSize contains\r | |
46 | the resulting size.\r | |
5879b875 | 47 | \r |
00edb218 | 48 | @retval EFI_OUT_OF_RESOURCES Unable to allocate sufficient\r |
5879b875 | 49 | memory to hold the decompressed data.\r |
50 | \r | |
00edb218 A |
51 | @retval EFI_UNSUPPORTED The compression type specified\r |
52 | in the compression header is unsupported.\r | |
5879b875 | 53 | **/\r |
54 | typedef\r | |
55 | EFI_STATUS\r | |
56 | (EFIAPI *EFI_PEI_DECOMPRESS_DECOMPRESS)(\r | |
00edb218 A |
57 | IN CONST EFI_PEI_DECOMPRESS_PPI *This,\r |
58 | IN CONST EFI_COMPRESSION_SECTION *InputSection,\r | |
59 | OUT VOID **OutputBuffer,\r | |
60 | OUT UINTN *OutputSize\r | |
5879b875 | 61 | );\r |
62 | \r | |
63 | \r | |
64 | /** \r | |
ac644614 | 65 | This PPI's single member function decompresses a compression\r |
00edb218 A |
66 | encapsulated section. It is used by the PEI Foundation to\r |
67 | process sectioned files. Prior to the installation of this PPI,\r | |
5879b875 | 68 | compression sections will be ignored.\r |
69 | \r | |
00edb218 | 70 | @param Decompress Decompress a single compression section in\r |
5879b875 | 71 | a firmware file.\r |
72 | **/\r | |
73 | struct _EFI_PEI_DECOMPRESS_PPI {\r | |
00edb218 | 74 | EFI_PEI_DECOMPRESS_DECOMPRESS Decompress;\r |
5879b875 | 75 | };\r |
76 | \r | |
77 | \r | |
00edb218 | 78 | extern EFI_GUID gEfiPeiDecompressPpiGuid;\r |
5879b875 | 79 | \r |
80 | #endif\r |