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