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