diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-02 11:44:31 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-02 11:44:31 -0400 |
| commit | 1c99bfbeffff04529f6f669601fdf835a73778da (patch) | |
| tree | 5867bab46e5848541df36c703f6fd8d6d0256e54 /debug/risc-v-gsp-rm-vm/docs/22-PORTING-CUDA-AND-DEVICES.md | |
| parent | 2fd653044127a665e4677a2cdfb58120d7b3e16b (diff) | |
| download | open-iov-1c99bfbeffff04529f6f669601fdf835a73778da.tar.gz open-iov-1c99bfbeffff04529f6f669601fdf835a73778da.zip | |
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)
Diffstat (limited to 'debug/risc-v-gsp-rm-vm/docs/22-PORTING-CUDA-AND-DEVICES.md')
| -rw-r--r-- | debug/risc-v-gsp-rm-vm/docs/22-PORTING-CUDA-AND-DEVICES.md | 32 |
1 files changed, 16 insertions, 16 deletions
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 <old>/run/libcuda.so.<old> <new>/run/libcuda.so.<new> ### 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 <old-lib> <new-lib> --names <names.tsv>` | — | | Corpus-level diff (added/removed/resized functions) | `tools/diff_corpus.py <old_index> <new_index>` | — | -| 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 ... <addr>` 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 ... <addr>` 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/<new>/annotations/names.tsv \ --index ../../userspace/cuda/<new>/run/analysis/decompiled/decompiled_index.tsv \ --callgraph ../../userspace/cuda/<new>/run/analysis/elf-index/callgraph.tsv \ --bias 0x100000 -o symbols-<new>.json - ./greeneye.sh symbols resolve --db symbols-<new>.json 0x<transferred-addr> + ./risc-v-gsp-rm-debugger.sh symbols resolve --db symbols-<new>.json 0x<transferred-addr> ``` `--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/<old-fw-run> dumps/<new-fw-run> --symbols + ./risc-v-gsp-rm-debugger.sh compare dumps/<old-fw-run> dumps/<new-fw-run> --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 <new-export.tsv> --bias 0 -o symbols-<new>.json -./greeneye.sh probe <new-fwimage> --symbols symbols-<new>.json --record -./greeneye.sh probe <reference-fwimage> --symbols symbols-<ref>.json --record +./risc-v-gsp-rm-debugger.sh symbols export --index <new-export.tsv> --bias 0 -o symbols-<new>.json +./risc-v-gsp-rm-debugger.sh probe <new-fwimage> --symbols symbols-<new>.json --record +./risc-v-gsp-rm-debugger.sh probe <reference-fwimage> --symbols symbols-<ref>.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. |
