]>
Commit | Line | Data |
---|---|---|
c311f86b | 1 | /** @file\r |
5879b875 | 2 | If a GUID-defined section is encountered when doing section extraction, \r |
00edb218 A |
3 | the PEI Foundation or the EFI_PEI_FILE_LOADER_PPI instance \r |
4 | calls the appropriate instance of the GUIDed Section Extraction PPI \r | |
d7132512 | 5 | to extract the section stream contained therein. \r |
5879b875 | 6 | \r |
d7132512 | 7 | Copyright (c) 2006 - 2008, Intel Corporation \r |
5879b875 | 8 | All rights reserved. This program and the accompanying materials \r |
9 | are licensed and made available under the terms and conditions of the BSD License \r | |
10 | which accompanies this distribution. The full text of the license may be found at \r | |
11 | http://opensource.org/licenses/bsd-license.php \r | |
12 | \r | |
13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
15 | \r | |
5879b875 | 16 | @par Revision Reference:\r |
0047820e | 17 | This PPI is introduced in PI Version 1.0.\r |
5879b875 | 18 | \r |
19 | **/\r | |
20 | \r | |
21 | #ifndef __EFI_GUIDED_SECTION_EXTRACTION_PPI_H__\r | |
22 | #define __EFI_GUIDED_SECTION_EXTRACTION_PPI_H__\r | |
23 | \r | |
24 | //\r | |
25 | // Typically, protocol interface structures are identified \r | |
26 | // by associating them with a GUID. Each instance of \r | |
27 | // a protocol with a given GUID must have \r | |
28 | // the same interface structure. While all instances of \r | |
29 | // the GUIDed Section Extraction PPI must have \r | |
30 | // the same interface structure, they do not all have \r | |
31 | // te same GUID. The GUID that is associated with \r | |
32 | // an instance of the GUIDed Section Extraction Protocol \r | |
33 | // is used to correlate it with the GUIDed section type \r | |
34 | // that it is intended to process.\r | |
35 | //\r | |
36 | \r | |
37 | \r | |
00edb218 | 38 | typedef struct _EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI;\r |
5879b875 | 39 | \r |
5879b875 | 40 | \r |
41 | /**\r | |
d7132512 LG |
42 | Processes the input section and returns the data contained therein \r |
43 | along with the authentication status.\r | |
44 | \r | |
5879b875 | 45 | The ExtractSection() function processes the input section and\r |
00edb218 | 46 | returns a pointer to the section contents. If the section being\r |
5879b875 | 47 | extracted does not require processing (if the section\r |
00edb218 A |
48 | GuidedSectionHeader.Attributes has the\r |
49 | EFI_GUIDED_SECTION_PROCESSING_REQUIRED field cleared), then\r | |
50 | OutputBuffer is just updated to point to the start of the\r | |
5879b875 | 51 | section's contents. Otherwise, *Buffer must be allocated\r |
52 | from PEI permanent memory.\r | |
53 | \r | |
dafa11b1 | 54 | @param This Indicates the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI\r |
55 | instance.\r | |
56 | @param InputSection Buffer containing the input GUIDed section to be\r | |
57 | processed.\r | |
58 | @param OutputBuffer *OutputBuffer is allocated from PEI permanent memory\r | |
59 | and contains the new section stream.\r | |
60 | @param OutputSize A pointer to a caller-allocated UINTN in which\r | |
61 | the size of *OutputBuffer allocation is stored.\r | |
62 | If the function returns anything other than\r | |
63 | EFI_SUCCESS, the value of *OutputSize is undefined.\r | |
64 | @param AuthenticationStatus A pointer to a caller-allocated UINT32 that indicates\r | |
65 | the authentication status of the output buffer.\r | |
66 | If the input section's\r | |
67 | GuidedSectionHeader.Attributes field has the\r | |
68 | EFI_GUIDED_SECTION_AUTH_STATUS_VALID bit as clear,\r | |
69 | *AuthenticationStatus must return zero. These bits\r | |
70 | reflect the status of the extraction operation.\r | |
71 | If the function returns anything other than EFI_SUCCESS,\r | |
72 | the value of *AuthenticationStatus is undefined.\r | |
5879b875 | 73 | \r |
dafa11b1 | 74 | @retval EFI_SUCCESS The InputSection was successfully processed and the\r |
5879b875 | 75 | section contents were returned.\r |
dafa11b1 | 76 | @retval EFI_OUT_OF_RESOURCES The system has insufficient resources to process the request.\r |
77 | @retval EFI_INVALID_PARAMETER The GUID in InputSection does not match this instance of the\r | |
5879b875 | 78 | GUIDed Section Extraction PPI.\r |
79 | **/\r | |
80 | typedef\r | |
81 | EFI_STATUS\r | |
82 | (EFIAPI *EFI_PEI_EXTRACT_GUIDED_SECTION)(\r | |
dafa11b1 | 83 | IN CONST EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI *This,\r |
84 | IN CONST VOID *InputSection,\r | |
85 | OUT VOID **OutputBuffer,\r | |
86 | OUT UINTN *OutputSize,\r | |
87 | OUT UINT32 *AuthenticationStatus\r | |
5879b875 | 88 | );\r |
89 | \r | |
dafa11b1 | 90 | ///\r |
91 | /// If a GUID-defined section is encountered when doing section extraction,\r | |
92 | /// the PEI Foundation or the EFI_PEI_FILE_LOADER_PPI instance\r | |
93 | /// calls the appropriate instance of the GUIDed Section\r | |
94 | /// Extraction PPI to extract the section stream contained\r | |
95 | /// therein.\r | |
96 | /// \r | |
5879b875 | 97 | struct _EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI {\r |
00edb218 | 98 | EFI_PEI_EXTRACT_GUIDED_SECTION ExtractSection;\r |
5879b875 | 99 | };\r |
100 | \r | |
101 | \r | |
102 | \r | |
103 | #endif\r | |
104 | \r |