annotate STATUS @ 319:1ea4a6156f12

l1p_driv.c: l1pdtpu_serv_rx_nb() reconstructed
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 04 Oct 2017 04:52:54 +0000
parents f2f7f4dff6d7
children 7ad882cbce4c
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
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 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
28 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
29 l1tm_stats.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 Objects in l1_int.lib:
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32
288
595cdc5ff4e5 tpudrv12 differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 285
diff changeset
33 dl1_com.obj: not exact, see analysis below
283
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 l1_api_hisr.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 l1_cmplx_intram.obj: perfect match to 20070608 version
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 l1_ctl.obj: perfect match to 20070608 version
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 l1_drive.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 l1_func.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 l1_mfmgr.obj: perfect match
289
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
40 l1_sync_intram.obj: not exact, see explanation below
283
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 l1audio_func.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 l1audio_sync.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 Objects in l1_custom_ext.lib:
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_cust.obj: dead functions not reconstructed, perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 otherwise
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 l1tm_cust.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 l1tm_tpu12.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 Objects in l1_custom_int.lib:
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 ind_os.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 l1_cust.obj: perfect match
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56
974835ad720c STATUS top level file added
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 Objects in tpudrv.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 tpudrv.obj: perfect match
288
595cdc5ff4e5 tpudrv12 differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 285
diff changeset
60 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
61
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
62 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
63 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
64
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
65 l1_afunc.obj:
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
66
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
67 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
68 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
69 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
70 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
71
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
72 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
73 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
74 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
75 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
76 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
77 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
78 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
79
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
80 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
81
289
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
82 l1_sync.obj:
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
83
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
84 The last function in this module is l1s_dedicated_mode_manager();
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
85 the two preceding functions match perfectly, but for this last function
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
86 when the reconstructed code is recompiled, the compiler's register
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
87 allocator makes different picks for reasons that could not be
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
88 successfully reversed. Because the code is compiled in Thumb mode
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
89 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
90 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
91 has instead been verified by manual comparison.
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
92
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
93 l1_sync_intram.obj:
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
94
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
95 Similar situation in the l1s_schedule_tasks() function: the function
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
96 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
97 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
98 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
99 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
100 manually. All other functions (preceding and following) match
f2f7f4dff6d7 STATUS: analysis complete
Mychaela Falconia <falcon@freecalypso.org>
parents: 288
diff changeset
101 perfectly.
284
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
102
285
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
103 dl1_com.obj:
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
104
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
105 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
106 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
107 non-functional bogons. Specifically:
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
108
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
109 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
110 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
111 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
112 (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
113 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
114 Verified exact match otherwise.
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
115
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
116 TP_FrameIntHandler(): verified exact match.
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
117
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
118 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
119 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
120 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
121 except for the removal of this bogon.
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
122
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
123 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
124
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
125 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
126 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
127 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
128 arguments. The reconstructed version returns NULL.
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 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
131 exact match.
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
132
4d9af8de3973 STATUS: dl1_com differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 284
diff changeset
133 .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
134 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
135 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
136 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
137 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
138 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
139 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
140
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
141 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
142
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
143 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
144 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
145 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
146 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
147 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
148 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
149
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
150 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
151 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
152 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
153 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
154 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
155
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
156 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
157 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
158 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
159
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
160 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
161
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
162 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
163 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
164 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
165 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
166 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
167 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
168 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
169
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
170 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
171 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
172 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
173 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
174 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
175
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
176 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
177 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
178 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
179 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
180 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
181 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
182 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
183 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
184
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
185 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
186 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
187 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
188 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
189 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
190
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
191 l1audio_async.obj:
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
192
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
193 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
194 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
195 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
196 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
197 the register allocation.
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
198
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
199 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
200 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
201 have been interchanged.
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_cust.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 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
206 the module:
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
207
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
208 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
209 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
210 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
211 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
212 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
213 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
214 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
215 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
216 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
217
33b35965b4a0 STATUS: began analysis of the differences in the non-exact objects
Mychaela Falconia <falcon@freecalypso.org>
parents: 283
diff changeset
218 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
219 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
220 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
221 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
222
288
595cdc5ff4e5 tpudrv12 differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 285
diff changeset
223 tpudrv12.obj:
595cdc5ff4e5 tpudrv12 differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 285
diff changeset
224
595cdc5ff4e5 tpudrv12 differences analyzed and documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 285
diff changeset
225 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
226 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
227 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
228 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
229 chipsetsw/layer1/tpu_drivers/source0/tpudrv12.notes for the details.