]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Include/Protocol/GuidedSectionExtraction.h
Add missing protocol
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / GuidedSectionExtraction.h
1 /** @file
2 This file declares GUIDed section extraction protocol.
3
4 This interface provides a means of decoding a GUID defined encapsulation
5 section. There may be multiple different GUIDs associated with the GUIDed
6 section extraction protocol. That is, all instances of the GUIDed section
7 extraction protocol must have the same interface structure.
8
9 Copyright (c) 2006, Intel Corporation
10 All rights reserved. This program and the accompanying materials
11 are licensed and made available under the terms and conditions of the BSD License
12 which accompanies this distribution. The full text of the license may be found at
13 http://opensource.org/licenses/bsd-license.php
14
15 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
16 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17
18 Module Name: GuidedSectionExtraction.h
19
20 @par Revision Reference:
21 This protocol is defined in Firmware Volume Specification.
22 Version 0.9
23
24 **/
25
26 #ifndef __GUIDED_SECTION_EXTRACTION_PROTOCOL_H__
27 #define __GUIDED_SECTION_EXTRACTION_PROTOCOL_H__
28
29 #include <PiDxe.h>
30
31 //
32 // Protocol GUID definition. Each GUIDed section extraction protocol has the
33 // same interface but with different GUID. All the GUIDs is defined here.
34 // May add multiple GUIDs here.
35 //
36 #define EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_GUID \
37 { \
38 0xFC1BCDB0, 0x7D31, 0x49aa, {0x93, 0x6A, 0xA4, 0x60, 0x0D, 0x9D, 0xD0, 0x83 } \
39 }
40
41 //
42 // Forward reference for pure ANSI compatability
43 //
44 typedef struct _EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL;
45
46 //
47 // Protocol member functions
48 //
49 /**
50 Processes the input section and returns the data contained therein along
51 with the authentication status.
52
53 @param This Indicates the EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL instance.
54 @param InputSection Buffer containing the input GUIDed section to be processed.
55 @param OutputBuffer *OutputBuffer is allocated from boot services pool memory
56 and contains the new section stream.
57 @param OutputSize A pointer to a caller-allocated UINTN in which the size
58 of *OutputBuffer allocation is stored.
59 @param AuthenticationStatus A pointer to a caller-allocated UINT32 that
60 indicates the authentication status of the output buffer.
61
62 @retval EFI_SUCCESS The InputSection was successfully processed and the
63 section contents were returned.
64 @retval EFI_OUT_OF_RESOURCES The system has insufficient resources to
65 process the request.
66 @retval EFI_INVALID_PARAMETER The GUID in InputSection does not match
67 this instance of the GUIDed Section Extraction Protocol.
68
69 **/
70
71 typedef
72 EFI_STATUS
73 (EFIAPI *EFI_EXTRACT_GUIDED_SECTION) (
74 IN EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL *This,
75 IN VOID *InputSection,
76 OUT VOID **OutputBuffer,
77 OUT UINTN *OutputSize,
78 OUT UINT32 *AuthenticationStatus
79 );
80
81 //
82 // Protocol definition
83 //
84 /**
85 @par Protocol Description:
86 If a GUID-defined section is encountered when doing section extraction,
87 the section extraction driver calls the appropriate instance of the GUIDed
88 Section Extraction Protocol to extract the section stream contained therein.
89
90 @param ExtractSection
91 Takes the GUIDed section as input and produces the section stream data.
92
93 **/
94 struct _EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL {
95 EFI_EXTRACT_GUIDED_SECTION ExtractSection;
96 };
97
98 //
99 // may add other GUID here
100 //
101 extern EFI_GUID gEfiCrc32GuidedSectionExtractionProtocolGuid;
102
103 #endif