Tool for automatically generating MMU and translation table setup code, whether to drag and drop into your own bare metal arm64 projects or to assist you in your own learning.
MIT License
61
stars
18
forks
source link
AttributeError: 'Region' object has no attribute 'map' #4
<cut out for brevity>
[DEBUG] mapping complete chunk at index 2014
[DEBUG] mapping complete chunk at index 2015
[DEBUG] mapping complete chunk at index 83
[DEBUG] mapping complete chunk at index 84
[DEBUG] mapping complete chunk at index 85
[DEBUG] mapping complete chunk at index 86
[DEBUG] mapping complete chunk at index 87
[DEBUG] mapping complete chunk at index 88
[DEBUG]
[DEBUG] mapping region 0xb3fe0000 in level 2 table
[DEBUG] Region(lineno=3, label='NT-DRAM(MMU_TABLE)', addr=0xb3fe0000, length=0x20000, memory_type=MEMORY_TYPE.rw_data
[DEBUG] floating region, dispatching to next-level table
[DEBUG]
[DEBUG] mapping region 0xb3fe0000 in level 3 table
[DEBUG] Region(lineno=3, label='NT-DRAM(MMU_TABLE)', addr=0xb3fe0000, length=0x20000, memory_type=MEMORY_TYPE.rw_data
[DEBUG] mapping complete chunk at index 2040
[DEBUG] mapping complete chunk at index 2041
[DEBUG] mapping complete chunk at index 2042
[DEBUG] mapping complete chunk at index 2043
[DEBUG] mapping complete chunk at index 2044
[DEBUG] mapping complete chunk at index 2045
[DEBUG] mapping complete chunk at index 2046
[DEBUG] mapping complete chunk at index 2047
<runs to completion and generates mmu_map.S>
If I process the following map using a slight offset:
<cut out for brevity>
[DEBUG] mapping complete chunk at index 2007
[DEBUG] mapping complete chunk at index 2008
[DEBUG] mapping complete chunk at index 2009
[DEBUG] mapping complete chunk at index 2010
[DEBUG] mapping complete chunk at index 2011
[DEBUG] mapping complete chunk at index 2012
[DEBUG] mapping complete chunk at index 2013
[DEBUG] mapping complete chunk at index 2014
[DEBUG] mapping complete chunk at index 2015
[DEBUG] mapping complete chunk at index 2016
[DEBUG] mapping complete chunk at index 2017
[DEBUG] mapping complete chunk at index 2018
[DEBUG] mapping complete chunk at index 2019
[DEBUG] mapping complete chunk at index 2020
[DEBUG] mapping complete chunk at index 2021
[DEBUG] mapping complete chunk at index 2022
[DEBUG] mapping complete chunk at index 2023
[DEBUG] mapping complete chunk at index 2024
[DEBUG] mapping complete chunk at index 2025
[DEBUG] mapping complete chunk at index 2026
[DEBUG] mapping complete chunk at index 2027
[DEBUG] mapping complete chunk at index 2028
[DEBUG] mapping complete chunk at index 2029
[DEBUG] mapping complete chunk at index 2030
[DEBUG] mapping complete chunk at index 2031
[DEBUG] mapping complete chunk at index 83
[DEBUG] mapping complete chunk at index 84
[DEBUG] mapping complete chunk at index 85
[DEBUG] mapping complete chunk at index 86
[DEBUG] mapping complete chunk at index 87
[DEBUG] mapping complete chunk at index 88
[DEBUG] mapping complete chunk at index 89
[DEBUG]
[DEBUG] mapping region 0xb3fe0000 in level 2 table
[DEBUG] Region(lineno=3, label='NT-DRAM(MMU_TABLE)', addr=0xb3fe0000, length=0x20000, memory_type=MEMORY_TYPE.rw_data
[DEBUG] floating region, dispatching to next-level table
Traceback (most recent call last):
File "/home/goldfish/Downloads/arm64-pgtable-tool/generate.py", line 20, in <module>
import pgtt
File "/home/goldfish/Downloads/arm64-pgtable-tool/pgtt/__init__.py", line 27, in <module>
from . import table
File "/home/goldfish/Downloads/arm64-pgtable-tool/pgtt/table.py", line 202, in <module>
[root.map(r) for r in mmap.regions]
File "/home/goldfish/Downloads/arm64-pgtable-tool/pgtt/table.py", line 202, in <listcomp>
[root.map(r) for r in mmap.regions]
File "/home/goldfish/Downloads/arm64-pgtable-tool/pgtt/table.py", line 92, in map
self.entries[start_idx].map(region)
<Errors here and exits>
Did I overlook a boundary/range condition or is this a bug? The same behavior exists in python3.8.
If I process the following map using commit hash fdc0fb06343e76bc7d71aafb6fd84543bea59b8d (current HEAD of master):
using this command:
I generate the expected map
If I process the following map using a slight offset:
using the same command:
I receive the following error:
Did I overlook a boundary/range condition or is this a bug? The same behavior exists in python3.8.
Thank you