]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /** @file\r |
2 | This file declares Section Extraction PPI.\r | |
3 | \r | |
4 | Copyright (c) 2006, Intel Corporation \r | |
5 | All rights reserved. This program and the accompanying materials \r | |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php \r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
12 | \r | |
13 | Module Name: SectionExtraction.h\r | |
14 | \r | |
15 | @par Revision Reference:\r | |
16 | This PPI is defined in PEI CIS.\r | |
17 | Version 0.91.\r | |
18 | \r | |
19 | **/\r | |
20 | \r | |
21 | #ifndef __SECTION_EXTRACTION_PPI_H__\r | |
22 | #define __SECTION_EXTRACTION_PPI_H__\r | |
23 | \r | |
24 | #define EFI_PEI_SECTION_EXTRACTION_PPI_GUID \\r | |
25 | { \\r | |
26 | 0x4F89E208, 0xE144, 0x4804, {0x9E, 0xC8, 0x0F, 0x89, 0x4F, 0x7E, 0x36, 0xD7 } \\r | |
27 | }\r | |
28 | \r | |
29 | typedef struct _EFI_PEI_SECTION_EXTRACTION_PPI EFI_PEI_SECTION_EXTRACTION_PPI;\r | |
30 | \r | |
31 | //\r | |
32 | // Bit values for AuthenticationStatus\r | |
33 | //\r | |
34 | #define EFI_PEI_AUTH_STATUS_PLATFORM_OVERRIDE 0x01\r | |
35 | #define EFI_PEI_AUTH_STATUS_IMAGE_SIGNED 0x02\r | |
36 | #define EFI_PEI_AUTH_STATUS_NOT_TESTED 0x04\r | |
37 | #define EFI_PEI_AUTH_STATUS_TEST_FAILED 0x08\r | |
38 | \r | |
39 | /**\r | |
40 | The function is used to retrieve a section from within a section file.\r | |
41 | It will retrieve both encapsulation sections and leaf sections in their entirety,\r | |
42 | exclusive of the section header.\r | |
43 | \r | |
44 | @param PeiServices Pointer to the PEI Services Table.\r | |
45 | \r | |
46 | @param This Indicates the calling context\r | |
47 | \r | |
48 | @param SectionType Pointer to an EFI_SECTION_TYPE. If SectionType == NULL, \r | |
49 | the contents of the entire section are returned in Buffer. If SectionType \r | |
50 | is not NULL, only the requested section is returned.\r | |
51 | \r | |
52 | @param SectionDefinitionGuid Pointer to an EFI_GUID.\r | |
53 | If SectionType == EFI_SECTION_GUID_DEFINED, SectionDefinitionGuid \r | |
54 | indicates for which section GUID to search.\r | |
55 | If SectionType != EFI_SECTION_GUID_DEFINED, SectionDefinitionGuid \r | |
56 | is unused and is ignored.\r | |
57 | \r | |
58 | @param SectionInstance If SectionType is not NULL, indicates which \r | |
59 | instance of the requested section type to return.\r | |
60 | \r | |
61 | @param Buffer Pointer to a pointer to a buffer in which the section \r | |
62 | contents are returned.\r | |
63 | \r | |
64 | @param BufferSize A pointer to a caller-allocated UINT32.On input, *BufferSize \r | |
65 | indicates the size in bytes of the memory region pointed to by Buffer.On output,\r | |
66 | *BufferSize contains the number of bytes required to read the section.\r | |
67 | \r | |
68 | @param AuthenticationStatus A pointer to a caller-allocated UINT32 in \r | |
69 | which any metadata from encapsulating GUID-defined sections is returned.\r | |
70 | \r | |
71 | @retval EFI_SUCCESS The section was successfully processed and the section \r | |
72 | contents were returned in Buffer.\r | |
73 | \r | |
74 | @retval EFI_PROTOCOL_ERROR A GUID-defined section was encountered in \r | |
75 | the file with its EFI_GUIDED_SECTION_PROCESSING_REQUIRED bit set, but \r | |
76 | there was no corresponding GUIDed Section Extraction Protocol in the \r | |
77 | handle database.*Buffer is unmodified.\r | |
78 | \r | |
79 | @retval EFI_NOT_FOUND The requested section does not exist.*Buffer is unmodified.\r | |
80 | \r | |
81 | @retval EFI_OUT_OF_RESOURCES The system has insufficient resources to process the request.\r | |
82 | \r | |
83 | @retval EFI_INVALID_PARAMETER The SectionStreamHandle does not exist.\r | |
84 | \r | |
85 | @retval EFI_WARN_TOO_SMALL The size of the input buffer is insufficient to \r | |
86 | contain the requested section. The input buffer is filled and contents are\r | |
87 | section contents are truncated.\r | |
88 | \r | |
89 | **/\r | |
90 | typedef\r | |
91 | EFI_STATUS\r | |
92 | (EFIAPI *EFI_PEI_GET_SECTION) (\r | |
93 | IN EFI_PEI_SERVICES **PeiServices,\r | |
94 | IN EFI_PEI_SECTION_EXTRACTION_PPI *This,\r | |
95 | IN EFI_SECTION_TYPE *SectionType,\r | |
96 | IN EFI_GUID *SectionDefinitionGuid, OPTIONAL\r | |
97 | IN UINTN SectionInstance,\r | |
98 | IN VOID **Buffer,\r | |
99 | IN OUT UINT32 *BufferSize,\r | |
100 | OUT UINT32 *AuthenticationStatus\r | |
101 | );\r | |
102 | \r | |
103 | /**\r | |
104 | @par Ppi Description:\r | |
105 | This PPI supports encapsulating sections, such as GUIDed sections used to \r | |
106 | authenticate the file encapsulation of other domain-specific wrapping.\r | |
107 | \r | |
108 | @param GetSection\r | |
109 | Retrieves a section from within a section file.\r | |
110 | \r | |
111 | **/\r | |
112 | struct _EFI_PEI_SECTION_EXTRACTION_PPI {\r | |
113 | EFI_PEI_GET_SECTION PeiGetSection;\r | |
114 | };\r | |
115 | \r | |
116 | extern EFI_GUID gEfiPeiSectionExtractionPpiGuid;\r | |
117 | \r | |
118 | #endif\r |