I think I’ve managed to find the start and end addresses of that block. Using my own bin as an example, here’s what I did.
Here’s the sequence of bytes, both disassembled in IDA and also in a hex editor (I use HxD)
This sequence is at memory location 0x4B
A104 (using memory locations as shown by IDA)
Next I did a search in IDA for byte sequence
0xA104. The search result gives me an instruction that’s loading
0xA104 into the low word of R10, preceded by an instruction loading 0xC into the high word of R10. At this point R10 (high and low) now contains the value stored in flash at 0xC
A104. As I mentioned earlier, ignore the 0x400000 offset and weirdly there’s sometime a 0x10000 offset as well that I don’t understand, so B0000 sort of refers to C0000…
In the code you can see R10 (our checksum suspect) is compared to R9, where the value in R9 has been loaded from RAM address 0x7FBBDC. Stands to reason that 0x7FBBDC is very likely to contain a checksum if it’s being compared to the checksum value in the flash! Let’s see how 0x7FBBDC is calculated. Clicking on 0x7FBBDC and looking at cross-references, you can see where it’s set (stw) and read (lwz)
Here’s the interesting bit. In IDA, just above 0x45AB8C (stw) and 0x45AB64 (lwz) are a few instructions that look very familiar…
0x1C2000 and 0x1EFFFF. Start and End address?
Now I go back to my HxD editor, I select a block starting at 0x1C2000 and ending at 0x1EFFFF (which happens to be size 0x2E000, anyone remember that a2l mapping from a few posts back…). The HxD editor has got some checksum capability build-in (they all do), so selecting Checksum-32 as the algorithm gives me a
checksum of 01361903 which is exactly the same as the byte sequence in the flash