diff options
author | Ye Li <ye.li@nxp.com> | 2020-07-06 20:19:53 -0700 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2020-07-07 01:48:16 -0700 |
commit | 333766be8f0e0b76ca5216ab64b5d55c4148d16d (patch) | |
tree | 1f495f6ebf64e0625dd7c5524283e0cb6b5d6b3a /board/freescale | |
parent | 2fba3f1cf2972fa403ee359924d8620b1b08f0ef (diff) |
MLK-24381 imx8mp_evk: Reserve Mcore vring/buffer memory
When running with OPTEE, reserve 16MB memory for Mcore vring/buffer.
After u-boot bootaux Mcore, Mcore image will set its resources table
at vring address. Without the reservation, the u-boot runtime memory
may conflict with it.
Signed-off-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'board/freescale')
-rw-r--r-- | board/freescale/imx8mp_evk/imx8mp_evk.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/board/freescale/imx8mp_evk/imx8mp_evk.c b/board/freescale/imx8mp_evk/imx8mp_evk.c index 2eeb4758bc9..5dcd0f7a787 100644 --- a/board/freescale/imx8mp_evk/imx8mp_evk.c +++ b/board/freescale/imx8mp_evk/imx8mp_evk.c @@ -513,6 +513,17 @@ int board_late_init(void) return 0; } +#ifdef CONFIG_IMX_BOOTAUX +ulong board_get_usable_ram_top(ulong total_size) +{ + /* Reserve 16M memory used by M core vring/buffer, which begins at 16MB before optee */ + if (rom_pointer[1]) + return gd->ram_top - SZ_16M; + + return gd->ram_top; +} +#endif + #ifdef CONFIG_FSL_FASTBOOT #ifdef CONFIG_ANDROID_RECOVERY int is_recovery_key_pressing(void) |