]> git.proxmox.com Git - mirror_edk2.git/blob - SecurityPkg/Include/Ppi/FirmwareVolumeInfoPrehashedFV.h
23a56715cafbdd43074700452dc275d0b80e8a2b
[mirror_edk2.git] / SecurityPkg / Include / Ppi / FirmwareVolumeInfoPrehashedFV.h
1 /** @file
2 PPI to describe all hash digests for a given FV
3
4 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
5 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 PPI to describe all hash digests for a given FV
16
17 Copyright (c) 2017, Microsoft Corporation
18
19 All rights reserved.
20 Redistribution and use in source and binary forms, with or without
21 modification, are permitted provided that the following conditions are met:
22 1. Redistributions of source code must retain the above copyright notice,
23 this list of conditions and the following disclaimer.
24 2. Redistributions in binary form must reproduce the above copyright notice,
25 this list of conditions and the following disclaimer in the documentation
26 and/or other materials provided with the distribution.
27
28 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
29 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
30 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
31 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
32 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
33 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
35 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
36 OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
37 ADVISED 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 //
50 typedef 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 //
64 typedef struct {
65 UINT32 FvBase;
66 UINT32 FvLength;
67 UINT32 Count;
68 //HASH_INFO HashInfo[];
69 } EDKII_PEI_FIRMWARE_VOLUME_INFO_PREHASHED_FV_PPI;
70
71 extern EFI_GUID gEdkiiPeiFirmwareVolumeInfoPrehashedFvPpiGuid;
72
73 #endif
74