To all you ARM experts out there, time for a little assistance again if you don't mind. I couldn't let this go yet so I got the binary dump disassembled (~100MB for SX10, guess that's why they're not posted) and did a quick crash course in ARM. I have been able to pick up and follow through some of the ARM logic and have especially looked at those sections referenced in capt_seq.c There is one part I'm not quite getting, I can see where ARM uses constructs like (I'll use an example out of the SX10):
FF89D150: E51F5210 LDR R5, [PC, #-528];
and this directs to load R5 from the literal pool at the given address (-528dec offset from PC+8), which leads to address: FF89CF48 (HEX: 00006c14)
In the "capt_seq.c", this has been replaced directly with the HEX value instead: "LDR R5, =0x6C14\n"
The first question I have is, why can't we leave the original reference? Is it because this function lies outside the FW and can't reference the address properly? Also, since it is loading from the literal pool in the FW version, isn't there a potential that that address in the literal pool has store operations associated with it elsewhere? (I searched but couldn't find any directly, just more load references).
Then we have 2 lines down:
F89D158: E5950004 LDR R0, [R5, #4]
which is a similar literal pool reference call, however this one is relative to R5 not PC. This should lead to address: FF89CF4C (HEX:0000EA60) -address reference in R5+4 offset
However in capt_seq.c it is constructed as LDR R0, [R5,#4] as in the original form as well, except within this module, R5 doesn't have an address reference anymore. How is the function supposed to get the proper value from the literal pool?
Thanks for any help and insight
-tgq