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