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