[Libre-soc-bugs] [Bug 1173] provide an option to switch ISACaller to use a different Mem class that uses mmap.mmap instead of a dict

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Mon Oct 23 21:29:59 BST 2023


--- Comment #6 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #5)
> self.mem_blocks = {                                                         
> File "/home/libresoc/src/openpower-isa/src/openpower/decoder/isa/mem.py",
> line 318, in <dictcomp>                                                     
> addr: mmap.mmap(-1, BLOCK_SIZE) for addr in block_addrs}
> OverflowError: Python int too large to convert to C ssize_t
> on an armv8l system

you need a 64-bit version of python. if you have a 32-bit python there isn't
enough address space to easily emulate 64-bit powerpc, since it creates 2x 4GiB
mmap-blocks (one at 0-4GiB and one where the powerpc64le stack gets mapped at
iirc 2**47 - 4GiB to 2**47). (it doesn't use that much ram since linux
allocates memory when it's accessed, not when it's mmapped, so your system
won't run out of ram.)

You are receiving this mail because:
You are on the CC list for the bug.

More information about the libre-soc-bugs mailing list