annotate STATUS @ 343:5df5579f9f92

p_tpudr12.c: initial import of p_tpudr61.c from LoCosto
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 30 Oct 2017 05:11:46 +0000
parents 01b78eaf67e2
children ba47d35a72f3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
283
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 Objects in l1_ext.lib:
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2
284
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
3 l1_afunc.obj: not exact, see explanation below
283
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 l1_async.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 l1_cmplx.obj: perfect match to 20070608 version except line number points
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 l1_init.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 l1_pwmgr.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 l1_small.obj: perfect match
289
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
9 l1_sync.obj: not exact, see explanation below
283
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 l1_trace.obj: bits match perfectly, diff only in symbolic metadata
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 l1_dyn_dwl_afunc.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 l1_dyn_dwl_apihisr.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 l1_dyn_dwl_async.obj: perfect match
284
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
15 l1_dyn_dwl_func.obj: not exact, see explanation below
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
16 l1_dyn_dwl_init.obj: sole diff is in the num_of_primitives oddity,
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
17 see explanation below
283
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 l1_dyn_dwl_sync.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 l1audio_abb.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 l1audio_afunc.obj: bits match perfectly, diff only in symbolic metadata
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 l1audio_async.obj: diffs only in register alloc and symbolic metadata
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 l1audio_back.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 l1audio_drive.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 l1audio_init.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
336
7ad882cbce4c STATUS: updated for l1p_* deblobbing
Mychaela Falconia <falcon@freecalypso.org>
parents: 289
diff changeset
27 l1p_afun.obj: perfect match
7ad882cbce4c STATUS: updated for l1p_* deblobbing
Mychaela Falconia <falcon@freecalypso.org>
parents: 289
diff changeset
28 l1p_asyn.obj: perfect match
7ad882cbce4c STATUS: updated for l1p_* deblobbing
Mychaela Falconia <falcon@freecalypso.org>
parents: 289
diff changeset
29 l1p_cmpl.obj: perfect match to 20070608 version
7ad882cbce4c STATUS: updated for l1p_* deblobbing
Mychaela Falconia <falcon@freecalypso.org>
parents: 289
diff changeset
30 l1p_sync.obj: perfect match
7ad882cbce4c STATUS: updated for l1p_* deblobbing
Mychaela Falconia <falcon@freecalypso.org>
parents: 289
diff changeset
31
283
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 l1tm_async.obj: bits match perfectly, diff only in the line number points
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 l1tm_func.obj: bits match perfectly, diffs only in symbolic and line numbers
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 l1tm_stats.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 Objects in l1_int.lib:
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37
288
595cdc5ff4e5 tpudrv12 differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 285
diff changeset
38 dl1_com.obj: not exact, see analysis below
283
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 l1_api_hisr.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 l1_cmplx_intram.obj: perfect match to 20070608 version
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 l1_ctl.obj: perfect match to 20070608 version
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 l1_drive.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 l1_func.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 l1_mfmgr.obj: perfect match
289
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
45 l1_sync_intram.obj: not exact, see explanation below
283
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 l1audio_func.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 l1audio_sync.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49
336
7ad882cbce4c STATUS: updated for l1p_* deblobbing
Mychaela Falconia <falcon@freecalypso.org>
parents: 289
diff changeset
50 l1p_cmpl_intram.obj: perfect match
7ad882cbce4c STATUS: updated for l1p_* deblobbing
Mychaela Falconia <falcon@freecalypso.org>
parents: 289
diff changeset
51 l1p_ctl.obj: perfect match
7ad882cbce4c STATUS: updated for l1p_* deblobbing
Mychaela Falconia <falcon@freecalypso.org>
parents: 289
diff changeset
52 l1p_driv.obj: not exact, needs additional review
7ad882cbce4c STATUS: updated for l1p_* deblobbing
Mychaela Falconia <falcon@freecalypso.org>
parents: 289
diff changeset
53 l1p_func.obj: perfect match
7ad882cbce4c STATUS: updated for l1p_* deblobbing
Mychaela Falconia <falcon@freecalypso.org>
parents: 289
diff changeset
54 l1p_sync_intram.obj: perfect match
341
01b78eaf67e2 STATUS: macs.obj is a perfect match
Mychaela Falconia <falcon@freecalypso.org>
parents: 336
diff changeset
55 macs.obj: perfect match
336
7ad882cbce4c STATUS: updated for l1p_* deblobbing
Mychaela Falconia <falcon@freecalypso.org>
parents: 289
diff changeset
56
283
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 Objects in l1_custom_ext.lib:
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 l1audio_cust.obj: dead functions not reconstructed, perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 otherwise
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 l1tm_cust.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 l1tm_tpu12.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 Objects in l1_custom_int.lib:
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 ind_os.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 l1_cust.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 Objects in tpudrv.lib:
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 tpudrv.obj: perfect match
288
595cdc5ff4e5 tpudrv12 differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 285
diff changeset
72 tpudrv12.obj: not exact, see analysis below
284
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
73
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
74 Detailed analysis of differences, i.e., cases where the reconstructed C code
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
75 compiles into an object that is not bit-identical to the original blob:
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
76
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
77 l1_afunc.obj:
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
78
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
79 The l1_afunc.c module from LoCosto is used without any changes:
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
80 it compiled right away after adding one constant to l1_const.h,
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
81 and the result of recompilation is identical to the original up until
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
82 the l1a_clip_txpwr() function, which is the last function in the module.
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
83
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
84 Disassembly of the original blob version of this function has been
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
85 analyzed and found to be identical in logic to the available C code,
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
86 but there must have been some change to the code expression that
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
87 results in different output from the compiler. In particular, the
285
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
88 symbolic info indicates the presence of a local variable named power
284
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
89 in the original, but no such local var exists in the LoCosto version.
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
90 The TSM30 version was of no help as it is entirely different there.
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
91
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
92 See g23m/objdiff/l1_ext/l1_afunc.notes for further info.
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
93
289
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
94 l1_sync.obj:
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
95
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
96 The last function in this module is l1s_dedicated_mode_manager();
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
97 the two preceding functions match perfectly, but for this last function
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
98 when the reconstructed code is recompiled, the compiler's register
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
99 allocator makes different picks for reasons that could not be
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
100 successfully reversed. Because the code is compiled in Thumb mode
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
101 and the compiler made a different choice between low and high registers
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
102 in some places, the instructions do not line perfectly. The logic match
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
103 has instead been verified by manual comparison.
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
104
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
105 l1_sync_intram.obj:
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
106
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
107 Similar situation in the l1s_schedule_tasks() function: the function
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
108 is huge, there is an unknown set of factors determining what the
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
109 compiler's register allocator will do, and in this case there is even
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
110 a difference in the choice of register vs. stack for some temporaries.
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
111 As a result, the code does not line up and the logic had to be verified
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
112 manually. All other functions (preceding and following) match
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
113 perfectly.
284
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
114
285
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
115 dl1_com.obj:
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
116
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
117 The reconstruction of this module is not exact, but the logic has
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
118 been verified to be an exact match except for the removal of some
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
119 non-functional bogons. Specifically:
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
120
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
121 l1_create_ISR(): diff in one local variable name (result vs. status),
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
122 affects the generated assert string, but the length stays the same.
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
123 This assert string also contains the line number which differs
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
124 (3 digits in both cases), and the location of the string changes
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
125 because of the diffs in later functions listed below.
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
126 Verified exact match otherwise.
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
127
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
128 TP_FrameIntHandler(): verified exact match.
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
129
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
130 layer_1_sync_HISR_entry(): the version in the blob contains a
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
131 non-functional bogon which has not been reconstructed, see the
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
132 comments in the reconstructed source. Verified to be an exact match
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
133 except for the removal of this bogon.
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
134
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
135 rx_tch_data(): empty function in both versions, trivial exact match.
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
136
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
137 tx_tch_data(): this stub function is supposed to return a pointer,
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
138 but the original blob does a bare bx lr, returning whatever happens to
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
139 be in r0 on entry, which is unpredictable as the function takes no
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
140 arguments. The reconstructed version returns NULL.
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
141
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
142 Strings and literals after the functions: manually verified to be an
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
143 exact match.
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
144
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
145 .bss section: the original blob contains these defunct uninitialized
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
146 data objects: BACK_queue, DLL1_queue, L1C1_queue, RRM1_queue, pool_52,
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
147 pool_100, pool_400, pool_1600, and a static variable i in
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
148 layer_1_sync_HISR_entry() related to the bogon mentioned above. These
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
149 global data objects are not referenced from anywhere else in the
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
150 firmware and the link succeeds without them being present, hence they
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
151 have been omitted from the reconstruction. The rest is an exact match.
284
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
152
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
153 l1_dyn_dwl_func.obj:
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
154
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
155 The LoCosto version uses a function (implemented in l1_func.c in
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
156 the LoCosto code) named l1_memcpy_16bit() to download patch bits
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
157 into the DSP's API RAM; the function does what the name says, and
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
158 the logic of using 16-bit accesses when hitting this API RAM makes
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
159 perfect sense to me (Mychaela). The original TCS211 code apparently
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
160 used plain memcpy(), which the compiler turned into its C$MEMCPY call.
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
161
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
162 If one does a #define l1_memcpy_16bit memcpy in l1_dyn_dwl_func.c,
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
163 the resulting l1_dyn_dwl_func.obj is almost bit-identical to the
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
164 original blob: the only diff is in register allocation - the compiler's
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
165 register allocator picks a different choice of registers, but all
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
166 instructions still perfectly line up.
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
167
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
168 For production use of our reconstructed TCS211 L1 code, we have adopted
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
169 the version with l1_memcpy_16bit() - the function body itself has been
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
170 moved into l1_dyn_dwl_func.c so that l1_func.c remains a perfect match.
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
171
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
172 l1_dyn_dwl_init.obj:
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
173
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
174 In the TCS211 configuration without L1_GTT, there are a total of 5
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
175 signals (aka primitives aka L1 messages) which trigger a dynamic
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
176 DSP patch download. These 5 signals are enumerated in
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
177 signal_patch_array[] in l1_dyn_dwl_afunc.c (which has been reconstructed
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
178 to a perfect match), and their total count (which should be 5) goes into
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
179 l1a.dyn_dwnld.num_of_primitives, set in l1_dyn_dwnld_initialize_var() in
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
180 l1_dyn_dwl_init.c.
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
181
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
182 In the original blob version this num_of_primitives variable ends up
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
183 being set to 6: first set to 2, then incremented by 4. In the LoCosto
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
184 source this var is first set to 0 as they apparently have no patches
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
185 that are independent of compilation config options, and then incremented
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
186 for every enabled option.
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
187
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
188 In our reconstruction we have made the GPRS and AMR_SCH patches and the
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
189 primitives that trigger them mandatory, and conditionalized the E2 and
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
190 AMR_MMS patches on MELODY_E2. The GPRS and AMR_MMS critters are
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
191 preinstalled by the static patch, and get pushed out by AMR_SCH and E2,
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
192 respectively. Of the 5 primitives listed in signal_patch_array[] in
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
193 the original blob, the first 2 are always-present core ones, whereas
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
194 the last 3 are specific to E2. The AMR_MMS patch is reinstated upon
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
195 L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_CON.
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
196
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
197 Based on the above reasoning, our reconstructed version sets
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
198 l1a.dyn_dwnld.num_of_primitives to 5 in the full configuration: first
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
199 sets to 2, then increments by 3. If one makes a sans-MELODY_E2 build,
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
200 only the GPRS and AMR_SCH patches will be retained, and only the two
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
201 non-E2 primitives for entry into and exit from dedicated mode.
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
202
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
203 l1audio_async.obj:
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
204
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
205 The only bit diff is in register allocation - the compiler's register
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
206 allocator picks a different choice of registers, but all instructions
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
207 still perfectly line up. There is also a slight diff in the symbolic
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
208 metadata emitted for functions, which might be related to the diff in
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
209 the register allocation.
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
210
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
211 The root cause of these diffs could not be found, but there is no
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
212 functional difference as only some in-function temporary registers
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
213 have been interchanged.
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
214
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
215 l1audio_cust.obj:
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
216
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
217 The original blob version has these demo/test functions at the end of
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
218 the module:
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
219
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
220 audio_melo_e1_demo1_start()
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
221 audio_melo_e1_demo1_stop()
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
222 audio_melo_e1_demo2_start()
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
223 audio_melo_e1_demo2_stop()
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
224 audio_melo_e2_load_lsi()
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
225 audio_melo_e2_demo1_start()
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
226 audio_melo_e2_demo1_stop()
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
227 audio_melo_e2_demo2_start()
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
228 audio_melo_e2_demo2_stop()
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
229
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
230 These functions are dead code, i.e., they are not called or referenced
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
231 from anywhere else in the firmware, and the link succeeds without them
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
232 being present. These dead functions have been omitted from the
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
233 reconstructed version. The reconstruction is a perfect match otherwise.
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
234
288
595cdc5ff4e5 tpudrv12 differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 285
diff changeset
235 tpudrv12.obj:
595cdc5ff4e5 tpudrv12 differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 285
diff changeset
236
595cdc5ff4e5 tpudrv12 differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 285
diff changeset
237 The reconstruction of this module was more of a translation of logic
595cdc5ff4e5 tpudrv12 differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 285
diff changeset
238 from disassembly to C than adaptation of source from other versions,
595cdc5ff4e5 tpudrv12 differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 285
diff changeset
239 hence it is not a bit-for-bit match or even close. However, the logic
595cdc5ff4e5 tpudrv12 differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 285
diff changeset
240 has been carefully verified and confirmed to match the original; see
595cdc5ff4e5 tpudrv12 differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 285
diff changeset
241 chipsetsw/layer1/tpu_drivers/source0/tpudrv12.notes for the details.