2007-06-21 04:52:36 +02:00
|
|
|
/** @file
|
2008-07-16 12:44:37 +02:00
|
|
|
This file declares Pei Security2 PPI.
|
2007-06-21 04:52:36 +02:00
|
|
|
|
2008-07-16 12:44:37 +02:00
|
|
|
This PPI is installed by some platform PEIM that abstracts the security
|
2008-07-25 12:37:15 +02:00
|
|
|
policy to the PEI Foundation, namely the case of a PEIM's authentication
|
2008-07-16 12:44:37 +02:00
|
|
|
state being returned during the PEI section extraction process.
|
|
|
|
|
2013-10-11 05:54:13 +02:00
|
|
|
Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
|
2010-04-23 17:46:20 +02:00
|
|
|
This program and the accompanying materials
|
2007-06-21 04:52:36 +02:00
|
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
|
|
|
|
@par Revision Reference:
|
2008-10-28 14:04:40 +01:00
|
|
|
This PPI is introduced in PI Version 1.0.
|
2007-06-21 04:52:36 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef __SECURITY2_PPI_H__
|
|
|
|
#define __SECURITY2_PPI_H__
|
|
|
|
|
|
|
|
#define EFI_PEI_SECURITY2_PPI_GUID \
|
|
|
|
{ 0xdcd0be23, 0x9586, 0x40f4, { 0xb6, 0x43, 0x6, 0x52, 0x2c, 0xed, 0x4e, 0xde } }
|
|
|
|
|
|
|
|
|
2007-06-21 09:14:45 +02:00
|
|
|
typedef struct _EFI_PEI_SECURITY2_PPI EFI_PEI_SECURITY2_PPI;
|
2007-06-21 04:52:36 +02:00
|
|
|
|
|
|
|
/**
|
2008-07-16 12:44:37 +02:00
|
|
|
Allows the platform builder to implement a security policy
|
|
|
|
in response to varying file authentication states.
|
|
|
|
|
2007-06-21 04:52:36 +02:00
|
|
|
This service is published by some platform PEIM. The purpose of
|
|
|
|
this service is to expose a given platform's policy-based
|
|
|
|
response to the PEI Foundation. For example, if there is a PEIM
|
|
|
|
in a GUIDed encapsulation section and the extraction of the PEI
|
|
|
|
file section yields an authentication failure, there is no a
|
|
|
|
priori policy in the PEI Foundation. Specifically, this
|
|
|
|
situation leads to the question whether PEIMs that are either
|
|
|
|
not in GUIDed sections or are in sections whose authentication
|
2008-09-23 09:55:57 +02:00
|
|
|
fails should still be executed.
|
|
|
|
|
|
|
|
@param PeiServices An indirect pointer to the PEI Services
|
|
|
|
Table published by the PEI Foundation.
|
|
|
|
@param This Interface pointer that implements the
|
|
|
|
particular EFI_PEI_SECURITY2_PPI instance.
|
|
|
|
@param AuthenticationStatus Authentication status of the file.
|
2008-12-08 15:48:27 +01:00
|
|
|
xx00 Image was not signed.
|
|
|
|
xxx1 Platform security policy override.
|
|
|
|
Assumes same meaning as 0010 (the image was signed, the
|
|
|
|
signature was tested, and the signature passed authentication test).
|
|
|
|
0010 Image was signed, the signature was tested,
|
|
|
|
and the signature passed authentication test.
|
|
|
|
0110 Image was signed and the signature was not tested.
|
|
|
|
1010 Image was signed, the signature was tested,
|
|
|
|
and the signature failed the authentication test.
|
2008-09-23 09:55:57 +02:00
|
|
|
@param FvHandle Handle of the volume in which the file
|
|
|
|
resides. This allows different policies
|
|
|
|
depending on different firmware volumes.
|
|
|
|
@param FileHandle Handle of the file under review.
|
|
|
|
@param DeferExecution Pointer to a variable that alerts the
|
|
|
|
PEI Foundation to defer execution of a
|
|
|
|
PEIM.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The service performed its action successfully.
|
|
|
|
@retval EFI_SECURITY_VIOLATION The object cannot be trusted.
|
2007-06-21 04:52:36 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 09:14:18 +02:00
|
|
|
(EFIAPI *EFI_PEI_SECURITY_AUTHENTICATION_STATE)(
|
2007-06-21 04:52:36 +02:00
|
|
|
IN CONST EFI_PEI_SERVICES **PeiServices,
|
|
|
|
IN CONST EFI_PEI_SECURITY2_PPI *This,
|
2008-09-23 09:55:57 +02:00
|
|
|
IN UINT32 AuthenticationStatus,
|
|
|
|
IN EFI_PEI_FV_HANDLE FvHandle,
|
2013-10-11 05:54:13 +02:00
|
|
|
IN EFI_PEI_FILE_HANDLE FileHandle,
|
2007-06-21 04:52:36 +02:00
|
|
|
IN OUT BOOLEAN *DeferExecution
|
|
|
|
);
|
|
|
|
|
2008-09-23 09:55:57 +02:00
|
|
|
///
|
|
|
|
/// This PPI is a means by which the platform builder can indicate
|
|
|
|
/// a response to a PEIM's authentication state. This can be in
|
|
|
|
/// the form of a requirement for the PEI Foundation to skip a
|
|
|
|
/// module using the DeferExecution Boolean output in the
|
|
|
|
/// AuthenticationState() member function. Alternately, the
|
|
|
|
/// Security PPI can invoke something like a cryptographic PPI
|
|
|
|
/// that hashes the PEIM contents to log attestations, for which
|
|
|
|
/// the FileHandle parameter in AuthenticationState() will be
|
|
|
|
/// useful. If this PPI does not exist, PEIMs will be considered
|
|
|
|
/// trusted.
|
|
|
|
///
|
2007-06-21 04:52:36 +02:00
|
|
|
struct _EFI_PEI_SECURITY2_PPI {
|
|
|
|
EFI_PEI_SECURITY_AUTHENTICATION_STATE AuthenticationState;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
extern EFI_GUID gEfiPeiSecurity2PpiGuid;
|
|
|
|
|
|
|
|
#endif
|