virtex405-head.S 673 B

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