Skip to content

falcon: add hs_probe and DMA capture for firmware analysis - #276

Open
RGlabs84 wants to merge 1 commit into
Zagitta:ada-betafrom
RGlabs84:feature/falcon-probe-mechanism
Open

RGlabs84 wants to merge 1 commit into
Zagitta:ada-betafrom
RGlabs84:feature/falcon-probe-mechanism

Conversation

@RGlabs84

Copy link
Copy Markdown

Summary

Add gu_falcon_hs_probe() — a variant of gu_falcon_hs() that returns immediately after Falcon CPU start instead of waiting for halt. This enables callers to inspect GPU state and capture DMA transfers before the SEC2 processor completes its boot sequence.

Also add gu_falcon_dma_capture_enable/disable/size() helpers that let callers snapshot the source buffer before the GPU DMA reads it. Useful for debugging firmware loading and analyzing SEC2 images.

Changes

  • kernel/gpu_unlock/falcon.c: +109 lines

    • DMA capture buffer infrastructure (static globals + enable/disable/size helpers)
    • gu_falcon_hs_probe(): non-blocking variant of gu_falcon_hs()
    • DMA capture hook in gu_falcon_hs() (before actual transfer)
  • kernel/gpu_unlock/falcon.h: +5 lines

    • New function declarations
  • Falcon_Instructions.md: Falcon instruction disassembly documentation for the AD102 booter

    • Instruction type distribution (LOAD, STORE, ARITH, BRANCH, CALL, JUMP)
    • Embedded engine strings (NVRNG, NVPKA, CCC)
    • Data table structure analysis
  • HANDOFF_PART2.md: Project handoff document with full technical analysis

Testing

Compiles cleanly with make on kernel 7.2.11-arch1-1. No functional changes to existing code paths — all new code is opt-in via the capture enable API.

Notes

This is research/debug infrastructure. The probe mechanism is useful for any Falcon-based GPU debugging, not just AD102.

Add gu_falcon_hs_probe() — a variant of gu_falcon_hs() that returns
immediately after Falcon CPU start instead of waiting for halt. This
enables callers to inspect GPU state and capture DMA transfers before
the SEC2 processor completes its boot sequence.

Also add gu_falcon_dma_capture_enable/disable/size() helpers that let
callers snapshot the source buffer before the GPU DMA reads it. Useful
for debugging firmware loading and analyzing SEC2 images.

Includes Falcon instruction disassembly documentation for the AD102
booter (booter_load_ad102.bin), identifying embedded engine strings
(NVRNG, NVPKA, CCC) and the booter's data table structure.

brought to you by a 4070 laptop and qwen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant