head.S 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 1994, 1995 Waldorf Electronics
  7. * Written by Ralf Baechle and Andreas Busse
  8. * Copyright (C) 1995 - 1999 Ralf Baechle
  9. * Copyright (C) 1996 Paul M. Antoine
  10. * Modified for DECStation and hence R3000 support by Paul M. Antoine
  11. * Further modifications by David S. Miller and Harald Koerfgen
  12. * Copyright (C) 1999 Silicon Graphics, Inc.
  13. */
  14. #include <asm/asm.h>
  15. #include <asm/regdef.h>
  16. LEAF(start)
  17. /* Save boot rom start args */
  18. move s0, a0
  19. move s1, a1
  20. move s2, a2
  21. move s3, a3
  22. /* Clear BSS */
  23. PTR_LA a0, _edata
  24. PTR_LA a2, _end
  25. 1: sw zero, 0(a0)
  26. addiu a0, a0, 4
  27. bne a2, a0, 1b
  28. PTR_LA a0, (.heap) /* heap address */
  29. PTR_LA sp, (.stack + 8192) /* stack address */
  30. PTR_LA t9, decompress_kernel
  31. jalr t9
  32. 2:
  33. move a0, s0
  34. move a1, s1
  35. move a2, s2
  36. move a3, s3
  37. PTR_LI t9, KERNEL_ENTRY
  38. jalr t9
  39. 3:
  40. b 3b
  41. END(start)
  42. .comm .heap,BOOT_HEAP_SIZE,4
  43. .comm .stack,4096*2,4