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.hpp b/pci_handler.hpp
index df936e4..2594f09 100644
--- a/pci_handler.hpp
+++ b/pci_handler.hpp
@@ -8,13 +8,23 @@
namespace blobs
{
+/** P2A configuration response. */
+struct PciConfigResponse
+{
+ std::uint32_t address;
+} __attribute__((packed));
+
+/**
+ * Data handler for reading and writing data via the P2A bridge.
+ */
class PciDataHandler : public DataInterface
{
-
public:
PciDataHandler() = default;
std::vector<std::uint8_t> copyFrom(std::uint32_t length) override;
+ bool write(const std::vector<std::uint8_t>& configuration) override;
+ std::vector<std::uint8_t> read() override;
};
} // namespace blobs