I am trying to compile the SCUFW using the SC_BD_FLAGS_ALT_CONFIG boot flag, so that I have separate partitioning for the M4 cores. When I use this option, u-boot gives the following error:
Reading file would overwrite reserved memory
I narrowed down the problem to a conflict with the M4_0/M4_1 DDR aliasing memory region (0x8800000-0x8FFFFFF). I recompiled the SCUFW with this memory region removed from the partition, and the problem went away. I need to fix this, as my M4 code needs to access this region.
I’m using an Apalis i.MX8QuadMax (MIMX8QM6AVUFFAB)
root@apalis-vhu2:~# uname -a
Linux apalis-vhu2 5.4.91-0+git.c59b3c2da1e9 #1 SMP PREEMPT Fri Jul 30 21:26:59 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
I’m using u-boot with commit: ea16d2b66c9b5e3cda7acca2d68017caf353909d
I’m using SCUFW based on: imx-scfw-porting-kit-1.7.0
These are the mkimage commands I’m using to boot the container:
Normal imx-boot container compilation (u-boot boots linux successfully):
make SOC=iMX8QM flash_b0:
./…/mkimage_imx8 -soc QM -rev B0 -append mx8qmb0-ahab-container.img -c -scfw scfw_tcm.bin -ap u-boot-atf.bin a53 0x80000000 -out flash.bin
Change to put M4_0 in it’s own partition (u-boot fails to boot linux with “Reading file would overwrite reserved memory” error):
make SOC=iMX8QM flash_regression_linux_m4:
./…/mkimage_imx8 -soc QM -rev B0 -append mx8qmb0-ahab-container.img -c -flags 0x00200000 -scfw scfw_tcm.bin -ap u-boot-atf.bin a53 0x80000000 -p3 -m4 m4_image.bin 0 0x34FE0000 -p4 -m4 m4_1_image.bin 1 0x38FE0000 -out flash.bin