start.S 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * armboot - Startup Code for ARM926EJS CPU-core
  3. *
  4. * Copyright (c) 2003 Texas Instruments
  5. *
  6. * ----- Adapted for OMAP1610 OMAP730 from ARM925t code ------
  7. *
  8. * Copyright (c) 2001 Marius Gröger <mag@sysgo.de>
  9. * Copyright (c) 2002 Alex Züpke <azu@sysgo.de>
  10. * Copyright (c) 2002 Gary Jennejohn <garyj@denx.de>
  11. * Copyright (c) 2003 Richard Woodruff <r-woodruff2@ti.com>
  12. * Copyright (c) 2003 Kshitij <kshitij@ti.com>
  13. *
  14. * SPDX-License-Identifier: GPL-2.0+
  15. */
  16. #include <asm-offsets.h>
  17. #include <config.h>
  18. #include <version.h>
  19. /*
  20. *************************************************************************
  21. *
  22. * Startup Code (reset vector)
  23. *
  24. * do important init only if we don't start from memory!
  25. * setup memory and board specific bits prior to relocation.
  26. * relocate armboot to ram
  27. * setup stack
  28. *
  29. *************************************************************************
  30. */
  31. .globl reset
  32. reset:
  33. /*
  34. * set the cpu to SVC32 mode
  35. */
  36. mrs r0,cpsr
  37. bic r0,r0,#0x1f
  38. orr r0,r0,#0xd3
  39. msr cpsr,r0
  40. /*
  41. * we do sys-critical inits only at reboot,
  42. * not when booting from ram!
  43. */
  44. #ifndef CONFIG_SKIP_LOWLEVEL_INIT
  45. bl cpu_init_crit
  46. #endif
  47. bl _main
  48. /*------------------------------------------------------------------------------*/
  49. .globl c_runtime_cpu_setup
  50. c_runtime_cpu_setup:
  51. mov pc, lr
  52. /*
  53. *************************************************************************
  54. *
  55. * CPU_init_critical registers
  56. *
  57. * setup important registers
  58. * setup memory timing
  59. *
  60. *************************************************************************
  61. */
  62. #ifndef CONFIG_SKIP_LOWLEVEL_INIT
  63. cpu_init_crit:
  64. /* arm_int_generic assumes the ARM boot monitor, or user software,
  65. * has initialized the platform
  66. */
  67. mov pc, lr /* back to my caller */
  68. #endif