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