A recent debug revealed MMU for DDR shouldn't be enabled before DDR is initialized. Otherwise, a "normal memory" mapping may cause speculative access which may hang the system if accessing to DDR is not allowed at time. For Layerscape platforms, we have early MMU setup to speed up execution on emulators. The solution is to update MMU after DDR is ready. The same idea goes to final MMU as well. Actual DDR size is used to create the mappings. Non-exist address should be marked as "fault", i.e. invalid to avoid unwanted speculative access.
Aside from the DDR size, reserved memory used for secure RAM and Management Complex (MC) makes things more complicated. To simplify it, a new global is added to track the reserved RAM. Secure RAM is excluded from U-Boot MMU. The reserved RAM is still mapped under U-Boot since we will need to copy data into it. Reserved RAM is excluded when device tree is fixed up so OS won't see it. Some MC configurations are moved to Kconfig. York Sun (9): armv8: Add global variable resv_ram armv8: ls2080a: Move CONFIG_FSL_MC_ENET to Kconfig armv8: ls2080a: Move CONFIG_SYS_MC_RSV_MEM_ALIGN to Kconfig armv8: layerscape: Rewrite memory reservation driver: net: fsl-mc: Update calculation of MC RAM armv8: layerscape: Update MMU mapping with actual DDR size armv8: layerscape: Flush MMU tables after creattion armv8: mmu: Add a function to change mapping attributes armv8: layerscape: Update early MMU for DDR after initialization arch/arm/cpu/armv8/cache_v8.c | 72 +++++- arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 22 ++ arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 292 +++++++++++++++++++++- arch/arm/include/asm/arch-fsl-layerscape/config.h | 4 +- arch/arm/include/asm/arch-fsl-layerscape/cpu.h | 12 +- arch/arm/include/asm/arch-fsl-layerscape/mmu.h | 2 +- arch/arm/include/asm/armv8/mmu.h | 5 + arch/arm/include/asm/global_data.h | 3 + arch/arm/include/asm/system.h | 1 + board/freescale/ls1012afrdm/ls1012afrdm.c | 34 +-- board/freescale/ls1012aqds/ls1012aqds.c | 34 +-- board/freescale/ls1012ardb/ls1012ardb.c | 34 +-- board/freescale/ls1043aqds/ddr.c | 29 --- board/freescale/ls1043aqds/ls1043aqds.c | 5 + board/freescale/ls1043ardb/ddr.c | 29 --- board/freescale/ls1043ardb/ls1043ardb.c | 7 - board/freescale/ls1046aqds/ddr.c | 29 --- board/freescale/ls1046aqds/ls1046aqds.c | 5 + board/freescale/ls1046ardb/ddr.c | 29 --- board/freescale/ls1046ardb/ls1046ardb.c | 7 - board/freescale/ls2080a/ddr.c | 55 ---- board/freescale/ls2080a/ls2080a.c | 17 +- board/freescale/ls2080aqds/ddr.c | 55 ---- board/freescale/ls2080aqds/ls2080aqds.c | 17 +- board/freescale/ls2080ardb/ddr.c | 55 ---- board/freescale/ls2080ardb/ls2080ardb.c | 18 +- cmd/bdinfo.c | 4 + common/board_f.c | 32 +-- drivers/net/fsl-mc/mc.c | 75 +----- include/configs/ls2080a_common.h | 2 - scripts/config_whitelist.txt | 2 - 31 files changed, 473 insertions(+), 514 deletions(-) -- 2.7.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot