From 282940e580fa3c6e56c0ad4d3c4e964ee613c0b5 Mon Sep 17 00:00:00 2001 From: Maxim Poliakovski Date: Sat, 19 Dec 2020 08:24:04 +0100 Subject: [PATCH] memctrlbase: fix range bug in add_mem_mirror. --- devices/memctrlbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devices/memctrlbase.cpp b/devices/memctrlbase.cpp index aa6735e..049c815 100644 --- a/devices/memctrlbase.cpp +++ b/devices/memctrlbase.cpp @@ -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;