]> git.dujemihanovic.xyz Git - u-boot.git/commit
imx: imx8qm/qxp: Fix issue in get_effective_memsize
authorYe Li <ye.li@nxp.com>
Tue, 5 May 2020 12:28:38 +0000 (20:28 +0800)
committerStefano Babic <sbabic@denx.de>
Sun, 10 May 2020 18:55:20 +0000 (20:55 +0200)
commit7c351ff5e0e50359d9feb49272650bd01417f721
tree58c3dc3c1a3dd0edad98b6413ffcb9d3b110df73
parentf44afd546f6236479581469e1fb969c9ce9f9eac
imx: imx8qm/qxp: Fix issue in get_effective_memsize

When Trusty OS allocates the mem region from 0xfe0000000-0xffffffff,
the get_effective_memsize does not return correct memory size.
There is a check in get_effective_memsize to find the memreg where
the u-boot is running, and return the size of that memreg as the result
of get_effective_memsize. When using aligned start, the value is
0x80200000 since it is 2MB aligned. Thus the finding of memreg will
fail and return the PHYS_SDRAM_1_SIZE because u-boot text base is
0x80020000. This cause u-boot is relocated to the high memory where has
been occupied by Trusty OS.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/mach-imx/imx8/cpu.c