]>
Commit | Line | Data |
---|---|---|
30fdf114 LG |
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 | |
40d841f6 | 9 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r |
30fdf114 LG |
10 | \r |
11 | This program and the accompanying materials are licensed and made available\r | |
12 | under the terms and conditions of the BSD License which accompanies this\r | |
13 | distribution. The full text of the license may be found at:\r | |
14 | http://opensource.org/licenses/bsd-license.php\r | |
15 | \r | |
16 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
17 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
18 | \r | |
19 | File Name: EfiGuidedSectionExtraction.h\r | |
20 | \r | |
21 | @par Revision Reference: PI\r | |
22 | Version 1.00.\r | |
23 | \r | |
24 | **/\r | |
25 | \r | |
26 | #ifndef __EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL_H__\r | |
27 | #define __EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL_H__\r | |
28 | \r | |
29 | //\r | |
30 | // Forward reference for pure ANSI compatability\r | |
31 | \r | |
32 | typedef struct _EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL;\r | |
33 | \r | |
34 | \r | |
35 | /**\r | |
36 | The ExtractSection() function processes the input section and\r | |
37 | allocates a buffer from the pool in which it returns the section\r | |
38 | contents. If the section being extracted contains\r | |
39 | authentication information (the section's\r | |
40 | GuidedSectionHeader.Attributes field has the\r | |
41 | EFI_GUIDED_SECTION_AUTH_STATUS_VALID bit set), the values\r | |
42 | returned in AuthenticationStatus must reflect the results of\r | |
43 | the authentication operation. Depending on the algorithm and\r | |
44 | size of the encapsulated data, the time that is required to do\r | |
45 | a full authentication may be prohibitively long for some\r | |
46 | classes of systems. To indicate this, use\r | |
47 | EFI_SECURITY_POLICY_PROTOCOL_GUID, which may be published by\r | |
48 | the security policy driver (see the Platform Initialization\r | |
49 | Driver Execution Environment Core Interface Specification for\r | |
50 | more details and the GUID definition). If the\r | |
51 | EFI_SECURITY_POLICY_PROTOCOL_GUID exists in the handle\r | |
52 | database, then, if possible, full authentication should be\r | |
53 | skipped and the section contents simply returned in the\r | |
54 | OutputBuffer. In this case, the\r | |
55 | EFI_AUTH_STATUS_PLATFORM_OVERRIDE bit AuthenticationStatus\r | |
56 | must be set on return. ExtractSection() is callable only from\r | |
57 | TPL_NOTIFY and below. Behavior of ExtractSection() at any\r | |
58 | EFI_TPL above TPL_NOTIFY is undefined. Type EFI_TPL is\r | |
59 | defined in RaiseTPL() in the UEFI 2.0 specification.\r | |
60 | \r | |
61 | \r | |
62 | @param This Indicates the\r | |
63 | EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL instance.\r | |
64 | \r | |
65 | @param InputSection Buffer containing the input GUIDed section\r | |
66 | to be processed. OutputBuffer OutputBuffer\r | |
67 | is allocated from boot services pool\r | |
68 | memory and contains the new section\r | |
69 | stream. The caller is responsible for\r | |
70 | freeing this buffer.\r | |
71 | \r | |
72 | @param OutputSize A pointer to a caller-allocated UINTN in\r | |
73 | which the size of OutputBuffer allocation\r | |
74 | is stored. If the function returns\r | |
75 | anything other than EFI_SUCCESS, the value\r | |
76 | of OutputSize is undefined.\r | |
77 | \r | |
78 | @param AuthenticationStatus A pointer to a caller-allocated\r | |
79 | UINT32 that indicates the\r | |
80 | authentication status of the\r | |
81 | output buffer. If the input\r | |
82 | section's\r | |
83 | GuidedSectionHeader.Attributes\r | |
84 | field has the\r | |
85 | EFI_GUIDED_SECTION_AUTH_STATUS_VAL\r | |
86 | bit as clear, AuthenticationStatus\r | |
87 | must return zero. Both local bits\r | |
88 | (19:16) and aggregate bits (3:0)\r | |
89 | in AuthenticationStatus are\r | |
90 | returned by ExtractSection().\r | |
91 | These bits reflect the status of\r | |
92 | the extraction operation. The bit\r | |
93 | pattern in both regions must be\r | |
94 | the same, as the local and\r | |
95 | aggregate authentication statuses\r | |
96 | have equivalent meaning at this\r | |
97 | level. If the function returns\r | |
98 | anything other than EFI_SUCCESS,\r | |
99 | the value of AuthenticationStatus\r | |
100 | is undefined.\r | |
101 | \r | |
102 | \r | |
103 | @retval EFI_SUCCESS The InputSection was successfully\r | |
104 | processed and the section contents were\r | |
105 | returned.\r | |
106 | \r | |
107 | @retval EFI_OUT_OF_RESOURCES The system has insufficient\r | |
108 | resources to process the\r | |
109 | request.\r | |
110 | \r | |
111 | @retval EFI_INVALID_PARAMETER The GUID in InputSection does\r | |
112 | not match this instance of the\r | |
113 | GUIDed Section Extraction\r | |
114 | Protocol.\r | |
115 | \r | |
116 | **/\r | |
117 | typedef\r | |
118 | EFI_STATUS\r | |
119 | (EFIAPI *EFI_EXTRACT_GUIDED_SECTION)(\r | |
120 | IN CONST EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL *This,\r | |
121 | IN CONST VOID *InputSection,\r | |
122 | OUT VOID **OutputBuffer,\r | |
123 | OUT UINTN *OutputSize,\r | |
124 | OUT UINT32 *AuthenticationStatus\r | |
125 | );\r | |
126 | \r | |
127 | \r | |
128 | /**\r | |
129 | \r | |
130 | Takes the GUIDed section as input and produces the section\r | |
131 | stream data. See the ExtractSection() function description.\r | |
132 | \r | |
133 | **/\r | |
134 | struct _EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL {\r | |
135 | EFI_EXTRACT_GUIDED_SECTION ExtractSection;\r | |
136 | };\r | |
137 | \r | |
138 | //\r | |
139 | // Protocol GUID definition. Each GUIDed section extraction protocol has the\r | |
140 | // same interface but with different GUID. All the GUIDs is defined here.\r | |
141 | // May add multiple GUIDs here.\r | |
142 | //\r | |
143 | #define EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_GUID \\r | |
144 | { \\r | |
145 | 0xFC1BCDB0, 0x7D31, 0x49aa, {0x93, 0x6A, 0xA4, 0x60, 0x0D, 0x9D, 0xD0, 0x83 } \\r | |
146 | }\r | |
147 | \r | |
148 | //\r | |
149 | // may add other GUID here\r | |
150 | //\r | |
151 | extern EFI_GUID gEfiCrc32GuidedSectionExtractionProtocolGuid;\r | |
152 | \r | |
153 | #endif\r |