]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Provides decompression services to the PEI Foundatoin.\r | |
3 | \r | |
4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r | |
5 | 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 | |
13 | @par Revision Reference:\r | |
14 | This PPI is introduced in PI Version 1.0.\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 | |
22 | { 0x1a36e4e7, 0xfab6, 0x476a, { 0x8e, 0x75, 0x69, 0x5a, 0x5, 0x76, 0xfd, 0xd7 } }\r | |
23 | \r | |
24 | typedef struct _EFI_PEI_DECOMPRESS_PPI EFI_PEI_DECOMPRESS_PPI;\r | |
25 | \r | |
26 | /** \r | |
27 | Decompress a single compression section in a firmware file.\r | |
28 | \r | |
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 | |
33 | @param This Points to this instance of the\r | |
34 | EFI_PEI_DECOMPRESS_PEI PPI.\r | |
35 | @param InputSection Points to the compressed section.\r | |
36 | @param OutputBuffer Holds the returned pointer to the\r | |
37 | decompressed sections.\r | |
38 | @param OutputSize Holds the returned size of the decompress\r | |
39 | section streams.\r | |
40 | \r | |
41 | @retval EFI_SUCCESS The section was decompressed\r | |
42 | successfully. OutputBuffer contains the\r | |
43 | resulting data and OutputSize contains\r | |
44 | the resulting size.\r | |
45 | @retval EFI_OUT_OF_RESOURCES Unable to allocate sufficient\r | |
46 | memory to hold the decompressed data.\r | |
47 | @retval EFI_UNSUPPORTED The compression type specified\r | |
48 | in the compression header is unsupported.\r | |
49 | \r | |
50 | **/\r | |
51 | typedef\r | |
52 | EFI_STATUS\r | |
53 | (EFIAPI *EFI_PEI_DECOMPRESS_DECOMPRESS)(\r | |
54 | IN CONST EFI_PEI_DECOMPRESS_PPI *This,\r | |
55 | IN CONST EFI_COMPRESSION_SECTION *InputSection,\r | |
56 | OUT VOID **OutputBuffer,\r | |
57 | OUT UINTN *OutputSize\r | |
58 | );\r | |
59 | \r | |
60 | \r | |
61 | ///\r | |
62 | /// This PPI's single member function decompresses a compression\r | |
63 | /// encapsulated section. It is used by the PEI Foundation to\r | |
64 | /// process sectioned files. Prior to the installation of this PPI,\r | |
65 | /// compression sections will be ignored.\r | |
66 | ///\r | |
67 | struct _EFI_PEI_DECOMPRESS_PPI {\r | |
68 | EFI_PEI_DECOMPRESS_DECOMPRESS Decompress;\r | |
69 | };\r | |
70 | \r | |
71 | \r | |
72 | extern EFI_GUID gEfiPeiDecompressPpiGuid;\r | |
73 | \r | |
74 | #endif\r |