spl: Flush spl image after loading
RFC PATCH 1/1 spl: Flush spl image after loading
Flush spl image after loading into memory in case d-cache is enabled.
Signed-off-by York Sun <[email protected]>
---
Not sure if anyone noticed that SPL loads image but it doesn't flush the cache. As far as MMU/cache stays the same, we don't notice it. Shall we flush it?
This patch is only tested on limited platforms.
common/spl/spl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
common/spl/spl.c +4 -1
@@ -320,8 +320,11 @@ static int boot_from_devices(struct spl_image_info *spl_image, else puts("SPL: Unsupported Boot Device!\n");#endif -if (loader && !spl_load_image (spl_image, loader)) +if (loader && !spl_load_image (spl_image, loader)) { +flush_dcache_range (spl_image->load_addr, + spl_image->load_addr + spl_image->size);return 0 ; + } }return -ENODEV ;
Signature · 1 line
2.7.4