blob: 4c02107af5a2343db49bc479bbfb6f4577243c83 [file] [log] [blame]
Patrick Ventureb5bf0fc2019-05-03 14:33:49 -07001#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
10constexpr std::uint16_t aspeedVendorId = 0x1a03;
11constexpr std::uint16_t aspeedDeviceId = 0x2000;
12
13namespace host_tool
14{
15
16class 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