diff options
| author | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-27 19:30:20 -0400 |
|---|---|---|
| committer | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-27 19:30:20 -0400 |
| commit | f32b430326af86bd956f3d49d1bf7b6a1b9c5e31 (patch) | |
| tree | 4dc321c41055bd68f1e1bb6707330df1ee9599fa /tools | |
| parent | a750204a15561e8e22d40c50df8e0827eb45fd8f (diff) | |
Switch 2: native memory/images, GPU-accessible attribute, TSG subcontexts, syncpoint shim
- gsv 111/112/114/423/429/430/314/315/435 track native memory and images with
real ids (meanings from changes.patch); 1510/435 use its block-linear layout.
- svc 0x80 sets a real GpuAccessible (0x20) memory attribute (from changes.patch).
- Characteristics report TSG subcontexts (flag 22, 64 per TSG at 0xb4); NvRm
otherwise allows one subcontext and a second NVN queue fails its setup.
- Syncpoint shim: flag 26, address-space ioctl 0xB, and GPU reads of the shim
page return guest syncpoint values (scheme from changes.patch).
- EDEN_NX2_IPC_TRACE also logs TIPC commands; gdbrsp.py watch/mem improvements.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/nx2/gdbrsp.py | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/tools/nx2/gdbrsp.py b/tools/nx2/gdbrsp.py index d7c8a16460..51968254fa 100644 --- a/tools/nx2/gdbrsp.py +++ b/tools/nx2/gdbrsp.py @@ -153,7 +153,8 @@ def main(): regs = rsp.regs() print(" ".join(f"{k}={v:#x}" for k, v in regs.items())) elif op == "mem": - a = regs[parts[1]] if parts[1] in regs else int(parts[1], 16) + base, _, off = parts[1].partition("+") + a = (regs[base] if base in regs else int(base, 16)) + (int(off, 16) if off else 0) data = rsp.mem(a, int(parts[2], 0)) for i in range(0, len(data), 16): words = [struct.unpack_from("<Q", data, i + j)[0] for j in range(0, min(16, len(data) - i) - 7, 8)] @@ -258,9 +259,24 @@ def main(): regs = r d = rsp.mem(addr, 8) val = struct.unpack("<Q", d)[0] if len(d) == 8 else None - print(f" w{i} {reply[:40]} pc={r.get('pc', 0):#x} lr={r.get('x30', 0) & 0xFFFFFFFFFFFF:#x} value={val if val is None else hex(val)}") + chain = [] + fp = r.get("x29", 0) + for _ in range(6): + fd = rsp.mem(fp, 16) + if len(fd) < 16: + break + nfp, ret = struct.unpack("<QQ", fd) + chain.append(ret & 0xFFFFFFFFFFFF) + if nfp <= fp: + break + fp = nfp + print(f" w{i} {reply[:40]} pc={r.get('pc', 0):#x} lr={r.get('x30', 0) & 0xFFFFFFFFFFFF:#x} value={val if val is None else hex(val)} chain=" + ",".join(f"{c:#x}" for c in chain)) if stopval is not None and val == stopval: break + # Step off the access with the watchpoint removed, then re-arm it. + rsp.cmd(f"z2,{addr:x},8") + rsp.cmd("s") + rsp.cmd(f"Z2,{addr:x},8") elif op == "sleep": import time time.sleep(float(parts[1])) |
