fixes constructor calls of derived riscv_hart classes

This commit is contained in:
2023-09-27 07:51:49 +02:00
parent 2095ac985b
commit b7f023756e
3 changed files with 10 additions and 4 deletions

View File

@@ -81,7 +81,7 @@ public:
using mem_write_f = typename BASE::mem_write_f;
using phys_addr_t = typename BASE::phys_addr_t;
wt_cache();
wt_cache(feature_config cfg = feature_config{});
virtual ~wt_cache() = default;
unsigned size{4096};
@@ -103,7 +103,11 @@ protected:
template<typename BASE>
inline wt_cache<BASE>::wt_cache() {
inline wt_cache<BASE>::wt_cache(feature_config cfg)
:BASE(cfg)
, io_address{cfg.io_address}
, io_addr_mask{cfg.io_addr_mask}
{
auto cb = base_class::replace_mem_access(
[this](phys_addr_t a, unsigned l, uint8_t* const d) -> iss::status { return read_cache(a, l,d);},
[this](phys_addr_t a, unsigned l, uint8_t const* const d) -> iss::status { return write_cache(a, l,d);});