2 Provides services to create, get and update HSTI table in AIP protocol.
4 Copyright (c) 2015, 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
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.
15 #ifndef __HSTI_LIB_H__
16 #define __HSTI_LIB_H__
19 Publish HSTI table in AIP protocol.
21 One system should have only one PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE.
23 If the Role is NOT PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE,
24 SecurityFeaturesRequired field will be ignored.
27 @param HstiSize HSTI size
29 @retval EFI_SUCCESS The HSTI data is published in AIP protocol.
30 @retval EFI_ALREADY_STARTED There is already HSTI table with Role and ImplementationID published in system.
31 @retval EFI_VOLUME_CORRUPTED The input HSTI data does not follow HSTI specification.
32 @retval EFI_OUT_OF_RESOURCES There is not enough system resource to publish HSTI data in AIP protocol.
42 Search HSTI table in AIP protocol, and return the data.
43 This API will return the HSTI table with indicated Role and ImplementationID,
44 NULL ImplementationID means to find the first HSTI table with indicated Role.
46 @param Role Role of HSTI data.
47 @param ImplementationID ImplementationID of HSTI data.
48 NULL means find the first one match Role.
49 @param Hsti HSTI data. This buffer is allocated by callee, and it
50 is the responsibility of the caller to free it after
52 @param HstiSize HSTI size
54 @retval EFI_SUCCESS The HSTI data in AIP protocol is returned.
55 @retval EFI_NOT_FOUND There is not HSTI table with the Role and ImplementationID published in system.
61 IN CHAR16
*ImplementationID OPTIONAL
,
67 Set FeaturesVerified in published HSTI table.
68 This API will update the HSTI table with indicated Role and ImplementationID,
69 NULL ImplementationID means to find the first HSTI table with indicated Role.
71 @param Role Role of HSTI data.
72 @param ImplementationID ImplementationID of HSTI data.
73 NULL means find the first one match Role.
74 @param ByteIndex Byte index of FeaturesVerified of HSTI data.
75 @param BitMask Bit mask of FeaturesVerified of HSTI data.
77 @retval EFI_SUCCESS The FeaturesVerified of HSTI data updated in AIP protocol.
78 @retval EFI_NOT_STARTED There is not HSTI table with the Role and ImplementationID published in system.
79 @retval EFI_UNSUPPORTED The ByteIndex is invalid.
83 HstiLibSetFeaturesVerified (
85 IN CHAR16
*ImplementationID
, OPTIONAL
91 Clear FeaturesVerified in published HSTI table.
92 This API will update the HSTI table with indicated Role and ImplementationID,
93 NULL ImplementationID means to find the first HSTI table with indicated Role.
95 @param Role Role of HSTI data.
96 @param ImplementationID ImplementationID of HSTI data.
97 NULL means find the first one match Role.
98 @param ByteIndex Byte index of FeaturesVerified of HSTI data.
99 @param BitMask Bit mask of FeaturesVerified of HSTI data.
101 @retval EFI_SUCCESS The FeaturesVerified of HSTI data updated in AIP protocol.
102 @retval EFI_NOT_STARTED There is not HSTI table with the Role and ImplementationID published in system.
103 @retval EFI_UNSUPPORTED The ByteIndex is invalid.
107 HstiLibClearFeaturesVerified (
109 IN CHAR16
*ImplementationID
, OPTIONAL
115 Append ErrorString in published HSTI table.
116 This API will update the HSTI table with indicated Role and ImplementationID,
117 NULL ImplementationID means to find the first HSTI table with indicated Role.
119 @param Role Role of HSTI data.
120 @param ImplementationID ImplementationID of HSTI data.
121 NULL means find the first one match Role.
122 @param ErrorString ErrorString of HSTI data.
124 @retval EFI_SUCCESS The ErrorString of HSTI data is updated in AIP protocol.
125 @retval EFI_NOT_STARTED There is not HSTI table with the Role and ImplementationID published in system.
126 @retval EFI_OUT_OF_RESOURCES There is not enough system resource to update ErrorString.
130 HstiLibAppendErrorString (
132 IN CHAR16
*ImplementationID
, OPTIONAL
133 IN CHAR16
*ErrorString
137 Set a new ErrorString in published HSTI table.
138 This API will update the HSTI table with indicated Role and ImplementationID,
139 NULL ImplementationID means to find the first HSTI table with indicated Role.
141 @param Role Role of HSTI data.
142 @param ImplementationID ImplementationID of HSTI data.
143 NULL means find the first one match Role.
144 @param ErrorString ErrorString of HSTI data.
146 @retval EFI_SUCCESS The ErrorString of HSTI data is updated in AIP protocol.
147 @retval EFI_NOT_STARTED There is not HSTI table with the Role and ImplementationID published in system.
148 @retval EFI_OUT_OF_RESOURCES There is not enough system resource to update ErrorString.
152 HstiLibSetErrorString (
154 IN CHAR16
*ImplementationID
, OPTIONAL
155 IN CHAR16
*ErrorString