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