From 1c99bfbeffff04529f6f669601fdf835a73778da Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Fri, 2 Oct 2026 11:44:31 -0400 Subject: rename (cosmetic): green-eye -> risc-v-gsp-rm-debugger in user-facing names, docs, CLI, launcher and CI workflow; internal greeneye package/module identifiers unchanged (includes in-flight greeneye module edits present in the tree) --- .../docs/22-PORTING-CUDA-AND-DEVICES.md | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'debug/risc-v-gsp-rm-vm/docs/22-PORTING-CUDA-AND-DEVICES.md') diff --git a/debug/risc-v-gsp-rm-vm/docs/22-PORTING-CUDA-AND-DEVICES.md b/debug/risc-v-gsp-rm-vm/docs/22-PORTING-CUDA-AND-DEVICES.md index ad8a5e7..d92c0f0 100644 --- a/debug/risc-v-gsp-rm-vm/docs/22-PORTING-CUDA-AND-DEVICES.md +++ b/debug/risc-v-gsp-rm-vm/docs/22-PORTING-CUDA-AND-DEVICES.md @@ -1,8 +1,8 @@ -# 22 — Porting with green-eye: CUDA userspace, GSP firmware and new GPU devices +# 22 — Porting with risc-v-gsp-rm-debugger: CUDA userspace, GSP firmware and new GPU devices > **# TOOL IN DEVELOPMENT - NOT READY YET!** See 00-OVERVIEW for status. > This is the combined porting guide for the three churn axes the project -> faces. It joins the existing CUDA/GSP/firmware procedures with green-eye's +> faces. It joins the existing CUDA/GSP/firmware procedures with risc-v-gsp-rm-debugger's > runtime layer. Items marked "planned (docs/xx)" do not exist yet; do not > invent commands for them. @@ -68,19 +68,19 @@ tools/cudatool.py delta /run/libcuda.so. /run/libcuda.so. ### 2.2 Static analysis vs dynamic confirmation -| Step | Existing project tooling | green-eye addition | +| Step | Existing project tooling | risc-v-gsp-rm-debugger addition | |---|---|---| | Export/interface diff | `tools/cudatool.py delta` | — | | Function matching / name-transfer measurement | `tools/cudatool.py fdematch --names ` | — | | Corpus-level diff (added/removed/resized functions) | `tools/diff_corpus.py ` | — | -| Name transfer + corpus annotation | `ApplyNameMap.java` (`--dry-run` first), `tools/annotate_corpus.py` | `./greeneye.sh symbols export` builds a runtime-address symbol DB from the same index/names | -| Driver-API smoke | `tools/test/cuda_drv_test.c` compiled as `/tmp/cdt` (prints `ALL OK`) | `./greeneye.sh symbols resolve --db ... ` spot-checks transferred addresses per call path | -| Runtime workload | `tools/cuda-ab/ab.sh all` (`vector_add.cu`; `RESULT`/`STATUS` must match host) | session-format evidence and `./greeneye.sh compare` when firmware-side sessions exist | +| Name transfer + corpus annotation | `ApplyNameMap.java` (`--dry-run` first), `tools/annotate_corpus.py` | `./risc-v-gsp-rm-debugger.sh symbols export` builds a runtime-address symbol DB from the same index/names | +| Driver-API smoke | `tools/test/cuda_drv_test.c` compiled as `/tmp/cdt` (prints `ALL OK`) | `./risc-v-gsp-rm-debugger.sh symbols resolve --db ... ` spot-checks transferred addresses per call path | +| Runtime workload | `tools/cuda-ab/ab.sh all` (`vector_add.cu`; `RESULT`/`STATUS` must match host) | session-format evidence and `./risc-v-gsp-rm-debugger.sh compare` when firmware-side sessions exist | | Guest-side control observation | `tools/guest-diag/ioctl_trace.c`, host module trace (`gsp-resman-vfio:`) | annotation of the firmware-side RPC path with the per-version symbol DB | -| Firmware-side confirmation | — | `./greeneye.sh probe` / `record` / `compare` against the paired firmware | +| Firmware-side confirmation | — | `./risc-v-gsp-rm-debugger.sh probe` / `record` / `compare` against the paired firmware | **Be honest about the execution boundary.** `cdt` and `vectorAdd` are x86_64 -guest binaries; the RISC-V simulator does not execute them. green-eye's +guest binaries; the RISC-V simulator does not execute them. risc-v-gsp-rm-debugger's contribution to a userspace port is the **symbol/evidence layer**: a runtime-address DB per `libcuda` version, per-address resolution checks for transferred names, and a recorded comparison format for the GSP-side behaviour @@ -109,17 +109,17 @@ remains the dynamic oracle. 5. **Transfer names and knowledge.** Apply the map with `ApplyNameMap.java` `--dry-run` first, then for real; translate the subsystem index; re-validate entries the delta marked as moved. -6. **Build the green-eye symbol DB** for the new version so runtime addresses +6. **Build the risc-v-gsp-rm-debugger symbol DB** for the new version so runtime addresses resolve: ```bash cd debug/risc-v-gsp-rm-vm - ./greeneye.sh symbols export \ + ./risc-v-gsp-rm-debugger.sh symbols export \ --names ../../userspace/cuda//annotations/names.tsv \ --index ../../userspace/cuda//run/analysis/decompiled/decompiled_index.tsv \ --callgraph ../../userspace/cuda//run/analysis/elf-index/callgraph.tsv \ --bias 0x100000 -o symbols-.json - ./greeneye.sh symbols resolve --db symbols-.json 0x + ./risc-v-gsp-rm-debugger.sh symbols resolve --db symbols-.json 0x ``` `--bias 0x100000` is the Ghidra image base convention for `libcuda` @@ -143,7 +143,7 @@ remains the dynamic oracle. side is recorded, use the session compare primitive: ```bash - ./greeneye.sh compare dumps/ dumps/ --symbols + ./risc-v-gsp-rm-debugger.sh compare dumps/ dumps/ --symbols ``` For multi-target orchestration use the portability matrix (docs/18); note @@ -205,9 +205,9 @@ the top of the evidence pack. ### 3.3 Probe first-touch diff and symbol inventory ```bash -./greeneye.sh symbols export --index --bias 0 -o symbols-.json -./greeneye.sh probe --symbols symbols-.json --record -./greeneye.sh probe --symbols symbols-.json --record +./risc-v-gsp-rm-debugger.sh symbols export --index --bias 0 -o symbols-.json +./risc-v-gsp-rm-debugger.sh probe --symbols symbols-.json --record +./risc-v-gsp-rm-debugger.sh probe --symbols symbols-.json --record ``` The probe loads the segments, runs bounded and reports the first divergence @@ -253,7 +253,7 @@ The project's support ladder is `docs/06-portability/hardware-software-matrix.md ### 3.6 aarch64 host / GB10-class design notes -* **Host tooling** — green-eye is Python + QEMU; on aarch64 install +* **Host tooling** — risc-v-gsp-rm-debugger is Python + QEMU; on aarch64 install `qemu-system-misc` (provides `qemu-system-riscv64`) and the same commands run. Keep host-specific paths out of session metadata (docs/07 P3.5). `GREENEYE_QEMU` is the existing escape hatch if the binary lives elsewhere. -- cgit v1.2.3