p2a: add initial p2a support (empty)

Add initial pci-to-ahb host-side support, by just listing the aspeed pci
devices.

Tested: This dumped the aspeed PCI device listed on my test platform.
Change-Id: I6dc4aeb3b38ec2f95bfd716bda2d8eb4786328ab
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/tools/p2a.hpp b/tools/p2a.hpp
new file mode 100644
index 0000000..4c02107
--- /dev/null
+++ b/tools/p2a.hpp
@@ -0,0 +1,38 @@
+#pragma once
+
+#include "interface.hpp"
+#include "io.hpp"
+#include "pci.hpp"
+
+#include <cstdint>
+#include <ipmiblob/blob_interface.hpp>
+
+constexpr std::uint16_t aspeedVendorId = 0x1a03;
+constexpr std::uint16_t aspeedDeviceId = 0x2000;
+
+namespace host_tool
+{
+
+class P2aDataHandler : public DataInterface
+{
+  public:
+    P2aDataHandler(ipmiblob::BlobInterface* blob, HostIoInterface* io,
+                   PciUtilInterface* pci) :
+        blob(blob),
+        io(io), pci(pci)
+    {
+    }
+
+    bool sendContents(const std::string& input, std::uint16_t session) override;
+    blobs::FirmwareBlobHandler::UpdateFlags supportedType() const override
+    {
+        return blobs::FirmwareBlobHandler::UpdateFlags::p2a;
+    }
+
+  private:
+    ipmiblob::BlobInterface* blob;
+    HostIoInterface* io;
+    PciUtilInterface* pci;
+};
+
+} // namespace host_tool