experiments/aop.py: Make _bootargs_span a property

Signed-off-by: Martin Povišer <povik@protonmail.com>
This commit is contained in:
Martin Povišer 2022-10-06 22:56:02 +02:00 committed by Hector Martin
parent 1d2a157fe8
commit f87d65a971

View file

@ -37,6 +37,7 @@ class AOPClient(StandardASC):
super().__init__(u, self.base, dart)
@property
def _bootargs_span(self):
base = self.fw_base + self.p.read32(self.fw_base + 0x224)
length = self.p.read32(self.fw_base + 0x228)
@ -44,11 +45,11 @@ class AOPClient(StandardASC):
return (base, length)
def read_bootargs(self):
blob = self.iface.readmem(*self._bootargs_span())
blob = self.iface.readmem(*self._bootargs_span)
return ASCArgumentSection(blob)
def write_bootargs(self, args):
base, _ = self._bootargs_span()
base, _ = self._bootargs_span
self.iface.writemem(base, args.to_bytes())
def update_bootargs(self, keyvals):