Skip to content
  • Kurban Mallachiev's avatar
    elf: fix cache flushing in 'bootelf -p' command · 957f51e8
    Kurban Mallachiev authored
    
    
    Currently there are two problems in 'bootelf -p' (load elf by segments)
    command:
    - bss section is not flushed, so booted elf can have non zero values
      in bss;
    - at least on ARM there are 'CACHE: Misaligned operation at
      range...' warnings
    
    Use p_memsz instead of p_filesz during cache flushing for elf segment.
    p_filesz doesn't include zero initialized memory (e.g. bss section),
    which also should be flushed.
    
    Align these cache flushes to line boundaries.
    
    Signed-off-by: default avatarKurban Mallachiev <mallachiev@ispras.ru>
    957f51e8