]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Ppi/GuidedSectionExtraction.h
Code Scrub for header files in MdePkg/Include/Ppi and Uefi directory.
[mirror_edk2.git] / MdePkg / Include / Ppi / GuidedSectionExtraction.h
CommitLineData
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
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 38typedef 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
00edb218
A
54 @param This Indicates the\r
55 EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI instance.\r
56 Buffer containing the input GUIDed section to be\r
57 processed. OutputBuffer OutputBuffer is\r
58 allocated from PEI permanent memory and contains\r
59 the new section stream.\r
5879b875 60 \r
00edb218
A
61 @param OutputSize A pointer to a caller-allocated\r
62 UINTN in which the size of *OutputBuffer\r
63 allocation is stored. If the function\r
64 returns anything other than EFI_SUCCESS,\r
65 the value of OutputSize is undefined.\r
5879b875 66 \r
00edb218 67 @param AuthenticationStatus A pointer to a caller-allocated\r
5879b875 68 UINT32 that indicates the\r
69 authentication status of the\r
70 output buffer. If the input\r
71 section's GuidedSectionHeader.\r
72 Attributes field has the\r
73 EFI_GUIDED_SECTION_AUTH_STATUS_VALID \r
74 bit as clear,\r
75 AuthenticationStatus must return\r
76 zero. These bits reflect the\r
77 status of the extraction\r
78 operation. If the function\r
79 returns anything other than\r
80 EFI_SUCCESS, the value of\r
81 AuthenticationStatus is\r
82 undefined.\r
83 \r
00edb218 84 @retval EFI_SUCCESS The InputSection was\r
5879b875 85 successfully processed and the\r
86 section contents were returned.\r
87 \r
00edb218 88 @retval EFI_OUT_OF_RESOURCES The system has insufficient\r
5879b875 89 resources to process the request.\r
90 \r
d7132512 91 @retval EFI_INVALID_PARAMETER The GUID in InputSection does\r
5879b875 92 not match this instance of the\r
93 GUIDed Section Extraction PPI.\r
94**/\r
95typedef\r
96EFI_STATUS\r
97(EFIAPI *EFI_PEI_EXTRACT_GUIDED_SECTION)(\r
00edb218
A
98 IN CONST EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI *This,\r
99 IN CONST VOID *InputSection,\r
100 OUT VOID **OutputBuffer,\r
101 OUT UINTN *OutputSize,\r
102 OUT UINT32 *AuthenticationStatus\r
5879b875 103);\r
104\r
105\r
106\r
107/**\r
108 If a GUID-defined section is encountered when doing section extraction,\r
109 the PEI Foundation or the EFI_PEI_FILE_LOADER_PPI instance\r
110 calls the appropriate instance of the GUIDed Section\r
111 Extraction PPI to extract the section stream contained\r
112 therein.\r
113 \r
114 \r
00edb218 115 @param ExtractSection Takes the GUIDed section as input and\r
5879b875 116 produces the section stream data. See\r
117 the ExtractSection() function\r
118 description.\r
119 \r
120**/\r
121struct _EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI {\r
00edb218 122 EFI_PEI_EXTRACT_GUIDED_SECTION ExtractSection;\r
5879b875 123};\r
124\r
125\r
126\r
127#endif\r
128\r