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/main.cpp b/tools/main.cpp
index f676f6a..3b9760c 100644
--- a/tools/main.cpp
+++ b/tools/main.cpp
@@ -17,6 +17,8 @@
 #include "bt.hpp"
 #include "io.hpp"
 #include "lpc.hpp"
+#include "p2a.hpp"
+#include "pci.hpp"
 #include "tool_errors.hpp"
 #include "updater.hpp"
 
@@ -34,11 +36,12 @@
 #include <vector>
 
 #define IPMILPC "ipmilpc"
+#define IPMIPCI "ipmipci"
 #define IPMIBT "ipmibt"
 
 namespace
 {
-const std::vector<std::string> interfaceList = {IPMIBT, IPMILPC};
+const std::vector<std::string> interfaceList = {IPMIBT, IPMILPC, IPMIPCI};
 }
 
 void usage(const char* program)
@@ -140,6 +143,7 @@
         ipmiblob::IpmiHandler ipmi;
         ipmiblob::BlobHandler blob(&ipmi);
         host_tool::DevMemDevice devmem;
+        host_tool::PciUtilImpl pci;
 
         std::unique_ptr<host_tool::DataInterface> handler;
 
@@ -153,6 +157,11 @@
             handler =
                 std::make_unique<host_tool::LpcDataHandler>(&blob, &devmem);
         }
+        else if (interface == IPMIPCI)
+        {
+            handler = std::make_unique<host_tool::P2aDataHandler>(
+                &blob, &devmem, &pci);
+        }
 
         if (!handler)
         {