VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Library/HstiLib.h

最後變更 在這個檔案是 99404,由 vboxsync 提交於 22 月 前

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 5.5 KB
 
1/** @file
2 Provides services to create, get and update HSTI table in AIP protocol.
3
4 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9#ifndef __HSTI_LIB_H__
10#define __HSTI_LIB_H__
11
12/**
13 Publish HSTI table in AIP protocol.
14
15 One system should have only one PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE.
16
17 If the Role is NOT PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE,
18 SecurityFeaturesRequired field will be ignored.
19
20 @param Hsti HSTI data
21 @param HstiSize HSTI size
22
23 @retval EFI_SUCCESS The HSTI data is published in AIP protocol.
24 @retval EFI_ALREADY_STARTED There is already HSTI table with Role and ImplementationID published in system.
25 @retval EFI_VOLUME_CORRUPTED The input HSTI data does not follow HSTI specification.
26 @retval EFI_OUT_OF_RESOURCES There is not enough system resource to publish HSTI data in AIP protocol.
27**/
28EFI_STATUS
29EFIAPI
30HstiLibSetTable (
31 IN VOID *Hsti,
32 IN UINTN HstiSize
33 );
34
35/**
36 Search HSTI table in AIP protocol, and return the data.
37 This API will return the HSTI table with indicated Role and ImplementationID,
38 NULL ImplementationID means to find the first HSTI table with indicated Role.
39
40 @param Role Role of HSTI data.
41 @param ImplementationID ImplementationID of HSTI data.
42 NULL means find the first one match Role.
43 @param Hsti HSTI data. This buffer is allocated by callee, and it
44 is the responsibility of the caller to free it after
45 using it.
46 @param HstiSize HSTI size
47
48 @retval EFI_SUCCESS The HSTI data in AIP protocol is returned.
49 @retval EFI_NOT_FOUND There is not HSTI table with the Role and ImplementationID published in system.
50**/
51EFI_STATUS
52EFIAPI
53HstiLibGetTable (
54 IN UINT32 Role,
55 IN CHAR16 *ImplementationID OPTIONAL,
56 OUT VOID **Hsti,
57 OUT UINTN *HstiSize
58 );
59
60/**
61 Set FeaturesVerified in published HSTI table.
62 This API will update the HSTI table with indicated Role and ImplementationID,
63 NULL ImplementationID means to find the first HSTI table with indicated Role.
64
65 @param Role Role of HSTI data.
66 @param ImplementationID ImplementationID of HSTI data.
67 NULL means find the first one match Role.
68 @param ByteIndex Byte index of FeaturesVerified of HSTI data.
69 @param BitMask Bit mask of FeaturesVerified of HSTI data.
70
71 @retval EFI_SUCCESS The FeaturesVerified of HSTI data updated in AIP protocol.
72 @retval EFI_NOT_STARTED There is not HSTI table with the Role and ImplementationID published in system.
73 @retval EFI_UNSUPPORTED The ByteIndex is invalid.
74**/
75EFI_STATUS
76EFIAPI
77HstiLibSetFeaturesVerified (
78 IN UINT32 Role,
79 IN CHAR16 *ImplementationID OPTIONAL,
80 IN UINT32 ByteIndex,
81 IN UINT8 BitMask
82 );
83
84/**
85 Clear FeaturesVerified in published HSTI table.
86 This API will update the HSTI table with indicated Role and ImplementationID,
87 NULL ImplementationID means to find the first HSTI table with indicated Role.
88
89 @param Role Role of HSTI data.
90 @param ImplementationID ImplementationID of HSTI data.
91 NULL means find the first one match Role.
92 @param ByteIndex Byte index of FeaturesVerified of HSTI data.
93 @param BitMask Bit mask of FeaturesVerified of HSTI data.
94
95 @retval EFI_SUCCESS The FeaturesVerified of HSTI data updated in AIP protocol.
96 @retval EFI_NOT_STARTED There is not HSTI table with the Role and ImplementationID published in system.
97 @retval EFI_UNSUPPORTED The ByteIndex is invalid.
98**/
99EFI_STATUS
100EFIAPI
101HstiLibClearFeaturesVerified (
102 IN UINT32 Role,
103 IN CHAR16 *ImplementationID OPTIONAL,
104 IN UINT32 ByteIndex,
105 IN UINT8 BitMask
106 );
107
108/**
109 Append ErrorString in published HSTI table.
110 This API will update the HSTI table with indicated Role and ImplementationID,
111 NULL ImplementationID means to find the first HSTI table with indicated Role.
112
113 @param Role Role of HSTI data.
114 @param ImplementationID ImplementationID of HSTI data.
115 NULL means find the first one match Role.
116 @param ErrorString ErrorString of HSTI data.
117
118 @retval EFI_SUCCESS The ErrorString of HSTI data is updated in AIP protocol.
119 @retval EFI_NOT_STARTED There is not HSTI table with the Role and ImplementationID published in system.
120 @retval EFI_OUT_OF_RESOURCES There is not enough system resource to update ErrorString.
121**/
122EFI_STATUS
123EFIAPI
124HstiLibAppendErrorString (
125 IN UINT32 Role,
126 IN CHAR16 *ImplementationID OPTIONAL,
127 IN CHAR16 *ErrorString
128 );
129
130/**
131 Set a new ErrorString in published HSTI table.
132 This API will update the HSTI table with indicated Role and ImplementationID,
133 NULL ImplementationID means to find the first HSTI table with indicated Role.
134
135 @param Role Role of HSTI data.
136 @param ImplementationID ImplementationID of HSTI data.
137 NULL means find the first one match Role.
138 @param ErrorString ErrorString of HSTI data.
139
140 @retval EFI_SUCCESS The ErrorString of HSTI data is updated in AIP protocol.
141 @retval EFI_NOT_STARTED There is not HSTI table with the Role and ImplementationID published in system.
142 @retval EFI_OUT_OF_RESOURCES There is not enough system resource to update ErrorString.
143**/
144EFI_STATUS
145EFIAPI
146HstiLibSetErrorString (
147 IN UINT32 Role,
148 IN CHAR16 *ImplementationID OPTIONAL,
149 IN CHAR16 *ErrorString
150 );
151
152#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette