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