]> git.proxmox.com Git - mirror_edk2.git/blame - SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLibInternal.h
ArmPkg/ArmMmuLib ARM: fix thinko in second level page table handling
[mirror_edk2.git] / SecurityPkg / Library / TcgStorageOpalLib / TcgStorageOpalLibInternal.h
CommitLineData
a3068f06
ED
1/** @file\r
2 Internal functions for Opal Core library.\r
3\r
4Copyright (c) 2018, 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
15#ifndef _OPAL_INTERNAL_H_\r
16#define _OPAL_INTERNAL_H_\r
17\r
18#include <Library/TcgStorageOpalLib.h>\r
19\r
20\r
21/**\r
22\r
23 The function retrieves the MSID from the device specified\r
24\r
25 @param[in] AdminSpSession OPAL_SESSION with OPAL_UID_ADMIN_SP as OPAL_ADMIN_SP_ANYBODY_AUTHORITY\r
26 @param[out] ActiveDataRemovalMechanism Active Data Removal Mechanism that the device will use for Revert/RevertSP calls.\r
27\r
28**/\r
29TCG_RESULT\r
a3068f06
ED
30OpalPyrite2GetActiveDataRemovalMechanism (\r
31 OPAL_SESSION *AdminSpSession,\r
32 UINT8 *ActiveDataRemovalMechanism\r
33 );\r
34\r
35/**\r
36\r
37 Get the support attribute info.\r
38\r
39 @param[in] Session OPAL_SESSION with OPAL_UID_LOCKING_SP to retrieve info.\r
40 @param[in] FeatureCode The feature code user request.\r
41 @param[in, out] DataSize The data size.\r
42 @param[out] Data The data buffer used to save the feature descriptor.\r
43\r
44**/\r
45TCG_RESULT\r
46OpalGetFeatureDescriptor (\r
47 IN OPAL_SESSION *Session,\r
48 IN UINT16 FeatureCode,\r
49 IN OUT UINTN *DataSize,\r
50 OUT VOID *Data\r
51 );\r
52\r
53/**\r
54 Get revert timeout value.\r
55\r
56 @param[in] Session The session info for one opal device.\r
57\r
58**/\r
59UINT32\r
60GetRevertTimeOut (\r
61 IN OPAL_SESSION *Session\r
62 );\r
63\r
64/**\r
65\r
66 Reverts device using Admin SP Revert method.\r
67\r
68 @param[in] AdminSpSession OPAL_SESSION with OPAL_UID_ADMIN_SP as OPAL_ADMIN_SP_PSID_AUTHORITY to perform PSID revert.\r
69 @param[in] EstimateTimeCost Input the timeout value.\r
70\r
71**/\r
72TCG_RESULT\r
73OpalPyrite2PsidRevert(\r
74 OPAL_SESSION *AdminSpSession,\r
75 UINT32 EstimateTimeCost\r
76 );\r
77\r
78/**\r
79\r
80 The function calls the Admin SP RevertSP method on the Locking SP. If KeepUserData is True, then the optional parameter\r
81 to keep the user Data is set to True, otherwise the optional parameter is not provided.\r
82\r
83 @param[in] LockingSpSession OPAL_SESSION with OPAL_UID_LOCKING_SP as OPAL_LOCKING_SP_ADMIN1_AUTHORITY to revertSP\r
84 @param[in] KeepUserData Specifies whether or not to keep user Data when performing RevertSP action. True = keeps user Data.\r
85 @param[in/out] MethodStatus Method status of last action performed. If action succeeded, it should be TCG_METHOD_STATUS_CODE_SUCCESS.\r
86 @param[in] EstimateTimeCost Input the timeout value.\r
87\r
88**/\r
89TCG_RESULT\r
90OpalPyrite2AdminRevert(\r
91 OPAL_SESSION *LockingSpSession,\r
92 BOOLEAN KeepUserData,\r
93 UINT8 *MethodStatus,\r
94 UINT32 EstimateTimeCost\r
95 );\r
96\r
97#endif // _OPAL_CORE_H_\r