mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-10 09:44:13 +00:00
m1n1.trace.dart: Add DART tracer/handler
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
b7147a130a
commit
42b7adad06
2 changed files with 55 additions and 0 deletions
27
proxyclient/hv/trace_dart.py
Normal file
27
proxyclient/hv/trace_dart.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
from m1n1.trace.dart import DARTTracer
|
||||
|
||||
DARTTracer = DARTTracer._reloadcls()
|
||||
|
||||
DEVICES = [
|
||||
"/arm-io/dart-pmp",
|
||||
"/arm-io/dart-sep",
|
||||
"/arm-io/dart-sio",
|
||||
"/arm-io/dart-usb1",
|
||||
"/arm-io/dart-disp0",
|
||||
"/arm-io/dart-dcp",
|
||||
"/arm-io/dart-dispext0",
|
||||
"/arm-io/dart-dcpext",
|
||||
"/arm-io/dart-scaler",
|
||||
]
|
||||
|
||||
dart_tracers = {}
|
||||
|
||||
for i in DEVICES:
|
||||
tracer = DARTTracer(hv, i, verbose=3)
|
||||
tracer.start()
|
||||
|
||||
dart_tracers[i.split("-")[-1]] = tracer
|
||||
|
||||
del tracer
|
28
proxyclient/m1n1/trace/dart.py
Normal file
28
proxyclient/m1n1/trace/dart.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
from ..hw.dart import *
|
||||
from ..hv import TraceMode
|
||||
from ..utils import *
|
||||
from . import ADTDevTracer
|
||||
|
||||
class DARTTracer(ADTDevTracer):
|
||||
RELOAD_DEPS = [DART]
|
||||
|
||||
DEFAULT_MODE = TraceMode.ASYNC
|
||||
|
||||
REGMAPS = [DARTRegs]
|
||||
NAMES = ["regs"]
|
||||
|
||||
@classmethod
|
||||
def _reloadcls(cls):
|
||||
global DART
|
||||
DART = DART._reloadcls()
|
||||
return super()._reloadcls()
|
||||
|
||||
def start(self):
|
||||
super().start()
|
||||
self.dart = DART(self.hv.iface, self.regs.cached)
|
||||
|
||||
def w_STREAM_COMMAND(self, stream_command):
|
||||
if stream_command.INVALIDATE:
|
||||
self.dart.invalidate_cache()
|
Loading…
Reference in a new issue