projects
/
openpower-isa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a4677d
)
MemMMap: raise error for bad load/fetch addresses when emulating mmap
author
Jacob Lifshay
<programmerjake@gmail.com>
Wed, 6 Dec 2023 09:08:25 +0000
(
01:08
-0800)
committer
Jacob Lifshay
<programmerjake@gmail.com>
Wed, 6 Dec 2023 09:08:25 +0000
(
01:08
-0800)
src/openpower/decoder/isa/mem.py
patch
|
blob
|
history
diff --git
a/src/openpower/decoder/isa/mem.py
b/src/openpower/decoder/isa/mem.py
index 4947e9b17cba14e40176e2e04af8d11f54109232..2b8c52794c927377478618d062b53f789b074392 100644
(file)
--- a/
src/openpower/decoder/isa/mem.py
+++ b/
src/openpower/decoder/isa/mem.py
@@
-991,6
+991,12
@@
class MemMMap(MemCommon):
def __access_addr_range_err(self, start_addr, size, needed_flag):
assert needed_flag != MMapPageFlags.W, \
"can't write to address 0x%X size 0x%X" % (start_addr, size)
+ if self.emulating_mmap:
+ exc = MemException("access not allowed",
+ "memory access not allowed: addr=0x%X: %s"
+ % (start_addr, needed_flag))
+ exc.dar = start_addr
+ raise exc
return None, 0
def __access_addr_range(self, start_addr, size, needed_flag):