Skip to content

XDF coverage against the code ​

Draft. This page asks whether the community XDF Siemens_MS42_0110C6_ENG_512K_v1.3.xdf (2,308 items, all in the calibration 0x48000–0x4FFFF) covers the calibration items that the 0110C6 program actually reads, and whether it describes them correctly. The XDF is derived from an A2L, so it should match the code by construction. Every difference is worth a look.

Short answer: very close, with one gap. Every map, curve and axis the code reads is in the XDF. What the XDF lacks is a set of 106 scalars (178 bytes). 80 of them belong to one code module: the electronic throttle (MDK) position controller. The XDF has 3 tables whose axis or size disagrees with the code, including one 8×8 map that the code reads as 4×8. 18 XDF items have no code reference, and 32 are reached only through pointer arrays or parameter records.

Method ​

The program was disassembled with an independent C166 disassembler (to be published separately). Code structure describes the memory model, the code discovery and the lookup library. tools/c166_analysis.py then runs a constant-propagating dataflow pass over every basic block, with DPPs and EXTP/EXTS tracked. It records:

  • scalar. Every mem or [Rw+#d] operand that resolves into the calibration through DPP0 (0x12), DPP2 (0x13) or an EXT prefix, with its access width.
  • axis / curve / map. Every call to one of the 18 lookup routines, with the R12 near pointer resolved. Axis lengths are read from the axis count in the data. Table dimensions come from the X/Y axis searches on the same path (merged per axis across predecessors, and cleared after calls into functions that search axes themselves).
  • via pointer array / record. Lookups whose R12 was loaded with MOV R12,[Rk+#d]. They are resolved through the per-cylinder near-pointer arrays and through the VANOS parameter records passed as arguments (see Code structure). This resolves all 14 such call sites.
  • dtc-code [inferred]. The DTC code words named by the 16-byte fault-path records in the constant page.
  • Weak references (extent unknown). seg:offset pointers in the program header, near pointers passed in R12 to other routines, [Rx+#base] array bases, and the SHR #14 near-to-far idiom.

The output is data/code_refs.json, keyed by file offset. It holds 2,415 references in the calibration, of which 2,390 are strong. The same 2,415 references come out of every one of the 16 public 0110C6 dumps, even though their calibrations differ (research/2026-11-30/disasm/cross_dumps.py). tools/xdf_coverage.py parses the XDF (BASEOFFSET 0x48000, linked and embedded axes resolved) and writes data/coverage.json. That step needs only the JSON, not the disassembler.

Numbers (0110C6) ​

Count
Lookup call sites resolved1,376 (0 unresolved)
Distinct maps / curves / axes248 / 342 / 396 (4 tables with unknown dimensions)
Distinct scalar addresses read1,258 (810 u8, 448 u16)
DTC code words (fault-path records)146
Code references not covered by the XDF112 (106 scalars, 178 bytes, plus 6 weak)
XDF items with size or axis disagreements3
XDF items with no reference at all18 (plus 11 reached only through weak references)
XDF items reached only through pointer arrays or records32

Byte coverage of the calibration ​

The calibration is 32,768 bytes, of which 31,666 are not 0xFF.

BytesAllNon-0xFF
In an XDF item29,97329,403
Read by code (known extent)29,38028,814
Both28,76328,204
XDF only1,2101,199
Code only617610
Neither2,1781,653

Most of the "XDF only" bytes are the 512-byte MAF table id_maf_tab (reached through the SHR #14 idiom, so its extent is unknown) and the four tables whose dimensions could not be resolved. "Code only" is mostly axis count bytes, because XDF axes start after the count, plus the scalars listed below.

(a) Code-referenced items the XDF does not cover ​

FileCount, bytesRead byRole
0x480AA–0x48136, 0x48238, 0x483EE–0x483F2, 0x48468–0x4846C, 0x48496–0x4849C, 0x484B2/B4, 0x484C2/C4, 0x486D6/D8, 0x4883D–0x4886A80 scalars, 144 B0x024F80, 0x0254FE, 0x02554A, 0x02588C, 0x025C28, 0x025F0C, 0x0260D4, 0x026208Electronic throttle (MDK) position controller and adaptation [inferred]. These functions read no XDF item at all. They are run from 0x0262E0, called at 0x0392E8 from the throttle module 0x038B50, which reads ip_tps_sp_*. Their inputs are the throttle setpoint/actual words 0xFAB8/0xFAB6/0xFAAE, shifted >>6 to 10 bit. The parameters fill gaps between XDF scalars. For example, 0x4883D/E lies between a_max_fgr_set and c_abc_max_bts_1, and 0x48841–43 between c_abc_max_bts_2 and c_tam_sub_tia. The A2L evidently omitted this module, while its DTC words (k_dtc_mdk*, k_dtc_pwg*) are in the XDF
0x48008–0x4800D6 × u80x013390, 0x000D9ACalibration ident "0110C6", compared byte by byte with the program ident at 0x50036 [verified]
0x4FEE0–0x4FEFE7 words, plus 4 weak (indexed)boot 0x000AC2, 0x01C1FEChecksum and monitor block. 0x27BE, then seg:offset 0x048000, then 0x04F843 (probably a checksum and its range [inferred]). See Checksums
0x4FFF0–0x4FFF34 × u8boot 0x001368End-of-calibration magic 42 24 48 90 [verified]
0x4824F–0x482568 × u80x074200Two sets of 4 bytes. One set is copied to 0xE598–0xE59B, chosen by status bits 0xFD20.2…9. Next to c_conf_eobd. Role unknown
0x48720u16 (also read as a byte)0x036D3ERead only when code_chksum_ke (0x4846E) equals 0x9ABC. Probably a development or test switch [inferred]
0x4FAD8, 0x4FCDCweak pointer arguments0x0135B2, 0x0135C4 → 0x03FE16Pointers into a zero-filled area. Extent unknown

data/coverage.json → uncovered lists all 112, each with neighbouring XDF names.

(b) XDF items the code never references ​

ItemFileNote
ldp_n__o2_int_max_mt, ldp_maf__o2_int_max_mt0x48FFA, 0x49001Axes that the XDF links to id_o2_int_max_mt__n__maf. The code uses other axes (see (c))
ldp_pvs__tps_sp_open_crlc0x492B4Same: see (c)
ldp_v_maf_1__maf_tab, ldp_v_maf_2__maf_tab0x48875, 0x48886Axes of id_maf_tab. The MAF table is reached through the SHR #14 idiom, not through the lookup library
ldp_nr_pat__pat_fcut0x49008Axis of id_pat_fcut__nr_pat, which the code indexes directly ([R4+#0x8C72])
ldp_tco_dif__ectpwm_i, ldpm_cycnr_16_10x48CD7, 0x48F8ENo reference found
c_abc_max_mtc, c_abc_max_tcat, c_conf_mil_eu2, c_n_max_diag, c_cam_adj_rng_dif_diag_ex/_in, c_t_lsh_max_frq_h, c_tam_sub_tia, dtp_thd0x481F5 … 0x48844Scalars in dense blocks whose neighbours are all read. Probably unused in this software version [inferred]
k_dtc_lm0x48518The only DTC word without a fault-path record

Another 11 items are touched only by weak references.id_maf_tab (4 XDF variants at 0x497A6) and id_fac_ti_ris/rpl__cycnr are reached through the near-to-far idiom. id_pat_fcut__nr_pat is indexed directly. ip_cppwm_min__n__maf, ip_cppwm_min_cat_var__n__maf, ip_gain_knk__n and id_maf_min_knk_ad_2__n are lookups whose axis search runs in another function, so their dimensions are unknown.

32 items are reached only through pointer arrays or parameter records. They are read in full (strong references), but no code instruction names their address:

  • Through the per-cylinder near-pointer arrays at file 0x52BBE, 0x52BCA and 0x52BD6: id_knkwb_0..5, id_knkwe_0..5 and ip_fac_knk_0..5.
  • Through the intake and exhaust VANOS records at 0x52B4E/0x52B60: ip_t_fac_adc/rtd_ivvt_in/ex, ip_dly_adc/rtd_ivvt_in/ex, ip_t_ivvt_adc/ret_ex__nw_dif_* and ip_fac_ctl_ivvt_in/ex.

(c) Size and axis disagreements ​

XDF itemXDF saysCode saysStatus
ip_iga_maf_n_knk_diag__n__maf (0x4ED26)8 × 8 u8. Row (rpm) axis ldpm_n_3_9 (8 points, 0x489DF), column axis ldp_lm__iga_knk_diag (0x48F43)4 × 8. The X (row) axis is at 0x48F5B (count 4: 0x13, 0x19, 0x1F, 0x26). It is ldp_n__iga_maf_n_is, shared with ip_iga_maf_n_is__n__maf. The Y axis at 0x48F42 (count 8) matches the XDF column axis. At 0x027EA2: R12=#0x0F5B → 060882, #0x0F60 → 0608CA, map #0xAD66, then #0x0F42 → 0608CA, map #0xAD26. The only call in between, 0x02642C, is arithmeticXDF too large, with the wrong row axis [verified]. The code reads only the first 32 bytes (4 rpm rows). Edits to rows 5–8 or to ldpm_n_3_9 have no effect on this map
id_o2_int_max_mt__n__maf (0x4CC2A)Axes ldp_maf__o2_int_max_mt (0x49001), ldp_n__o2_int_max_mt (0x48FFA)Axes at 0x48FEB/0x48FF2, the same pair as id_o2_int_max_at__n__maf (0x016320–0x016340)XDF links unused axis copies [verified]. In the stock data both copies hold the same values, so the XDF shows correct numbers, but editing its axes changes nothing
ip_tps_sp_open_crlc__pvs__pvsd (0x4D587)2-point axis ldp_pvs__tps_sp_open_crlc (0x492B4: 0x0444, 0x2AAB)2-point axis at 0x492E0 (0x0448, 0x2ACE), searched at 0x038CC8. This is the axis the XDF gives to the sibling ip_tps_sp_close_crlc__pvs__pvsdXDF wrong axis [verified]. The values differ slightly, so the displayed breakpoints are off

No scalar has an access width that differs from its XDF size: the 32-bit constants are read as two words, as the XDF says. No map is transposed relative to the code's X-major layout. The checks covered 586 maps and curves with resolved dimensions.

0110AD (brief) ​

The owner's 0110AD dump (MS42_private_0110AD) has the same structure: the same header layout (entry 0x03:FD62), the same DPPs, and the same 18-routine lookup library at 0x06085E, found by signature. The tooling runs unchanged. It finds 2,320 references in the calibration (2,295 strong) and resolves all 14 pointer-array and record lookups. The output is research/2026-11-30/disasm/code_refs_0110AD.json.

The two calibrations are rearranged, not just shifted. 75 % of the strong 0110AD references in 0x48000–0x48FFF hit an address that 0110C6 code also reads, but that measures address reuse in a dense scalar block, not unchanged items; nearly all tables moved.

XDF applied to 0110ADUncoveredPartialMismatchesUnreferenced
Siemens_MS42_0110C6_ENG_512K_v1.3.xdf (unchanged)13223712271

The 0110C6 XDF is not safe on 0110AD. Update the DME to 0110C6 and use the 0110C6 XDF. The comparison is stored under cross_version in data/coverage.json.

Caveats ​

  • Code discovery. 12 non-0xFF bytes in the code segments remain undecoded. Most entries come from heuristic gap starts, so they are inferred. Code reached only through RAM function pointers could still be missing, along with the calibration it uses.
  • Dataflow. Register state is merged only across fully processed predecessors, and loops reset it. Axis state is not carried into or out of callees, which leaves 4 tables with unknown dimensions.
  • Patterns. The fault-path records, the MDK attribution and the role guesses in (a) rest on patterns and neighbouring names, so they are inferred.

Reproducing ​

sh
python3 -I tools/c166_analysis.py <0110C6.bin> --c166dis ../c166dis \
    --out data/code_refs.json [--listing /tmp/0110C6.lst]
python3 -I tools/xdf_coverage.py --refs data/code_refs.json \
    --xdf docs/public/xdf/Siemens_MS42_0110C6_ENG_512K_v1.3.xdf \
    --bin <0110C6.bin> --label 0110C6 --out data/coverage.json
# 0110AD: references, then the C6 XDF against them (appended under cross_version)
python3 -I tools/c166_analysis.py <0110AD.bin> \
    --out research/2026-11-30/disasm/code_refs_0110AD.json
python3 -I tools/xdf_coverage.py --refs research/2026-11-30/disasm/code_refs_0110AD.json \
    --xdf docs/public/xdf/Siemens_MS42_0110C6_ENG_512K_v1.3.xdf --bin <0110AD.bin> \
    --label 0110AD_vs_0110C6_512K_v1.3 --append-to data/coverage.json
python3 -I research/2026-11-30/disasm/lookup_sigs.py <0110AD.bin> --delta -0x24

XDFs (GPL-3.0) and patchlist by the MS4x Dev Team. Not affiliated with BMW or Siemens.