Fix-up boot32 to work on A7000+
Logically the previous code should have worked but didn't. It appeared to fail when reading the relocation table from physical memory.
To work-around this issue we
Fix-up boot32 to work on A7000+
Logically the previous code should have worked but didn't. It appeared to fail when reading the relocation table from physical memory.
To work-around this issue we now compact the relocation table (it shrinks from ~800 entries to ~15 on a 2.5MB kernel) The compacted table is small enough to copy into the page of memory we use to do the relocations. The relocation code can now find the table, and carry out the relocations.
To help with debugging the screen border will change colour: Red: Running without the MMU turned on (IE 1-1 physical mapping) Note that the border will stay red a while as we're copying the kernel over at this point. Green: We've finished copying the kernel over (unless the code breaks this will be rarely seen) Blue: We're running on the bootstrap L1 table, and just about to call the kernel.
Other tweaks include: * copy the kernel 32bits at a time, rather than 8 bits at a time. * assert that the relocations are 32bit aligned (so the above works) * flush the cache and write buffers before turning off the MMU.
Tested by myself on an A7000+. Tested by skrll@ on Risc-PC and A7000.
show more ...
|