summaryrefslogtreecommitdiffstats
path: root/pci_handler.hpp
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2019-06-26 19:39:36 -0700
committerPatrick Venture <venture@google.com>2019-06-27 07:38:43 -0700
commitf0c71df2514927e933f6fc33d9669ab0663a0706 (patch)
tree8de2435c00544071991144a70a4f54b5e125191a /pci_handler.hpp
parentc2298de03fca543df2dc337f13a5be7ee3c4ab5b (diff)
downloadphosphor-ipmi-flash-f0c71df2514927e933f6fc33d9669ab0663a0706.tar.gz
phosphor-ipmi-flash-f0c71df2514927e933f6fc33d9669ab0663a0706.zip
move bmc code into bmc folder
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I2407359461a1a2f0e733ff8cd0cb1744b6304c32
Diffstat (limited to 'pci_handler.hpp')
-rw-r--r--pci_handler.hpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/pci_handler.hpp b/pci_handler.hpp
deleted file mode 100644
index 1cafc32..0000000
--- a/pci_handler.hpp
+++ /dev/null
@@ -1,48 +0,0 @@
-#pragma once
-
-#include "data_handler.hpp"
-#include "internal/sys.hpp"
-
-#include <cstdint>
-#include <string>
-#include <vector>
-
-namespace ipmi_flash
-{
-
-/** P2A configuration response. */
-struct PciConfigResponse
-{
- std::uint32_t address;
-} __attribute__((packed));
-
-/**
- * Data handler for reading and writing data via the P2A bridge.
- *
- * @note: Currently implemented to support only aspeed-p2a-ctrl.
- */
-class PciDataHandler : public DataInterface
-{
- public:
- PciDataHandler(std::uint32_t regionAddress, std::size_t regionSize,
- const internal::Sys* sys = &internal::sys_impl) :
- regionAddress(regionAddress),
- memoryRegionSize(regionSize), sys(sys){};
-
- bool open() override;
- bool close() override;
- std::vector<std::uint8_t> copyFrom(std::uint32_t length) override;
- bool writeMeta(const std::vector<std::uint8_t>& configuration) override;
- std::vector<std::uint8_t> readMeta() override;
-
- private:
- std::uint32_t regionAddress;
- std::uint32_t memoryRegionSize;
- const internal::Sys* sys;
-
- int mappedFd = -1;
- std::uint8_t* mapped = nullptr;
- static const std::string p2aControlPath;
-};
-
-} // namespace ipmi_flash
OpenPOWER on IntegriCloud