blob: 98e7a72af836c32c78d6b5efa41ff9fd74cd23d4 [file] [log] [blame]
Patrick Venturee7728422018-11-14 20:16:33 -08001#pragma once
2
Patrick Venture7b91cbc2018-11-28 14:24:41 -08003#include "internal/sys.hpp"
Patrick Venturee7728422018-11-14 20:16:33 -08004#include "lpc_interface.hpp"
5
Patrick Venture92973f12018-11-16 21:00:44 -08006#include <memory>
7
Patrick Venturee7728422018-11-14 20:16:33 -08008namespace blobs
9{
10
11class LpcMapperAspeed : public LpcMapperInterface
12{
13 public:
Patrick Venture7b91cbc2018-11-28 14:24:41 -080014 static std::unique_ptr<LpcMapperInterface>
Patrick Venture28abae72018-12-14 09:44:02 -080015 createAspeedMapper(std::size_t regionSize);
Patrick Venturee7728422018-11-14 20:16:33 -080016
Patrick Venture28abae72018-12-14 09:44:02 -080017 LpcMapperAspeed(std::size_t regionSize,
Patrick Venturefa9d0c92018-12-13 16:38:27 -080018 const internal::Sys* sys = &internal::sys_impl) :
Patrick Venture7b91cbc2018-11-28 14:24:41 -080019 regionSize(regionSize),
20 sys(sys){};
Patrick Venturee7728422018-11-14 20:16:33 -080021
22 std::pair<std::uint32_t, std::uint32_t>
23 mapWindow(std::uint32_t address, std::uint32_t length) override;
Patrick Venture7b91cbc2018-11-28 14:24:41 -080024
25 private:
Patrick Venture28abae72018-12-14 09:44:02 -080026 std::size_t regionSize;
Patrick Venturefa9d0c92018-12-13 16:38:27 -080027 const internal::Sys* sys;
Patrick Venturee7728422018-11-14 20:16:33 -080028};
29
30} // namespace blobs