bubba2533 wrote:Tazzi wrote:
If you need help understand the canbus, more then happy to break it down.
I think I'm getting it now, but I'm sure there will be more questions I have.
Tazzi wrote:
But PPC with VLE is alot harder to follow/decode then Motorola as used with the P01/P59 ecus. I spent quite a few months going through examples, simulators and even uploading commands in a basic custom kernel to work out what specific opcodes were doing. VLE is still new to me, the commands themselves are basic but doesnt seem to decompile nicely sometimes.
This is definingly something I'm struggling with as well. If you have any resources please post them up. I'm relying so much on the decompile window that if it did something incorrect I don't think I would notice it.
Biggest thing for me was understanding common op codes like rlwinm (Rotate Left Word Immediate then AND with Mask), since this was used everywhere and cause massive headache. I did have a great link I use to reference too which broke down the commands nicely, but I cant seem to see it in my bookmarks.
IBM has great examples though:
https://www.ibm.com/docs/en/aix/7.1?top ... nstruction
Code: Select all
he following code rotates the contents of GPR 4 to the left by 2 bits and logically ANDs the result with a mask of 29 ones:
# Assume GPR 4 contains 0x9000 3000.
# Assume GPR 6 contains 0xFFFF FFFF.
rlwinm 6,4,2,0,0x1D
# GPR 6 now contains 0x4000 C000.
# Under the same conditions
# rlwinm 6,4,2,0xFFFFFFFC
# will produce the same result.
So it ends up looking like this: GP6 = (GP4<<2) && (0x1D).
Keeping in mind that the registers will wrap around when shifting, so bit 31 (counting from 0) will then move back to bit0 location is shifting by 1.
Next thing thing that blew my mind, is the data is stared in big ed format. This honestly kept breaking my head without examples. If you had the example of say, 0xC7, which in binary is 0x11000111. If you wanted to remove the lowest two bits, you would need to && this with a mask of 0 to 29 (0x3FFF FFFF), as this will have bits 30 and 31 as zero. Thus end result would be 0x11000100= C4.
My E38 thread.. is a chronical of a man slowly going mad working the above bullshit out.