From 3b2001105fe4d0326f7aa1f83534accfdaec6a01 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Wed, 7 Dec 2011 04:42:58 +0000 Subject: powerpc/bootm: Flush ramdisk and device tree image when booting on MP We already flush the kernel image after we've loaded it to ensure visiblity to the other cores. We need to do the same thing for the ramdisk and device tree images. In AMP boot scenarios we might not be HW cache coherent with the secondary core that we are loading and setting the ramdisk and device tree up for. Thus we need to ensure we've flushed the regions of memory utilized by ramdisk and device tree so the loadding and any modifications (from decompression or fdt updates) are made visible to the secondary cores. Signed-off-by: Kumar Gala --- common/image.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'common') diff --git a/common/image.c b/common/image.c index aacae5ac51..77ca6e4705 100644 --- a/common/image.c +++ b/common/image.c @@ -1104,6 +1104,14 @@ int boot_ramdisk_high(struct lmb *lmb, ulong rd_data, ulong rd_len, memmove_wd((void *)*initrd_start, (void *)rd_data, rd_len, CHUNKSZ); +#ifdef CONFIG_MP + /* + * Ensure the image is flushed to memory to handle + * AMP boot scenarios in which we might not be + * HW cache coherent + */ + flush_cache((unsigned long)*initrd_start, rd_len); +#endif puts("OK\n"); } } else { -- cgit v1.2.3