]>
Commit | Line | Data |
---|---|---|
5879b875 | 1 | /* @file\r |
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 | |
5 | to extract the section stream contained therein.. \r | |
5879b875 | 6 | \r |
7 | Copyright (c) 2006 - 2007, Intel Corporation \r | |
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 |
17 | This PPI is defined in PI Version 1.00.\r | |
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 | |
42 | The ExtractSection() function processes the input section and\r | |
00edb218 | 43 | returns a pointer to the section contents. If the section being\r |
5879b875 | 44 | extracted does not require processing (if the section\r |
00edb218 A |
45 | GuidedSectionHeader.Attributes has the\r |
46 | EFI_GUIDED_SECTION_PROCESSING_REQUIRED field cleared), then\r | |
47 | OutputBuffer is just updated to point to the start of the\r | |
5879b875 | 48 | section's contents. Otherwise, *Buffer must be allocated\r |
49 | from PEI permanent memory.\r | |
50 | \r | |
00edb218 A |
51 | @param This Indicates the\r |
52 | EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI instance.\r | |
53 | Buffer containing the input GUIDed section to be\r | |
54 | processed. OutputBuffer OutputBuffer is\r | |
55 | allocated from PEI permanent memory and contains\r | |
56 | the new section stream.\r | |
5879b875 | 57 | \r |
00edb218 A |
58 | @param OutputSize A pointer to a caller-allocated\r |
59 | UINTN in which the size of *OutputBuffer\r | |
60 | allocation is stored. If the function\r | |
61 | returns anything other than EFI_SUCCESS,\r | |
62 | the value of OutputSize is undefined.\r | |
5879b875 | 63 | \r |
00edb218 | 64 | @param AuthenticationStatus A pointer to a caller-allocated\r |
5879b875 | 65 | UINT32 that indicates the\r |
66 | authentication status of the\r | |
67 | output buffer. If the input\r | |
68 | section's GuidedSectionHeader.\r | |
69 | Attributes field has the\r | |
70 | EFI_GUIDED_SECTION_AUTH_STATUS_VALID \r | |
71 | bit as clear,\r | |
72 | AuthenticationStatus must return\r | |
73 | zero. These bits reflect the\r | |
74 | status of the extraction\r | |
75 | operation. If the function\r | |
76 | returns anything other than\r | |
77 | EFI_SUCCESS, the value of\r | |
78 | AuthenticationStatus is\r | |
79 | undefined.\r | |
80 | \r | |
00edb218 | 81 | @retval EFI_SUCCESS The InputSection was\r |
5879b875 | 82 | successfully processed and the\r |
83 | section contents were returned.\r | |
84 | \r | |
00edb218 | 85 | @retval EFI_OUT_OF_RESOURCES The system has insufficient\r |
5879b875 | 86 | resources to process the request.\r |
87 | \r | |
88 | @reteval EFI_INVALID_PARAMETER The GUID in InputSection does\r | |
89 | not match this instance of the\r | |
90 | GUIDed Section Extraction PPI.\r | |
91 | **/\r | |
92 | typedef\r | |
93 | EFI_STATUS\r | |
94 | (EFIAPI *EFI_PEI_EXTRACT_GUIDED_SECTION)(\r | |
00edb218 A |
95 | IN CONST EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI *This,\r |
96 | IN CONST VOID *InputSection,\r | |
97 | OUT VOID **OutputBuffer,\r | |
98 | OUT UINTN *OutputSize,\r | |
99 | OUT UINT32 *AuthenticationStatus\r | |
5879b875 | 100 | );\r |
101 | \r | |
102 | \r | |
103 | \r | |
104 | /**\r | |
105 | If a GUID-defined section is encountered when doing section extraction,\r | |
106 | the PEI Foundation or the EFI_PEI_FILE_LOADER_PPI instance\r | |
107 | calls the appropriate instance of the GUIDed Section\r | |
108 | Extraction PPI to extract the section stream contained\r | |
109 | therein.\r | |
110 | \r | |
111 | \r | |
00edb218 | 112 | @param ExtractSection Takes the GUIDed section as input and\r |
5879b875 | 113 | produces the section stream data. See\r |
114 | the ExtractSection() function\r | |
115 | description.\r | |
116 | \r | |
117 | **/\r | |
118 | struct _EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI {\r | |
00edb218 | 119 | EFI_PEI_EXTRACT_GUIDED_SECTION ExtractSection;\r |
5879b875 | 120 | };\r |
121 | \r | |
122 | \r | |
123 | \r | |
124 | #endif\r | |
125 | \r |