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