lightrec: Add new memory init functions
Lightrec can greatly benefit from having the RAM/BIOS/scratchpad and RAM
mirrors mapped to specific addresses. For the same value of (offset):
- If the RAM is mapped to (offset), the BIOS is mapped to
(offset + 0x1fc00000) and the scratchpad to (offset + 0x1f800000), the
generated code will be better;
- If the RAM is also mirrored to (offset + 0x200000), (offset + 0x400000)
and (offset + 0x600000), the generated code will be even better;
- If the offset is 0x0, the generated code will be even better.
Additionally, the new memory init code will attempt to use huge pages
when possible, in order to greatly reduce the overhead of the MMU.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>