]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - SecurityPkg/Include/Ppi/FirmwareVolumeInfoPrehashedFV.h
MdeModulePkg/DxePrintLibPrint2Protocol: Fix error in Precision position calculation
[mirror_edk2.git] / SecurityPkg / Include / Ppi / FirmwareVolumeInfoPrehashedFV.h
... / ...
CommitLineData
1/** @file
2PPI to describe all hash digests for a given FV
3
4Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
5This program and the accompanying materials
6are licensed and made available under the terms and conditions of the BSD License
7which accompanies this distribution. The full text of the license may be found at
8http://opensource.org/licenses/bsd-license.php
9
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13**/
14/**
15PPI to describe all hash digests for a given FV
16
17Copyright (c) 2017, Microsoft Corporation
18
19All rights reserved.
20Redistribution and use in source and binary forms, with or without
21modification, are permitted provided that the following conditions are met:
221. Redistributions of source code must retain the above copyright notice,
23this list of conditions and the following disclaimer.
242. Redistributions in binary form must reproduce the above copyright notice,
25this list of conditions and the following disclaimer in the documentation
26 and/or other materials provided with the distribution.
27
28THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
29ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
30WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
31IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
32INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
33BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
35LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
36OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
37ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38
39**/
40
41#ifndef __PEI_FIRMWARE_VOLUME_INFO_PREHASHED_FV_H__
42#define __PEI_FIRMWARE_VOLUME_INFO_PREHASHED_FV_H__
43
44#define EDKII_PEI_FIRMWARE_VOLUME_INFO_PREHASHED_FV_PPI_GUID \
45 { 0x3ce1e631, 0x7008, 0x477c, { 0xad, 0xa7, 0x5d, 0xcf, 0xc7, 0xc1, 0x49, 0x4b } }
46
47//
48// HashAlgoId is TPM_ALG_ID in Tpm20.h
49//
50typedef struct _HASH_INFO {
51 UINT16 HashAlgoId;
52 UINT16 HashSize;
53 //UINT8 Hash[];
54} HASH_INFO;
55
56//
57// This PPI carries prehashsed data for one FV. Platform should ensure 1:1 mapping between pre-hashed PPI and corresponding FV.
58// The Count field in PPI is followed by Count number of FV hash info entries, which can be extended to PCR and logged to TCG event log directly by TCG modules.
59// TCG module checks TPM required hash algorithms(PcdTpm2HashMask) with each pre-hased PPIs
60// For each pre-hashed PPI
61// If PPI carries hash generated by equivalent or larger algorithm set than TPM required, directly use PPI
62// else, drops PPI data and cacluate all hash again
63//
64typedef struct {
65 UINT32 FvBase;
66 UINT32 FvLength;
67 UINT32 Count;
68 //HASH_INFO HashInfo[];
69} EDKII_PEI_FIRMWARE_VOLUME_INFO_PREHASHED_FV_PPI;
70
71extern EFI_GUID gEdkiiPeiFirmwareVolumeInfoPrehashedFvPpiGuid;
72
73#endif
74