]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Ppi/GuidedSectionExtraction.h
Removed tabs and fixed some minor coding style issues. Also fixed typo in EFI_PEI_ENT...
[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
16 Module Name: GuidedSectionExtraction.h\r
17\r
18 @par Revision Reference:\r
19 This PPI is defined in PI Version 1.00.\r
20\r
21**/\r
22\r
23#ifndef __EFI_GUIDED_SECTION_EXTRACTION_PPI_H__\r
24#define __EFI_GUIDED_SECTION_EXTRACTION_PPI_H__\r
25\r
26//\r
27// Typically, protocol interface structures are identified \r
28// by associating them with a GUID. Each instance of \r
29// a protocol with a given GUID must have \r
30// the same interface structure. While all instances of \r
31// the GUIDed Section Extraction PPI must have \r
32// the same interface structure, they do not all have \r
33// te same GUID. The GUID that is associated with \r
34// an instance of the GUIDed Section Extraction Protocol \r
35// is used to correlate it with the GUIDed section type \r
36// that it is intended to process.\r
37//\r
38\r
39\r
00edb218 40typedef struct _EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI;\r
5879b875 41\r
42//\r
43// Bit values for AuthenticationStatus\r
44//\r
00edb218
A
45#define EFI_AUTH_STATUS_PLATFORM_OVERRIDE 0x01\r
46#define EFI_AUTH_STATUS_IMAGE_SIGNED 0x02\r
47#define EFI_AUTH_STATUS_NOT_TESTED 0x04\r
48#define EFI_AUTH_STATUS_TEST_FAILED 0x08\r
5879b875 49\r
50/**\r
51 The ExtractSection() function processes the input section and\r
00edb218 52 returns a pointer to the section contents. If the section being\r
5879b875 53 extracted does not require processing (if the section\r
00edb218
A
54 GuidedSectionHeader.Attributes has the\r
55 EFI_GUIDED_SECTION_PROCESSING_REQUIRED field cleared), then\r
56 OutputBuffer is just updated to point to the start of the\r
5879b875 57 section's contents. Otherwise, *Buffer must be allocated\r
58 from PEI permanent memory.\r
59\r
00edb218
A
60 @param This Indicates the\r
61 EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI instance.\r
62 Buffer containing the input GUIDed section to be\r
63 processed. OutputBuffer OutputBuffer is\r
64 allocated from PEI permanent memory and contains\r
65 the new section stream.\r
5879b875 66 \r
00edb218
A
67 @param OutputSize A pointer to a caller-allocated\r
68 UINTN in which the size of *OutputBuffer\r
69 allocation is stored. If the function\r
70 returns anything other than EFI_SUCCESS,\r
71 the value of OutputSize is undefined.\r
5879b875 72 \r
00edb218 73 @param AuthenticationStatus A pointer to a caller-allocated\r
5879b875 74 UINT32 that indicates the\r
75 authentication status of the\r
76 output buffer. If the input\r
77 section's GuidedSectionHeader.\r
78 Attributes field has the\r
79 EFI_GUIDED_SECTION_AUTH_STATUS_VALID \r
80 bit as clear,\r
81 AuthenticationStatus must return\r
82 zero. These bits reflect the\r
83 status of the extraction\r
84 operation. If the function\r
85 returns anything other than\r
86 EFI_SUCCESS, the value of\r
87 AuthenticationStatus is\r
88 undefined.\r
89 \r
00edb218 90 @retval EFI_SUCCESS The InputSection was\r
5879b875 91 successfully processed and the\r
92 section contents were returned.\r
93 \r
00edb218 94 @retval EFI_OUT_OF_RESOURCES The system has insufficient\r
5879b875 95 resources to process the request.\r
96 \r
97 @reteval EFI_INVALID_PARAMETER The GUID in InputSection does\r
98 not match this instance of the\r
99 GUIDed Section Extraction PPI.\r
100**/\r
101typedef\r
102EFI_STATUS\r
103(EFIAPI *EFI_PEI_EXTRACT_GUIDED_SECTION)(\r
00edb218
A
104 IN CONST EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI *This,\r
105 IN CONST VOID *InputSection,\r
106 OUT VOID **OutputBuffer,\r
107 OUT UINTN *OutputSize,\r
108 OUT UINT32 *AuthenticationStatus\r
5879b875 109);\r
110\r
111\r
112\r
113/**\r
114 If a GUID-defined section is encountered when doing section extraction,\r
115 the PEI Foundation or the EFI_PEI_FILE_LOADER_PPI instance\r
116 calls the appropriate instance of the GUIDed Section\r
117 Extraction PPI to extract the section stream contained\r
118 therein.\r
119 \r
120 \r
00edb218 121 @param ExtractSection Takes the GUIDed section as input and\r
5879b875 122 produces the section stream data. See\r
123 the ExtractSection() function\r
124 description.\r
125 \r
126**/\r
127struct _EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI {\r
00edb218 128 EFI_PEI_EXTRACT_GUIDED_SECTION ExtractSection;\r
5879b875 129};\r
130\r
131\r
132\r
133#endif\r
134\r