Patrick Venture | 1cde5f9 | 2018-11-07 08:26:47 -0800 | [diff] [blame] | 1 | #include "pci_handler.hpp" |
| 2 | |
| 3 | #include <cstdint> |
| 4 | #include <vector> |
| 5 | |
| 6 | namespace blobs |
| 7 | { |
| 8 | |
| 9 | std::vector<std::uint8_t> PciDataHandler::copyFrom(std::uint32_t length) |
| 10 | { |
| 11 | /* TODO: implement this. */ |
| 12 | return {}; |
| 13 | } |
| 14 | |
Patrick Venture | 8c53533 | 2018-11-08 15:58:00 -0800 | [diff] [blame^] | 15 | bool PciDataHandler::write(const std::vector<std::uint8_t>& configuration) |
| 16 | { |
| 17 | /* PCI handler doesn't require configuration write, only read. */ |
| 18 | return false; |
| 19 | } |
| 20 | |
| 21 | std::vector<std::uint8_t> PciDataHandler::read() |
| 22 | { |
| 23 | /* PCI handler does require returning a configuration from read. */ |
| 24 | struct PciConfigResponse reply; |
| 25 | reply.address = 0; |
| 26 | |
| 27 | std::vector<std::uint8_t> bytes; |
| 28 | bytes.resize(sizeof(reply)); |
| 29 | |
| 30 | return bytes; |
| 31 | } |
| 32 | |
Patrick Venture | 1cde5f9 | 2018-11-07 08:26:47 -0800 | [diff] [blame] | 33 | } // namespace blobs |