#pragma once #include "data_interface.hpp" #include #include #include #include #include #include namespace bios_bmc_smm_error_logger { /** * Data handler for reading and writing data via the PCI bridge. * */ class PciDataHandler : public DataInterface { public: explicit PciDataHandler(uint32_t regionAddress, size_t regionSize, std::unique_ptr fd); std::vector read(uint32_t offset, uint32_t length) override; uint32_t write(const uint32_t offset, const std::span bytes) override; uint32_t getMemoryRegionSize() override; private: uint32_t regionAddress; uint32_t regionSize; std::unique_ptr fd; stdplus::fd::MMap mmap; }; } // namespace bios_bmc_smm_error_logger