Hi all,
In i.MX8MP evk defconfigs (imx8mp_evk_*defconfig) the CONFIG_SPL_MAX_SIZE is set to 0x26000 (152KB). The bootrom places the SPL + DDR FW in OCRAM at address 0x920000. If I understood correctly, the only OCRAM reserved section is for ATF, from 0x970000 to the end of the OCRAM (64KB total).
Then, from 0x920000 to 0x96ffff the OCRAM is freely usable (320 KB). DDR FW is at most 4MB. Why the CONFIG_SPL_MAX_SIZE is limited to 152KB?
I've seen that e.g defconfigs for Android (imx8mp_evk_android_*defconfig) set CONFIG_SPL_MAX_SIZE to 0x2C000 (176KB), I suppose to include also the AVB warning logo (see the bottom part of the defconfig) without exceding the maximum size.
For the i.MX8MM, the default limit is clear and explained by this commit.
Which is the maximum SPL size for i.MX8MP?
Thanks in advance, regards
Mauro
Hello,
There is not the same mas SPL size on the i.MX8MP, but we can follow the same thought you are following, and calculate the maximum allowed for the i.MX Chip that you are using.
This lead me to the following question:
Are you looking for a larger SPL size and having issues?
Best regards/Saludos,
Aldo.
Hi @AldoG
I needed just few more bytes to fit into max size on a i.MX8MP, then I tried to increase the maximum size from 0x26000 to 0x27000, and seems that everything is working well.
My question was about the SPL max size default value: at this point, considering your answer probably the 0x26000 is just a reasonable value (nothing related to a physical memory size like for the i.MX8MM) but i.MX8MP OCRAM can handle bigger SPL binaries.
My primary worry about increasing the max SPL size was about possible OCRAM overlaps with other software reserved sections, but as far as I understood the only other binaries that uses OCRAM during first boot phases are the bootROM and the ATF. If I'm not wrong, considering the boot phase, we have:
- 0x900000-0x917FFF reserved to BootRom (Figure 6-2. Internal ROM and RAM memory map, i.MX8MP reference manual)
- 0x970000-0x98FFFF ATF (see AN14093)
- 0x918000-0x96FFFF usable OCRAM
By u-boot defconfig the SPL is placed at 0x920000 (not at 0x918000), then the usable space by SPL could be 0x920000-0x96FFFF, that is 320KB.
Obviously 320KB as SPL maximum default size is quite big, but is it the theoretically upper limit to SPL max size on i.MX8MP? And, more important, is the OCRAM section 0x918000-0x96FFFF really usable by SPL without overlapping with other binaries memory?
Thanks in advance, regards
Mauro
Hello,
Yes, you are correct since nothing else than first boot sequence is running there is not much that could be used in therms of resources so it should be fine to increase the size of the SPL by bigger margin, even in your case if needed you may increase it as in Android defconfig.
Best regards/Saludos,
Aldo.