memctrlbase: fix range bug in add_mem_mirror.

This commit is contained in:
Maxim Poliakovski 2020-12-19 08:24:04 +01:00
parent dbbaf13a78
commit 282940e580

View File

@ -90,7 +90,7 @@ bool MemCtrlBase::add_mem_mirror(uint32_t start_addr, uint32_t dest_addr) {
return false;
entry.start = start_addr;
entry.end = start_addr + (ref_entry->end - ref_entry->start) + 1;
entry.end = start_addr + (ref_entry->end - ref_entry->start);
entry.mirror = dest_addr;
entry.type = ref_entry->type | RT_MIRROR;
entry.devobj = 0;