]>
Commit | Line | Data |
---|---|---|
3e5a3960 | 1 | /** @file\r |
2 | This file declares GUIDed section extraction protocol.\r | |
3 | \r | |
b80fbe85 | 4 | This interface provides a means of decoding a GUID defined encapsulation\r |
3e5a3960 | 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 | |
b80fbe85 | 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 | |
3e5a3960 | 14 | \r |
b80fbe85 | 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 | |
3e5a3960 | 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 | |
b80fbe85 | 29 | #include <PiDxe.h>\r |
3e5a3960 | 30 | \r |
31 | //\r | |
32 | // Protocol GUID definition. Each GUIDed section extraction protocol has the\r | |
33 | // same interface but with different GUID. All the GUIDs is defined here.\r | |
34 | // May add multiple GUIDs here.\r | |
35 | //\r | |
36 | #define EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_GUID \\r | |
37 | { \\r | |
38 | 0xFC1BCDB0, 0x7D31, 0x49aa, {0x93, 0x6A, 0xA4, 0x60, 0x0D, 0x9D, 0xD0, 0x83 } \\r | |
39 | }\r | |
40 | \r | |
41 | //\r | |
42 | // Forward reference for pure ANSI compatability\r | |
43 | //\r | |
44 | typedef struct _EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL;\r | |
45 | \r | |
46 | //\r | |
47 | // Protocol member functions\r | |
48 | //\r | |
49 | /**\r | |
b80fbe85 | 50 | Processes the input section and returns the data contained therein along\r |
3e5a3960 | 51 | with the authentication status.\r |
52 | \r | |
53 | @param This Indicates the EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL instance.\r | |
54 | @param InputSection Buffer containing the input GUIDed section to be processed.\r | |
55 | @param OutputBuffer *OutputBuffer is allocated from boot services pool memory\r | |
56 | and contains the new section stream.\r | |
57 | @param OutputSize A pointer to a caller-allocated UINTN in which the size\r | |
58 | of *OutputBuffer allocation is stored.\r | |
59 | @param AuthenticationStatus A pointer to a caller-allocated UINT32 that\r | |
60 | indicates the authentication status of the output buffer.\r | |
b80fbe85 | 61 | \r |
3e5a3960 | 62 | @retval EFI_SUCCESS The InputSection was successfully processed and the\r |
63 | section contents were returned.\r | |
64 | @retval EFI_OUT_OF_RESOURCES The system has insufficient resources to\r | |
65 | process the request.\r | |
66 | @retval EFI_INVALID_PARAMETER The GUID in InputSection does not match\r | |
67 | this instance of the GUIDed Section Extraction Protocol.\r | |
68 | \r | |
69 | **/\r | |
70 | \r | |
71 | typedef\r | |
72 | EFI_STATUS\r | |
73 | (EFIAPI *EFI_EXTRACT_GUIDED_SECTION) (\r | |
74 | IN EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL *This,\r | |
75 | IN VOID *InputSection,\r | |
76 | OUT VOID **OutputBuffer,\r | |
77 | OUT UINTN *OutputSize,\r | |
78 | OUT UINT32 *AuthenticationStatus\r | |
79 | );\r | |
80 | \r | |
81 | //\r | |
82 | // Protocol definition\r | |
83 | //\r | |
84 | /**\r | |
85 | @par Protocol Description:\r | |
b80fbe85 | 86 | If a GUID-defined section is encountered when doing section extraction,\r |
87 | the section extraction driver calls the appropriate instance of the GUIDed\r | |
3e5a3960 | 88 | Section Extraction Protocol to extract the section stream contained therein.\r |
89 | \r | |
90 | @param ExtractSection\r | |
b80fbe85 | 91 | Takes the GUIDed section as input and produces the section stream data.\r |
3e5a3960 | 92 | \r |
93 | **/\r | |
94 | struct _EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL {\r | |
95 | EFI_EXTRACT_GUIDED_SECTION ExtractSection;\r | |
96 | };\r | |
97 | \r | |
98 | //\r | |
99 | // may add other GUID here\r | |
100 | //\r | |
101 | extern EFI_GUID gEfiCrc32GuidedSectionExtractionProtocolGuid;\r | |
102 | \r | |
103 | #endif\r |