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