bootstrap.S 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * arch/xtensa/boot/boot-elf/bootstrap.S
  3. *
  4. * Low-level exception handling
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. *
  10. * Copyright (C) 2004 - 2013 by Tensilica Inc.
  11. *
  12. * Chris Zankel <[email protected]>
  13. * Marc Gauthier <[email protected]>
  14. * Piet Delaney <[email protected]>
  15. */
  16. #include <asm/bootparam.h>
  17. #include <asm/initialize_mmu.h>
  18. #include <asm/vectors.h>
  19. #include <linux/linkage.h>
  20. .section .ResetVector.text, "ax"
  21. .global _ResetVector
  22. .global reset
  23. _ResetVector:
  24. _j _SetupMMU
  25. .begin no-absolute-literals
  26. .literal_position
  27. #ifdef CONFIG_PARSE_BOOTPARAM
  28. .align 4
  29. _bootparam:
  30. .short BP_TAG_FIRST
  31. .short 4
  32. .long BP_VERSION
  33. .short BP_TAG_LAST
  34. .short 0
  35. .long 0
  36. #endif
  37. .align 4
  38. _SetupMMU:
  39. #if XCHAL_HAVE_WINDOWED
  40. movi a0, 0
  41. wsr a0, windowbase
  42. rsync
  43. movi a0, 1
  44. wsr a0, windowstart
  45. rsync
  46. #endif
  47. movi a0, 0x1F
  48. wsr a0, ps
  49. rsync
  50. #ifndef CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX
  51. initialize_mmu
  52. #endif
  53. rsil a0, XCHAL_DEBUGLEVEL-1
  54. rsync
  55. reset:
  56. #if defined(CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX) && \
  57. XCHAL_HAVE_PTP_MMU && XCHAL_HAVE_SPANNING_WAY
  58. movi a0, CONFIG_KERNEL_LOAD_ADDRESS
  59. #else
  60. movi a0, KERNELOFFSET
  61. #endif
  62. #ifdef CONFIG_PARSE_BOOTPARAM
  63. movi a2, _bootparam
  64. #else
  65. movi a2, 0
  66. #endif
  67. movi a3, 0
  68. movi a4, 0
  69. jx a0
  70. .end no-absolute-literals