]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Protocol/TcgPlatform.h
Correct ASSERT to more cases.
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / TcgPlatform.h
CommitLineData
504214c4 1/** @file\r
0c0f3174 2\r
504214c4
LG
3 Tcg addtional services to measure PeImage and ActionString\r
4\r
5Copyright (c) 2006 - 2008, Intel Corporation \r
0c0f3174
LG
6All rights reserved. This program and the accompanying materials \r
7are licensed and made available under the terms and conditions of the BSD License \r
8which accompanies this distribution. The full text of the license may be found at \r
9http://opensource.org/licenses/bsd-license.php \r
10 \r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
13\r
504214c4 14**/\r
0c0f3174
LG
15\r
16#ifndef _TCG_PLATFORM_PROTOCOL_H_\r
17#define _TCG_PLATFORM_PROTOCOL_H_\r
18\r
19#define EFI_TCG_PLATFORM_PROTOCOL_GUID \\r
20 { 0x8c4c9a41, 0xbf56, 0x4627, { 0x9e, 0xa, 0xc8, 0x38, 0x6d, 0x66, 0x11, 0x5c } }\r
21\r
22typedef struct tdEFI_TCG_PLATFORM_PROTOCOL EFI_TCG_PLATFORM_PROTOCOL;\r
23\r
24//\r
25// EFI TCG Platform Protocol\r
26//\r
bfaa7cd7
LG
27/**\r
28 \r
29 Measure PE/COFF Image File prior to the application of any fix-ups or relocations.\r
30 \r
31 @param BootPolicy If TRUE, indicates that the request originates from the boot manager,\r
32 and that the boot manager is attempting to load FilePath as a boot selection.\r
33 @param ImageAddress The memory address to PE/COFF image.\r
34 @param ImageSize The size of PE/COFF image.\r
35 @param LinkTimeBase The image base address in the original PeImage.\r
36 @param ImageType The subsystem type of the PeImage.\r
37 @param DeviceHandle The handle to device matched the file path. \r
38 @param FilePath The specific file path from which the image is loaded.\r
39 \r
40 @retval EFI_SUCCESS Measure successfully.\r
41 @retval EFI_UNSUPPORTED The loaded PeImage is not supported.\r
42 @retval EFI_OUT_OF_RESOURCES The resource of memory is not enough.\r
43\r
44**/\r
0c0f3174
LG
45typedef\r
46EFI_STATUS\r
7d839888 47(EFIAPI *EFI_TCG_MEASURE_PE_IMAGE)(\r
0c0f3174
LG
48 IN BOOLEAN BootPolicy,\r
49 IN EFI_PHYSICAL_ADDRESS ImageAddress,\r
50 IN UINTN ImageSize,\r
51 IN UINTN LinkTimeBase,\r
52 IN UINT16 ImageType,\r
53 IN EFI_HANDLE DeviceHandle,\r
54 IN EFI_DEVICE_PATH_PROTOCOL *FilePath\r
55 );\r
56\r
bfaa7cd7
LG
57/**\r
58 \r
59 Measure efi action string.\r
60 \r
61 @param ActionString Pointer to action string.\r
62 \r
63 @retval EFI_SUCCESS Measure action string successfully.\r
64\r
65**/\r
0c0f3174
LG
66typedef\r
67EFI_STATUS\r
7d839888 68(EFIAPI *EFI_TCG_MEASURE_ACTION)(\r
0c0f3174
LG
69 IN CHAR8 *ActionString\r
70 );\r
71\r
72struct tdEFI_TCG_PLATFORM_PROTOCOL {\r
73 EFI_TCG_MEASURE_PE_IMAGE MeasurePeImage;\r
74 EFI_TCG_MEASURE_ACTION MeasureAction;\r
75};\r
76\r
77extern EFI_GUID gEfiTcgPlatformProtocolGuid;\r
78\r
79#endif\r