Commit e782e94
dcl: decode the code-8 KWP service table -- request to expression
Code 8 is the bridge from a diagnostic request into the dataflow graph, and it
makes the model testable against a real unit for the first time.
u32 key ; u8 keylen ; u16 entry_node ; u16 extra (9 bytes)
Named by the firmware's mapper at 08904264, which fails with "cannot map
service id 0x%X (size %d byte(s))". keylen is the request length in bytes and
key is the request itself: keylen 2 with key 0x2106 is the request 21 06. The
prefixes are the expected KWP services -- 0x21 readDataByLocalIdentifier (25
entries), 0x31 routineControl (64), 0x33 requestRoutineResults (22), 0x3B
writeDataByLocalIdentifier (20), 0x1A readEcuIdentification.
entry_node is in the owning graph's block-local numbering, so it resolves
through node_map like anything else; exprs lists the expression attributes
reachable from it along code-6 edges.
230 services decoded, 25 of them reaching an expression.
Two more recognisable idioms fall out, independent of the byte-rotate, which is
further evidence the operand binding is right:
(v >> 4) + 0x30 high nibble to an ASCII digit
(v & 0xF) + 0x30 low nibble to an ASCII digit
BCD-to-ASCII formatting, with the constants exactly where they must be.
Caveat recorded in the docstring: reachability shows an expression is
downstream of a request, not that its value is what the response carries. A
match is evidence; a mismatch is inconclusive.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 7db2eb4 commit e782e94
1 file changed
Lines changed: 64 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
498 | 562 | | |
499 | 563 | | |
500 | 564 | | |
| |||
0 commit comments