blob: be872ce3c1821686ea84b1a5888b059a7c63b7d8 [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 Venture5251da92019-01-17 11:25:26 -08004#include "window_hw_interface.hpp"
Patrick Venturee7728422018-11-14 20:16:33 -08005
Patrick Venture92973f12018-11-16 21:00:44 -08006#include <memory>
7
Patrick Venturee7728422018-11-14 20:16:33 -08008namespace blobs
9{
10
Patrick Venture5251da92019-01-17 11:25:26 -080011class LpcMapperAspeed : public HardwareMapperInterface
Patrick Venturee7728422018-11-14 20:16:33 -080012{
13 public:
Patrick Venture5251da92019-01-17 11:25:26 -080014 static std::unique_ptr<HardwareMapperInterface>
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