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