E92 PCM Reverse Engineering

Disassembly, Reassembly, Tools and devleopment. Going deep with Hardware and Software.
User avatar
Gatecrasher
Posts: 435
Joined: Fri Apr 24, 2020 8:09 pm

Re: E92 PCM Reverse Engineering

Post by Gatecrasher »

E92 is the other way. The flash kernel has a pointers in RAM to the flash erase and flash write branches. The bootloader jumps to those pointers when conditions are met for mode 36. But there doesn't seem to be any centralized way to call back from RAM into the bootloader for common things like CAN transactions. As usual, I wasn't thinking things all the way through.
User avatar
Tazzi
Posts: 3627
Joined: Thu May 17, 2012 10:53 am
cars: VE SS Ute
Location: WA

Re: E92 PCM Reverse Engineering

Post by Tazzi »

One would assume the same ram address is being used in each operating system for the bootloader to use? Otherwise a different loader would be needed for each different OS.
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
Gampy
Posts: 2332
Joined: Fri Dec 14, 2018 9:38 pm

Re: E92 PCM Reverse Engineering

Post by Gampy »

It would be nice if they made it that simple, I doubt it though.

-Enjoy
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
turbo_v6
Posts: 513
Joined: Tue Apr 10, 2018 10:50 pm

Re: E92 PCM Reverse Engineering

Post by turbo_v6 »

So I’ve been diving into the FlexCAN module documentation and it’s been quite a lot.

It seems like there is a way to implement FIFO, but I’m not sure that’s necessary for what I’m doing right now.

I was able to transmit a message onto the bus using a function from the boot block. So really what I need to do is to duplicate what that function is doing into the kernel.
LS1 Boost OS Version 5 Available Here. For feature suggestions post in here Development Thread.
User avatar
antus
Site Admin
Posts: 10076
Joined: Sat Feb 28, 2009 10:34 am
cars: TX Gemini 2L Twincam 8psi
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Subaru WRX 2007

Re: E92 PCM Reverse Engineering

Post by antus »

Duplicate, or if you can identify the routine, and it can handle relocation, copy it to ram before any flash erase or write operations.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
turbo_v6
Posts: 513
Joined: Tue Apr 10, 2018 10:50 pm

Re: E92 PCM Reverse Engineering

Post by turbo_v6 »

After looking at it some more perhaps I've found a function that other kernels are calling, but it seems very specific and loaded with a lot of overhead.

I have looked at it before and thought it was interesting that it was at such an even address (0x9000), but didn't really think anything of it at the time. I could be wrong, but there is even a bunch of unused space before and after so that makes me thing it could be useful.

I still think it would be easier to write my own Rx/Tx functions, but it could be good info for others.
LS1 Boost OS Version 5 Available Here. For feature suggestions post in here Development Thread.
In-Tech
Posts: 785
Joined: Mon Mar 09, 2020 6:35 am
Location: California

Re: E92 PCM Reverse Engineering

Post by In-Tech »

Hiya Everyone,
Everything you want to do is probably buried in the rom routines, and much faster than an external, nothing wrong with an external. Keep in mind it is possible to call a peripheral that can easily XOR with a simple byte value, or many things to confuse a disassembler if you cannot follow the code flow. That logic only takes a few tics from the code flow. I only mention this to help :)
User avatar
turbo_v6
Posts: 513
Joined: Tue Apr 10, 2018 10:50 pm

Re: E92 PCM Reverse Engineering

Post by turbo_v6 »

I believe I'm still dealing with issues from the Tactrix 2.0 device echoing Tx messages.

I just tried my VX Nano for the first time with CAN because it says it's capable, but I'm not able to log any of the chatter of the ECU like I can with the Tactrix.

I'd really hate to spend anymore money on yet another cable, but I'm not sure there is much support for developers using the Tactrix as the forum http://forums.openecu.org/ looks pretty much dead.
LS1 Boost OS Version 5 Available Here. For feature suggestions post in here Development Thread.
User avatar
turbo_v6
Posts: 513
Joined: Tue Apr 10, 2018 10:50 pm

Re: E92 PCM Reverse Engineering

Post by turbo_v6 »

Ok, might have been a user error on that last issue. Even though the echo messages are annoying that wasn't causing my issue. I had a mistake with the format of my UP script.
LS1 Boost OS Version 5 Available Here. For feature suggestions post in here Development Thread.
kur4o
Posts: 1154
Joined: Sun Apr 10, 2016 11:20 am

Re: E92 PCM Reverse Engineering

Post by kur4o »

bubba2533,

I can help you get rid of echoed messages but some debug log will be needed with gm mdi manager.
Typical install path of app
"Program Files\GM MDI Software\J2534 Configuration\J2534ConfigApp.exe"

With it we can see what exactly is assigned as flags to echoed messages and filter it on software level.