Android-cuttlefish cvd tool
|
#include <tpm_resource_manager.h>
Classes | |
class | ObjectSlot |
Public Member Functions | |
TpmResourceManager (ESYS_CONTEXT *esys) | |
~TpmResourceManager () | |
EsysLock | Esys () |
std::shared_ptr< ObjectSlot > | ReserveSlot () |
Private Attributes | |
std::mutex | mu_ |
ESYS_CONTEXT * | esys_ |
const std::uint32_t | maximum_object_slots_ |
std::atomic< std::uint32_t > | used_slots_ |
Object slot manager for TPM memory. The TPM can only hold a fixed number of objects at once. Some TPM operations are defined to consume slots either temporarily or until the resource is explicitly unloaded.
This implementation is intended for future extension, to track what objects are resident if we run out of space, or implement optimizations like LRU caching to avoid re-loading often-used resources.
cuttlefish::TpmResourceManager::TpmResourceManager | ( | ESYS_CONTEXT * | esys | ) |
cuttlefish::TpmResourceManager::~TpmResourceManager | ( | ) |
EsysLock cuttlefish::TpmResourceManager::Esys | ( | ) |
TpmObjectSlot cuttlefish::TpmResourceManager::ReserveSlot | ( | ) |
|
private |
|
private |
|
private |
|
private |