Skip to content

Commit e892cbf

Browse files
committed
m1n1.adt: Fix parsing of reg properties without size annotation
The M5 14-inch Macbook Pro has "dptx?-aux-core" nodes with reg property but their parent nodes are missing "#address-cells" / "#size-cells" properties. Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 4e10ef6 commit e892cbf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

proxyclient/m1n1/adt.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,8 @@ def __iter__(self):
710710

711711
@property
712712
def _reg_struct(self):
713+
if not hasattr(self._parent, "address_cells") or not hasattr(self._parent, "size_cells"):
714+
return Int32ul
713715
ac, sc = self._parent.address_cells, self._parent.size_cells
714716
return Struct(
715717
"addr" / Hex(Int64ul) if ac == 2 else Array(ac, Hex(Int32ul)),

0 commit comments

Comments
 (0)