blob: cf3c0972f476ce90575b7e38878f865dce675496 [file] [log] [blame]
Kevin Tungc5387272025-07-28 18:10:43 +08001#pragma once
2
3#include "tpm/tpm_device.hpp"
4
5#include <string_view>
6
7class TPM2Interface : public TPMInterface
8{
9 public:
10 TPM2Interface(sdbusplus::async::context& ctx, uint8_t tpmIndex) :
11 TPMInterface(ctx, tpmIndex)
12 {}
13
14 bool isUpdateSupported() const final
15 {
16 // Currently, we do not support TPM2 firmware updates
17 return false;
18 }
19
20 sdbusplus::async::task<bool> updateFirmware(const uint8_t* image,
21 size_t image_size) final;
22
23 sdbusplus::async::task<bool> getVersion(std::string& version) final;
24
25 private:
26 sdbusplus::async::task<bool> getProperty(std::string_view property,
27 uint32_t& value);
28};