RscMgr memory (60D, todo:7D, maybe also 50D and 700D)
60D and 7D have about 7-8 MB that appears to be unused by RscMgr (source). Currently, autoexec.bin is loaded there, but this doesn't fully use this memory.
With this PR, I've changed the 60D boot method to the one used on 550D/1100D (autoexec in AllocateMemory, with init_task patched on the fly), and I've used Canon's low-level allocation functions from AllocateMemory to manage the new 7MB buffer. Now, even under heavy load, ML will not have to allocate general-purpose memory from shoot_malloc (which can't be kept allocated forever) or from Canon's memory pools (which, on 60D, are nearly full).
Example: loaded Lua with a bunch of scripts, without umm_malloc, and a few other modules:
Some extra advantages of this change:
- QEMU loads the vanilla 60D autoexec.bin (without compiling it with CONFIG_QEMU). Not much works this way though, but Canon GUI boots, alongside with flexinfo over it, and Lua startup scripts, if you have any.
- dm-spy-experiments can now be used on 60D without having to disable 90% of the features so it can fit in RAM.
Todo:
- I did not do extensive tests to make sure the buffer is really unused, but I plan to do so
- enable this on 7D (done, please test), maybe also 50D and 700D
- to identify which other cameras might benefit from this, take a look here: http://www.magiclantern.fm/forum/index.php?topic=5071.msg166799#msg166799