Layerscape (ls1012a) DDR memory size change

We have a custom board based off the NXP(Freescale) layerscape ls1012a-rdb demo board. Our HW team put 256MB of DDR on the board, same part just smaller, rather then the 1GB that was on the demo board. We are trying to make changes to the openwrt build that will account for this memory change

So far we have found the following files that we have changed.

  • build_dir/target-aarch64_generic_musl/uboot-layerscape-fsl_ls1012a-rdb/uboot-layerscape-LSDK-20.04-update-290520/include/configs/ls1012ardb.h

  • build_dir/target-aarch64_generic_musl/tfa-layerscape-ls1012a-rdb/tfa-layerscape-LSDK-20.04-update-290520/plat/nxp/soc-ls1012/ls1012ardb/platform_def.h

  • build_dir/target-aarch64_generic_musl/tfa-layerscape-ls1012a-rdb/tfa-layerscape-LSDK-20.04-update-290520/build/ls1012ardb/release/bl31/bl31.h & bl31.ld ( the same??)

  • build_dir/hostpkg/tfa-layerscape-LSDK-20.04-update-290520/plat/nxp/soc-ls1012/ls1012ardb/ddr_init.c

When u-boot trys to boot the kernel it trys to load the device tree into location 0x8F000000. This location is outside of the allowed location 0x80000000 + 0x10000000 - 0x04200000 (for TFA secure code) = 0x8BE00000

I can change the uboot code to load the device tree in a lower location but how does the kernel know where to look for it, and in general, how do I know what is mapped to where in RAM?

To answer a part of my own question. We figured out that the bl31.h & bl31.ld are "created" at build time from the RAM size set in the platform_def.h file and a file called bl31.ld.S.

I still don't understand why we are able to just put the device tree blob at some address in RAM and it works but one thing at a time.