Page 1 of 1

Where are the segments in a 411 OS?

Posted: Mon Jan 21, 2019 9:41 am
by NSFW
I've read that there are segments for engine, transmission, speedometer, etc, but I haven't seen anything about where those segments are defined.

Can any tell me, or point me to, the start address and length (or start and end address) of each segment?

Right now it would be useful for disassembly, but in the future it would also be useful for creating a tool to swap segments.

Thanks!

Re: Where are the segments in a 411 OS?

Posted: Mon Jan 21, 2019 9:57 am
by Charlescrown
I downloaded a bin file and xdf. I don't know if going through the xdf might help. Let me know if it's useful.

Re: Where are the segments in a 411 OS?

Posted: Mon Jan 21, 2019 10:51 am
by NSFW
I just remembered that we have code for validating segment checksums in PCM Hammer, and that has everything I need.

This is a little bit embarassing. :)

Code: Select all

            success &= this.ValidateRange(      0, 0x7FFFD,   0x500, "Operating system");
            success &= this.ValidateRange( 0x8002, 0x13FFF,  0x8000, "Engine calibration");
            success &= this.ValidateRange(0x14002, 0x16DFF, 0x14000, "Engine diagnostics.");
            success &= this.ValidateRange(0x16E02, 0x1BDFF, 0x16E00, "Transmission calibration");
            success &= this.ValidateRange(0x1BE02, 0x1C7FF, 0x1BE00, "Transmission diagnostics");
            success &= this.ValidateRange(0x1C802, 0x1E51F, 0x1C800, "Fuel system");
            success &= this.ValidateRange(0x1E522, 0x1EE9F, 0x1E520, "System");
            success &= this.ValidateRange(0x1EEA2, 0x1EF9F, 0x1EEA0, "Speedometer");

Re: Where are the segments in a 411 OS?

Posted: Mon Jan 21, 2019 6:04 pm
by antus
yep, operating system isnt right though... Its these ranges:

0x000000 -> 0x0004FF
0x000502 -> 0x003FFF
0x020000 -> 0x07FFFF

with the sum saved in 16 bits at 0x500

We'll need to update that for OS write support.

Technically the boot block is just the start on the flash chip level, but the above is how the sum is calculated.

1 Mbyte is the same, just the OS ends at 0x0FFFFD

Re: Where are the segments in a 411 OS?

Posted: Thu Jan 24, 2019 6:51 pm
by NSFW
It took me a while to realize why the app is declaring all of the checksums good even though it has the wrong logic for the OS checksum...

Any block whose checksum is valid has a sum of zero. So, if the parameter and calibration blocks have valid checksums, the app can still check for a valid OS checksum.

The problem is that if the parameter or calibration blocks have invalid checksums, the app will report an invalid checksum for the OS as well, even if the OS blocks are actually valid.

I opened a bug for this on GitHub.

Re: Where are the segments in a 411 OS?

Posted: Thu Jan 24, 2019 6:59 pm
by antus
good pick :) I thought it was just an error in your docs, as the app seemed to be working fine.