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