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