]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Ppi/Security2.h
Formalize comments for Protocols and PPIs.
[mirror_edk2.git] / MdePkg / Include / Ppi / Security2.h
CommitLineData
e5544398 1/** @file\r
d7132512 2 This file declares Pei Security2 PPI.\r
e5544398 3\r
d7132512 4 This PPI is installed by some platform PEIM that abstracts the security \r
4ca9b6c4 5 policy to the PEI Foundation, namely the case of a PEIM's authentication \r
d7132512
LG
6 state being returned during the PEI section extraction process.\r
7\r
8 Copyright (c) 2006 - 2008, Intel Corporation\r
e5544398 9 All rights reserved. This program and the accompanying materials \r
10 are licensed and made available under the terms and conditions of the BSD License \r
11 which accompanies this distribution. The full text of the license may be found at \r
12 http://opensource.org/licenses/bsd-license.php \r
13\r
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
16\r
e5544398 17 @par Revision Reference:\r
18 This PPI is defined in PI.\r
19 Version 1.0.\r
20\r
21**/\r
22\r
23#ifndef __SECURITY2_PPI_H__\r
24#define __SECURITY2_PPI_H__\r
25\r
26#define EFI_PEI_SECURITY2_PPI_GUID \\r
27 { 0xdcd0be23, 0x9586, 0x40f4, { 0xb6, 0x43, 0x6, 0x52, 0x2c, 0xed, 0x4e, 0xde } }\r
28\r
29\r
53f2d96e 30typedef struct _EFI_PEI_SECURITY2_PPI EFI_PEI_SECURITY2_PPI;\r
e5544398 31\r
32/**\r
d7132512
LG
33 Allows the platform builder to implement a security policy \r
34 in response to varying file authentication states.\r
35\r
e5544398 36 This service is published by some platform PEIM. The purpose of\r
37 this service is to expose a given platform's policy-based\r
38 response to the PEI Foundation. For example, if there is a PEIM\r
39 in a GUIDed encapsulation section and the extraction of the PEI\r
40 file section yields an authentication failure, there is no a\r
41 priori policy in the PEI Foundation. Specifically, this\r
42 situation leads to the question whether PEIMs that are either\r
43 not in GUIDed sections or are in sections whose authentication\r
13c38031 44 fails should still be executed.\r
45\r
46 @param PeiServices An indirect pointer to the PEI Services\r
47 Table published by the PEI Foundation.\r
48 @param This Interface pointer that implements the\r
49 particular EFI_PEI_SECURITY2_PPI instance.\r
50 @param AuthenticationStatus Authentication status of the file.\r
51 @param FvHandle Handle of the volume in which the file\r
52 resides. This allows different policies\r
53 depending on different firmware volumes.\r
54 @param FileHandle Handle of the file under review.\r
55 @param DeferExecution Pointer to a variable that alerts the\r
56 PEI Foundation to defer execution of a\r
57 PEIM.\r
58\r
59 @retval EFI_SUCCESS The service performed its action successfully.\r
60 @retval EFI_SECURITY_VIOLATION The object cannot be trusted.\r
e5544398 61\r
62**/\r
63typedef\r
64EFI_STATUS\r
8b13229b 65(EFIAPI *EFI_PEI_SECURITY_AUTHENTICATION_STATE)(\r
e5544398 66 IN CONST EFI_PEI_SERVICES **PeiServices,\r
67 IN CONST EFI_PEI_SECURITY2_PPI *This,\r
13c38031 68 IN UINT32 AuthenticationStatus,\r
69 IN EFI_PEI_FV_HANDLE FvHandle,\r
70 IN EFI_PEI_FV_HANDLE FileHandle,\r
e5544398 71 IN OUT BOOLEAN *DeferExecution\r
72);\r
73\r
13c38031 74///\r
75/// This PPI is a means by which the platform builder can indicate\r
76/// a response to a PEIM's authentication state. This can be in\r
77/// the form of a requirement for the PEI Foundation to skip a\r
78/// module using the DeferExecution Boolean output in the\r
79/// AuthenticationState() member function. Alternately, the\r
80/// Security PPI can invoke something like a cryptographic PPI\r
81/// that hashes the PEIM contents to log attestations, for which\r
82/// the FileHandle parameter in AuthenticationState() will be\r
83/// useful. If this PPI does not exist, PEIMs will be considered\r
84/// trusted.\r
85///\r
e5544398 86struct _EFI_PEI_SECURITY2_PPI {\r
87 EFI_PEI_SECURITY_AUTHENTICATION_STATE AuthenticationState;\r
88};\r
89\r
90\r
91extern EFI_GUID gEfiPeiSecurity2PpiGuid;\r
92\r
93#endif\r