dadisigursveinn / 400plus

Automatically exported from code.google.com/p/400plus
0 stars 0 forks source link

A possible way to rewrite any routine we want. #280

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I spoke with Alex from ML and he pointed me to a great work made by g3gg0.

1. I'm not familiar with the ARM caches ATM, so forgive me if I misunderstood 
something, I will learn later.
2. I haven't checked the work from g3gg0, but I'm writing this to bring some 
lights from what I know for now. Hopefully I will start working on the project 
soon again.

_Any comments are welcome._

In short:
ARM architecture uses caches (data and instruction cache) to cache routine 
call. Basically when you call a routine the core checks the caches and if the 
routine is there (in the instruction cache, and it's data is in the data cache) 
it calls it from there.
Now what g3gg0 seem to got done is rewriting the caches, so he put his routine 
in caches, then when the OFW calls that routine it actually got his code 
executed. He made this for DebugMsg() routine, which cuts the long messages and 
log only part of them. He succeeded in writing his version of DebugMsg() which 
logs the whole messages.
It seems the caches are divided in 4 segments, which can be locked, so they 
wont get rewrited.

What I understand from this: It is possible to replace any routine in the 
Original FirmWare (OFW) with this method.

Just to note, if we succeed with this, it will untie our hands to do whatever 
we want with the firmware, the things considered impossible until now may 
became possible (i.e. unlock the 1/8000 speed)

the link Alex pointed me:
http://www.magiclantern.fm/forum/index.php?topic=2388

Big thanks to g3gg0 and Alex.

Original issue reported on code.google.com by fired...@gmail.com on 8 Sep 2012 at 5:49

GoogleCodeExporter commented 9 years ago
Great news!

Original comment by eduardo....@gmail.com on 8 Sep 2012 at 6:30

GoogleCodeExporter commented 9 years ago

Original comment by fired...@gmail.com on 7 Feb 2013 at 4:29

GoogleCodeExporter commented 9 years ago
We are moving to GitHub, please follow this issue at 
https://github.com/400plus/400plus/issues/280

Original comment by eduardo....@gmail.com on 16 Mar 2015 at 1:13