]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/SecurityStubDxe/SecurityStub.h
The driver and library in MdePkg, MdeModulePkg and Nt32Pkg that don't depend on PI...
[mirror_edk2.git] / MdeModulePkg / Universal / SecurityStubDxe / SecurityStub.h
CommitLineData
ce2f5557 1/** @file\r
5d69642d 2 Inlcude the required definitions for Security Architectural Protocol stub driver\r
ce2f5557 3\r
5d69642d 4 Copyright (c) 2006 - 2008, Intel Corporation \r
ce2f5557 5 All rights reserved. This program and the accompanying materials \r
6 are licensed and made available under the terms and conditions of the BSD License \r
7 which accompanies this distribution. The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php \r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
13**/\r
14\r
5d69642d
LG
15#ifndef __SECURITY_STUB_ARCH_PROTOCOL_H__\r
16#define __SECURITY_STUB_ARCH_PROTOCOL_H__\r
ce2f5557 17\r
18\r
19//\r
20// Common header files for this module.\r
21//\r
60c93673 22#include <Uefi.h>\r
ce2f5557 23#include <Protocol/Security.h>\r
24#include <Library/DebugLib.h>\r
25#include <Library/UefiBootServicesTableLib.h>\r
26#include <Library/UefiDriverEntryPoint.h>\r
27\r
28//\r
29// Function prototypes\r
30//\r
5d69642d
LG
31/**\r
32 The EFI_SECURITY_ARCH_PROTOCOL (SAP) is used to abstract platform-specific \r
33 policy from the DXE core response to an attempt to use a file that returns a \r
34 given status for the authentication check from the section extraction protocol. \r
35\r
36 The possible responses in a given SAP implementation may include locking \r
37 flash upon failure to authenticate, attestation logging for all signed drivers, \r
38 and other exception operations. The File parameter allows for possible logging \r
39 within the SAP of the driver.\r
40\r
41 If File is NULL, then EFI_INVALID_PARAMETER is returned.\r
42\r
43 If the file specified by File with an authentication status specified by \r
44 AuthenticationStatus is safe for the DXE Core to use, then EFI_SUCCESS is returned.\r
45\r
46 If the file specified by File with an authentication status specified by \r
47 AuthenticationStatus is not safe for the DXE Core to use under any circumstances, \r
48 then EFI_ACCESS_DENIED is returned.\r
49\r
50 If the file specified by File with an authentication status specified by \r
51 AuthenticationStatus is not safe for the DXE Core to use right now, but it \r
52 might be possible to use it at a future time, then EFI_SECURITY_VIOLATION is \r
53 returned.\r
54\r
55 @param This The EFI_SECURITY_ARCH_PROTOCOL instance.\r
56 @param AuthenticationStatus \r
57 This is the authentication type returned from the Section\r
58 Extraction protocol. See the Section Extraction Protocol\r
59 Specification for details on this type.\r
60 @param File This is a pointer to the device path of the file that is\r
61 being dispatched. This will optionally be used for logging.\r
62\r
63 @retval EFI_SUCCESS Do nothing and return.\r
64 @retval EFI_INVALID_PARAMETER File is NULL.\r
65**/\r
ce2f5557 66EFI_STATUS\r
67EFIAPI\r
68SecurityStubAuthenticateState (\r
69 IN EFI_SECURITY_ARCH_PROTOCOL *This,\r
70 IN UINT32 AuthenticationStatus,\r
71 IN EFI_DEVICE_PATH_PROTOCOL *File\r
72 );\r
73\r
5d69642d
LG
74/**\r
75 The user Entry Point for DXE driver. The user code starts with this function\r
76 as the real entry point for the image goes into a library that calls this \r
77 function.\r
78\r
79 @param ImageHandle The firmware allocated handle for the EFI image. \r
80 @param SystemTable A pointer to the EFI System Table.\r
81 \r
82 @retval EFI_SUCCESS Install the sample Security Architectural Protocol successfully.\r
83\r
84**/\r
ce2f5557 85EFI_STATUS\r
86EFIAPI\r
87SecurityStubInitialize (\r
88 IN EFI_HANDLE ImageHandle,\r
89 IN EFI_SYSTEM_TABLE *SystemTable\r
90 );\r
91\r
92#endif\r