mem: Minor refactor of how the abstract mem backdoor is exposed.
authorGabe Black <gabe.black@gmail.com>
Wed, 4 Nov 2020 08:59:14 +0000 (00:59 -0800)
committerGabe Black <gabe.black@gmail.com>
Fri, 6 Nov 2020 00:58:04 +0000 (00:58 +0000)
commit8be5be68587bb763805e1b61469d364f5df7af22
tree7f3a7c1b55b621a2d14243b03ac7a7e9318bb7c6
parent2cfc24b8dc27acc0ef2ac421b79f839c0354fefd
mem: Minor refactor of how the abstract mem backdoor is exposed.

Previously the SimpleMem depended on the fact that it inherited from the
AbstractMem in order to access and export it's back door. Now, the
AbstractMem has a method which will set a back door pointer if
appropriate, which the SimpleMem can use, or anything else which uses an
AbstractMem as its backing store.

Also, make the AbstractMem invalidate any existing back doors and refuse
to give out any new ones while some bit of memory is locked. That's
because if the storage is accessed directly, the AbstractMem will have
no change to manage its bookkeeping, and locking won't work properly.

Change-Id: If8c2a63e0827bb88b583f27ab4151d6b761e116e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/36977
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
src/mem/abstract_mem.cc
src/mem/abstract_mem.hh
src/mem/simple_mem.cc