1 #pragma once 2 3 #include "interface.hpp" 4 #include "io.hpp" 5 #include "pci.hpp" 6 7 #include <cstdint> 8 #include <ipmiblob/blob_interface.hpp> 9 10 constexpr std::uint16_t aspeedVendorId = 0x1a03; 11 constexpr std::uint16_t aspeedDeviceId = 0x2000; 12 13 namespace host_tool 14 { 15 16 class P2aDataHandler : public DataInterface 17 { 18 public: 19 P2aDataHandler(ipmiblob::BlobInterface* blob, HostIoInterface* io, 20 PciUtilInterface* pci) : 21 blob(blob), 22 io(io), pci(pci) 23 { 24 } 25 26 bool sendContents(const std::string& input, std::uint16_t session) override; 27 blobs::FirmwareBlobHandler::UpdateFlags supportedType() const override 28 { 29 return blobs::FirmwareBlobHandler::UpdateFlags::p2a; 30 } 31 32 private: 33 ipmiblob::BlobInterface* blob; 34 HostIoInterface* io; 35 PciUtilInterface* pci; 36 }; 37 38 } // namespace host_tool 39