Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Arun Mankuzhi's avatar
    44df5e8d
    arm: move flush_dcache_all() to just before disable cache · 44df5e8d
    Arun Mankuzhi authored
    
    In Cortex-A15 architecture, when we run cache invalidate
    the cache clean operation executes automatically.
    So if there are any dirty cache lines before disabling the L2 cache
    these will be synchronized with the main memory when
    invalidate_dcache_all() runs in the last part of U-boot
    
    The two functions after flush_dcache_all is using the stack. So this
    data will be on the cache. After disable when invalidate is called the
    data will be flushed from cache to memory. This corrupts the stack in
    invalida_dcache_all. So this change is required to avoid the u-boot
    hang.
    
    So flush has to be done just before clearing CR_C bit
    
    Signed-off-by: default avatarArun Mankuzhi <arun.m@samsung.com>
    Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
    44df5e8d
    History
    arm: move flush_dcache_all() to just before disable cache
    Arun Mankuzhi authored
    
    In Cortex-A15 architecture, when we run cache invalidate
    the cache clean operation executes automatically.
    So if there are any dirty cache lines before disabling the L2 cache
    these will be synchronized with the main memory when
    invalidate_dcache_all() runs in the last part of U-boot
    
    The two functions after flush_dcache_all is using the stack. So this
    data will be on the cache. After disable when invalidate is called the
    data will be flushed from cache to memory. This corrupts the stack in
    invalida_dcache_all. So this change is required to avoid the u-boot
    hang.
    
    So flush has to be done just before clearing CR_C bit
    
    Signed-off-by: default avatarArun Mankuzhi <arun.m@samsung.com>
    Signed-off-by: default avatarSimon Glass <sjg@chromium.org>