]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Core/Dxe/ArchProtocol/Security/Security.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Core / Dxe / ArchProtocol / Security / Security.h
CommitLineData
3eb9473e 1/*++\r
2\r
f57387d5
HT
3Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 Security.h\r
15\r
16Abstract:\r
17\r
18 Security Architectural Protocol as defined in the DXE CIS\r
19\r
20 Used to provide Security services. Specifically, dependening upon the \r
21 authentication state of a discovered driver in a Firmware Volume, the \r
22 portable DXE Core Dispatcher will call into the Security Architectural \r
23 Protocol (SAP) with the authentication state of the driver.\r
24\r
25 This call-out allows for OEM-specific policy decisions to be made, such\r
26 as event logging for attested boots, locking flash in response to discovering\r
27 an unsigned driver or failed signature check, or other exception response.\r
28\r
29 The SAP can also change system behavior by having the DXE core put a driver\r
30 in the Schedule-On-Request (SOR) state. This will allow for later disposition \r
31 of the driver by platform agent, such as Platform BDS.\r
32\r
33--*/\r
34\r
35#ifndef _ARCH_PROTOCOL_SECURITY_H_\r
36#define _ARCH_PROTOCOL_SECURITY_H_\r
37\r
38//\r
39// Global ID for the Security Code Architectural Protocol\r
40//\r
41#define EFI_SECURITY_ARCH_PROTOCOL_GUID \\r
7ccf38a3 42 { 0xA46423E3, 0x4617, 0x49f1, {0xB9, 0xFF, 0xD1, 0xBF, 0xA9, 0x11, 0x58, 0x39} }\r
3eb9473e 43\r
44EFI_FORWARD_DECLARATION (EFI_SECURITY_ARCH_PROTOCOL);\r
45\r
46typedef \r
47EFI_STATUS\r
48(EFIAPI *EFI_SECURITY_FILE_AUTHENTICATION_STATE) (\r
49 IN EFI_SECURITY_ARCH_PROTOCOL *This,\r
50 IN UINT32 AuthenticationStatus,\r
51 IN EFI_DEVICE_PATH_PROTOCOL *File\r
52 )\r
53/*++\r
54\r
55Routine Description:\r
56\r
57 The EFI_SECURITY_ARCH_PROTOCOL (SAP) is used to abstract platform-specific \r
58 policy from the DXE core response to an attempt to use a file that returns a \r
59 given status for the authentication check from the section extraction protocol. \r
60\r
61 The possible responses in a given SAP implementation may include locking \r
62 flash upon failure to authenticate, attestation logging for all signed drivers, \r
63 and other exception operations. The File parameter allows for possible logging \r
64 within the SAP of the driver.\r
65\r
66 If File is NULL, then EFI_INVALID_PARAMETER is returned.\r
67\r
68 If the file specified by File with an authentication status specified by \r
69 AuthenticationStatus is safe for the DXE Core to use, then EFI_SUCCESS is returned.\r
70\r
71 If the file specified by File with an authentication status specified by \r
72 AuthenticationStatus is not safe for the DXE Core to use under any circumstances, \r
73 then EFI_ACCESS_DENIED is returned.\r
74\r
75 If the file specified by File with an authentication status specified by \r
76 AuthenticationStatus is not safe for the DXE Core to use right now, but it \r
77 might be possible to use it at a future time, then EFI_SECURITY_VIOLATION is \r
78 returned.\r
79\r
80Arguments:\r
81\r
82 This - The EFI_SECURITY_ARCH_PROTOCOL instance.\r
83\r
84 AuthenticationStatus - This is the authentication type returned from the Section \r
85 Extraction protocol. See the Section Extraction Protocol \r
86 Specification for details on this type.\r
87\r
88 File - This is a pointer to the device path of the file that is \r
89 being dispatched. This will optionally be used for logging.\r
90\r
91Returns:\r
92\r
93 EFI_SUCCESS - The file specified by File did authenticate, and the \r
94 platform policy dictates that the DXE Core may use File.\r
95\r
96 EFI_INVALID_PARAMETER - Driver is NULL.\r
97\r
98 EFI_SECURITY_VIOLATION - The file specified by File did not authenticate, and \r
99 the platform policy dictates that File should be placed \r
100 in the untrusted state. A file may be promoted from \r
101 the untrusted to the trusted state at a future time \r
102 with a call to the Trust() DXE Service.\r
103\r
104 EFI_ACCESS_DENIED - The file specified by File did not authenticate, and \r
105 the platform policy dictates that File should not be \r
106 used for any purpose. \r
107\r
108--*/\r
109;\r
110\r
111//\r
112// Interface stucture for the Timer Architectural Protocol\r
113//\r
6f80bb86 114struct _EFI_SECURITY_ARCH_PROTOCOL {\r
3eb9473e 115 EFI_SECURITY_FILE_AUTHENTICATION_STATE FileAuthenticationState;\r
6f80bb86 116};\r
3eb9473e 117/*++\r
118\r
119 Protocol Description:\r
120\r
121 The EFI_SECURITY_ARCH_PROTOCOL is used to abstract platform-specific policy\r
122 from the DXE core. This includes locking flash upon failure to authenticate, \r
123 attestation logging, and other exception operations.\r
124\r
125 The driver that produces the EFI_SECURITY_ARCH_PROTOCOL may also optionally \r
126 install the EFI_SECURITY_POLICY_PROTOCOL_GUID onto a new handle with a NULL \r
127 interface. The existence of this GUID in the protocol database means that \r
128 the GUIDed Section Extraction Protocol should authenticate the contents of \r
129 an Authentication Section. The expectation is that the GUIDed Section \r
130 Extraction protocol will look for the existence of the EFI_SECURITY_POLICY_ \r
131 PROTOCOL_GUID in the protocol database. If it exists, then the publication \r
132 thereof is taken as an injunction to attempt an authentication of any section \r
133 wrapped in an Authentication Section. See the Firmware File System \r
134 Specification for details on the GUIDed Section Extraction Protocol and \r
135 Authentication Sections.\r
136 \r
137 Parameters:\r
138 \r
139 FileAuthenticationState - This service is called upon fault with respect to \r
140 the authentication of a section of a file.\r
141\r
142--*/\r
143\r
144extern EFI_GUID gEfiSecurityArchProtocolGuid;\r
145\r
146#endif\r