/arch/powerpc/boot/virtex405-head.S

http://github.com/mirrors/linux · Assembly · 31 lines · 17 code · 3 blank · 11 comment · 0 complexity · e3e59d26b99b7a6b79e7077ca7f36946 MD5 · raw file

  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #include "ppc_asm.h"
  3. .text
  4. .global _zimage_start
  5. _zimage_start:
  6. /* PPC errata 213: needed by Virtex-4 FX */
  7. mfccr0 0
  8. oris 0,0,0x50000000@h
  9. mtccr0 0
  10. /*
  11. * Invalidate the data cache if the data cache is turned off.
  12. * - The 405 core does not invalidate the data cache on power-up
  13. * or reset but does turn off the data cache. We cannot assume
  14. * that the cache contents are valid.
  15. * - If the data cache is turned on this must have been done by
  16. * a bootloader and we assume that the cache contents are
  17. * valid.
  18. */
  19. mfdccr r9
  20. cmplwi r9,0
  21. bne 2f
  22. lis r9,0
  23. li r8,256
  24. mtctr r8
  25. 1: dccci r0,r9
  26. addi r9,r9,0x20
  27. bdnz 1b
  28. 2: b _zimage_start_lib