head.S 880 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * linux/arch/sh/boot/romimage/head.S
  3. *
  4. * Board specific setup code, executed before zImage loader
  5. */
  6. .text
  7. #include <asm/page.h>
  8. .global romstart
  9. romstart:
  10. /* include board specific setup code */
  11. #include <mach/romimage.h>
  12. /* copy the empty_zero_page contents to where vmlinux expects it */
  13. mova empty_zero_page_src, r0
  14. mov.l empty_zero_page_dst, r1
  15. mov #(PAGE_SHIFT - 4), r4
  16. mov #1, r3
  17. shld r4, r3 /* r3 = PAGE_SIZE / 16 */
  18. 1:
  19. mov.l @r0, r4
  20. mov.l @(4, r0), r5
  21. mov.l @(8, r0), r6
  22. mov.l @(12, r0), r7
  23. add #16,r0
  24. mov.l r4, @r1
  25. mov.l r5, @(4, r1)
  26. mov.l r6, @(8, r1)
  27. mov.l r7, @(12, r1)
  28. dt r3
  29. add #16,r1
  30. bf 1b
  31. /* jump to the zImage entry point located after the zero page data */
  32. mov #PAGE_SHIFT, r4
  33. mov #1, r1
  34. shld r4, r1
  35. mova empty_zero_page_src, r0
  36. add r1, r0
  37. jmp @r0
  38. nop
  39. .align 2
  40. empty_zero_page_dst:
  41. .long _text
  42. empty_zero_page_src: