sön 2014-05-18 klockan 23:59 +0300 skrev Siarhei Siamashka: > My question was whether you possibly know the exact SRAM memory layout > in the FEL mode and the areas possibly reserved by BROM. If you don't > really know, then we always have the BROM disassembly listings if > somebody is really curious.
This is the memory map as I know it from my A10 BROM/FEL analysis: https://github.com/hno/Allwinner-Info/blob/master/FEL-usb/USB-protocol.txt (at end of document) I have not looked in detail what the address map looks like on A20 however. Maybe it differs a bit? > I'm glad to know that there is plenty of space left there for *you*. > But just like described in the quoted paragraph above, *I* am adding > a lot of *new* code there. And *I* am getting very close to the > available SRAM size limit. All I asked was why. > You can check the fel lds script yourself: > > https://github.com/linux-sunxi/u-boot-sunxi/blob/44b53fd3928f/arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds > It does not use the MEMORY command to describe the size limits. Right. Sorry about that. Should be fixed. > But now consider the following. The FEL SPL binary is loaded at the > address 0x2000 (which is also the entry point), and the stack pointer > is set to 0x5E00 on A20 right at the start. In u-boot-FEL or BROM? There is no need for a separate u-boot-FEL stack. I know I did not set up a stack for u-boot-FEL on A10/A13 at least, only reusing the stack already set up by the boot rom. The FEL BOOT ROM (A10) uses 0x2000 as IRQ stack and 0x7000 as normal SVC stack. > This gives us around 15872 > bytes for everything (code, data, bss and stack). And also have a look > here to see how much of it is already used up: > https://www.mail-archive.com/[email protected]/msg04883.html > If the compiled FEL SPL binary is too large, the stack is starting to > overwrite the useful data, causing all kind of bugs. > > Again, the question is whether it is safe to use SRAM below 0x2000 > and/or above 0x5E00. Maybe the stack can be relocated somewhere else? > But regardless of where the stack is located, not using Thumb2 is > too generous and wasteful. 0x2000 is the IRQ stack. > In any case, it has been already agreed that this patch is not > going into the u-boot-sunxi repository. For the time being, I can > use it in my own fork perfectly fine. So you have nothing to worry > about :-) Agreed by whom? Regards Henrik -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
