firmware: add read/write configuration methods

A data handler may require the host-side client to read or write
configuration information.  Therefore, implement a method for
controlling this in the data handler object.

Change-Id: Id7f8ff54d90cece2e8751773a8696638c2a2ea77
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/pci_handler.cpp b/pci_handler.cpp
index 91edf63..1bcd700 100644
--- a/pci_handler.cpp
+++ b/pci_handler.cpp
@@ -12,4 +12,22 @@
     return {};
 }
 
+bool PciDataHandler::write(const std::vector<std::uint8_t>& configuration)
+{
+    /* PCI handler doesn't require configuration write, only read. */
+    return false;
+}
+
+std::vector<std::uint8_t> PciDataHandler::read()
+{
+    /* PCI handler does require returning a configuration from read. */
+    struct PciConfigResponse reply;
+    reply.address = 0;
+
+    std::vector<std::uint8_t> bytes;
+    bytes.resize(sizeof(reply));
+
+    return bytes;
+}
+
 } // namespace blobs