P1-B: WA survey — 120 funcs/450 strings; WA role identified (EXT_CMD handlers: STAREC/BSS/DevInfo updates, PKTLOSS accounting); overview script fixed (string type filter)
Some checks are pending
ci / test (push) Waiting to run
ci / track (push) Waiting to run

This commit is contained in:
Zachery Aaron Shores-Chmielewski 2026-08-20 21:53:39 +04:00
parent eba408d0c3
commit b9c46bc11d
2 changed files with 23 additions and 12 deletions

View file

@ -109,6 +109,22 @@ Interpretation (labelled): the patch extends boot ROM with host-comm hooks
download-plumbing register programming — the glue the ROM needs before download-plumbing register programming — the glue the ROM needs before
WM/WA firmware arrives. WM/WA firmware arrives.
## F6 — mt7981_wa survey (2026-08-20)
Ghidra project `wa` imported + analyzed: 120 functions, 450 strings.
Strings self-identify WA's role — host command handling and TX bookkeeping
(`MCU_EXT_CMD` protocol), matching the driver's separate WA MCU queue:
- `cmdEventParserCmd` with `ucCID` printing; `EXT_CMD_ID_STAREC_UPDATE`,
`DevInfo Update Command`, `BssInfo Update Command` (own-MAC/BSS record
management), `staRec with invalid wandidx` (station records)
- Per-STA loss accounting: `PKTLOSS[%d]times/cnt[tot_tx,drop_tx,seq]`,
`lost seq`, `dup seq`, `dlycnt/maxdly`, plus `[proto,port,src_ip,dest_ip]`
flow dump formatting
Next: match `MCU_EXT_CMD_*` enum ids (mt76 headers) to `cmdEventParserCmd`
dispatch — the ABI anchor map (P1-C/D).
## Unknowns registry ## Unknowns registry
- **U1 — `feature_set` bit 7 (0x80):** observed only on WM regions at - **U1 — `feature_set` bit 7 (0x80):** observed only on WM regions at

View file

@ -1,29 +1,24 @@
# Ghidra headless post-script: dump function/strings/block overview. # Ghidra headless post-script: dump function/string/block overview.
# Usage: analyzeHeadless <proj> <name> -process <prog> -noanalysis # Run via PyGhidra launcher (see PLAN.md tooling notes).
# -scriptPath tools/ghidra_scripts -postScript ExportOverview.py
#@category Analysis #@category Analysis
from ghidra.program.model.symbol import SymbolType
fm = currentProgram.getFunctionManager() fm = currentProgram.getFunctionManager()
listing = currentProgram.getListing() listing = currentProgram.getListing()
funcs = fm.getFunctions(True)
n = 0
print('=== FUNCTIONS ===') print('=== FUNCTIONS ===')
for f in funcs: n = 0
for f in fm.getFunctions(True):
print('%s %s' % (f.getEntryPoint(), f.getName())) print('%s %s' % (f.getEntryPoint(), f.getName()))
n += 1 n += 1
print('total functions: %d' % n) print('total functions: %d' % n)
print('=== STRINGS (>=6 chars) ===') print('=== STRINGS (>=6 chars) ===')
di = listing.getDefinedData(True)
ns = 0 ns = 0
for d in di: for d in listing.getDefinedData(True):
dt = d.getDataType().getName().lower() dt = d.getDataType().getName().lower()
if 'char' in dt or 'unicode' in dt: if 'char' in dt or 'unicode' in dt or 'string' in dt:
v = d.getValue() v = d.getValue()
if v and len(str(v)) >= 6: if v is not None and len(str(v)) >= 6:
print('%s %r' % (d.getAddress(), str(v)[:120])) print('%s %r' % (d.getAddress(), str(v)[:120]))
ns += 1 ns += 1
print('total strings: %d' % ns) print('total strings: %d' % ns)