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