TianoCore EDK2 master
Loading...
Searching...
No Matches
TcgStorageOpalLibInternal.h File Reference

Go to the source code of this file.

Functions

TCG_RESULT OpalPyrite2GetActiveDataRemovalMechanism (OPAL_SESSION *AdminSpSession, UINT8 *ActiveDataRemovalMechanism)
 
TCG_RESULT OpalGetFeatureDescriptor (IN OPAL_SESSION *Session, IN UINT16 FeatureCode, IN OUT UINTN *DataSize, OUT VOID *Data)
 
UINT32 GetRevertTimeOut (IN OPAL_SESSION *Session)
 
TCG_RESULT OpalPyrite2PsidRevert (OPAL_SESSION *AdminSpSession, UINT32 EstimateTimeCost)
 
TCG_RESULT OpalPyrite2AdminRevert (OPAL_SESSION *LockingSpSession, BOOLEAN KeepUserData, UINT8 *MethodStatus, UINT32 EstimateTimeCost)
 

Detailed Description

Internal functions for Opal Core library.

Copyright (c) 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file TcgStorageOpalLibInternal.h.

Function Documentation

◆ GetRevertTimeOut()

UINT32 GetRevertTimeOut ( IN OPAL_SESSION Session)

Get revert timeout value.

Parameters
[in]SessionThe session info for one opal device.

Definition at line 1104 of file TcgStorageOpalUtil.c.

◆ OpalGetFeatureDescriptor()

TCG_RESULT OpalGetFeatureDescriptor ( IN OPAL_SESSION Session,
IN UINT16  FeatureCode,
IN OUT UINTN DataSize,
OUT VOID *  Data 
)

Get the support attribute info.

Parameters
[in]SessionOPAL_SESSION with OPAL_UID_LOCKING_SP to retrieve info.
[in]FeatureCodeThe feature code user request.
[in,out]DataSizeThe data size.
[out]DataThe data buffer used to save the feature descriptor.

Get the descriptor for the specific feature code.

Parameters
[in]SessionOPAL_SESSION with OPAL_UID_LOCKING_SP to retrieve info.
[in]FeatureCodeThe feature code user request.
[in,out]DataSizeThe data size.
[out]DataThe data buffer used to save the feature descriptor.

Definition at line 1904 of file TcgStorageOpalCore.c.

◆ OpalPyrite2AdminRevert()

TCG_RESULT OpalPyrite2AdminRevert ( OPAL_SESSION LockingSpSession,
BOOLEAN  KeepUserData,
UINT8 *  MethodStatus,
UINT32  EstimateTimeCost 
)

The function calls the Admin SP RevertSP method on the Locking SP. If KeepUserData is True, then the optional parameter to keep the user Data is set to True, otherwise the optional parameter is not provided.

Parameters
[in]LockingSpSessionOPAL_SESSION with OPAL_UID_LOCKING_SP as OPAL_LOCKING_SP_ADMIN1_AUTHORITY to revertSP
[in]KeepUserDataSpecifies whether or not to keep user Data when performing RevertSP action. True = keeps user Data.
[in/out]MethodStatus Method status of last action performed. If action succeeded, it should be TCG_METHOD_STATUS_CODE_SUCCESS.
[in]EstimateTimeCostInput the timeout value.

The function calls the Admin SP RevertSP method on the Locking SP. If KeepUserData is True, then the optional parameter to keep the user Data is set to True, otherwise the optional parameter is not provided.

Parameters
[in]LockingSpSessionOPAL_SESSION with OPAL_UID_LOCKING_SP as OPAL_LOCKING_SP_ADMIN1_AUTHORITY to revertSP
[in]KeepUserDataSpecifies whether or not to keep user Data when performing RevertSP action. True = keeps user Data.
[in/out]MethodStatus Method status of last action performed. If action succeeded, it should be TCG_METHOD_STATUS_CODE_SUCCESS.
[in]EstimateTimeCostEstimate the time needed.

Definition at line 852 of file TcgStorageOpalCore.c.

◆ OpalPyrite2GetActiveDataRemovalMechanism()

TCG_RESULT OpalPyrite2GetActiveDataRemovalMechanism ( OPAL_SESSION AdminSpSession,
UINT8 *  ActiveDataRemovalMechanism 
)

The function retrieves the MSID from the device specified

Parameters
[in]AdminSpSessionOPAL_SESSION with OPAL_UID_ADMIN_SP as OPAL_ADMIN_SP_ANYBODY_AUTHORITY
[out]ActiveDataRemovalMechanismActive Data Removal Mechanism that the device will use for Revert/RevertSP calls.

◆ OpalPyrite2PsidRevert()

TCG_RESULT OpalPyrite2PsidRevert ( OPAL_SESSION AdminSpSession,
UINT32  EstimateTimeCost 
)

Reverts device using Admin SP Revert method.

Parameters
[in]AdminSpSessionOPAL_SESSION with OPAL_UID_ADMIN_SP as OPAL_ADMIN_SP_PSID_AUTHORITY to perform PSID revert.
[in]EstimateTimeCostInput the timeout value.

Reverts device using Admin SP Revert method.

Parameters
[in]AdminSpSessionOPAL_SESSION with OPAL_UID_ADMIN_SP as OPAL_ADMIN_SP_PSID_AUTHORITY to perform PSID revert.
[in]EstimateTimeCostEstimate the time needed.

Definition at line 336 of file TcgStorageOpalCore.c.