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