head-clps7500.S 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * linux/arch/arm/boot/compressed/head-clps7500.S
  3. *
  4. * Copyright (C) 1999, 2000, 2001 Nexus Electronics Ltd
  5. */
  6. /* There are three different ways the kernel can be
  7. booted on a 7500 system: from Angel (loaded in RAM), from
  8. 16-bit ROM or from 32-bit Flash. Luckily, a single kernel
  9. image does for them all. */
  10. /* This branch is taken if the CPU memory width matches the
  11. actual device in use. The default at power on is 16 bits
  12. so we must be prepared for a mismatch. */
  13. .section ".start", "ax"
  14. 2:
  15. b 1f
  16. .word 0xffff
  17. .word 0xb632 @ mov r11, #0x03200000
  18. .word 0xe3a0
  19. .word 0x0000 @ mov r0, #0
  20. .word 0xe3a0
  21. .word 0x0080 @ strb r0, [r11, #0x80]
  22. .word 0xe5cb
  23. .word 0xf000 @ mov pc, #0
  24. .word 0xe3a0
  25. 1:
  26. adr r1, 2b
  27. teq r1, #0
  28. bne .Langel
  29. /* This is a direct-from-ROM boot. Copy the kernel into
  30. RAM and run it there. */
  31. mov r0, #0x30
  32. mcr p15, 0, r0, c1, c0, 0
  33. mov r0, #0x13
  34. msr cpsr_cxsf, r0
  35. mov r12, #0x03000000 @ point to LEDs
  36. orr r12, r12, #0x00020000
  37. orr r12, r12, #0xba00
  38. mov r0, #0x5500
  39. str r0, [r12]
  40. mov r0, #0x10000000
  41. orr r0, r0, #0x8000
  42. mov r4, r0
  43. ldr r2, =_end
  44. 2:
  45. ldr r3, [r1], #4
  46. str r3, [r0], #4
  47. teq r0, r2
  48. bne 2b
  49. mov r0, #0xff00
  50. str r0, [r12]
  51. 1:
  52. mov r12, #0x03000000 @ point to LEDs
  53. orr r12, r12, #0x00020000
  54. orr r12, r12, #0xba00
  55. mov r0, #0xfe00
  56. str r0, [r12]
  57. adr lr, 1f
  58. mov r0, #0
  59. mov r1, #14 /* MACH_TYPE_CLPS7500 */
  60. mov pc, lr
  61. .Langel:
  62. #ifdef CONFIG_ANGELBOOT
  63. /* Call Angel to switch into SVC mode. */
  64. mov r0, #0x17
  65. swi 0x123456
  66. #endif
  67. /* Ensure all interrupts are off and MMU disabled */
  68. mrs r0, cpsr
  69. orr r0, r0, #0xc0
  70. msr cpsr_cxsf, r0
  71. adr lr, 1b
  72. orr lr, lr, #0x10000000
  73. mov r0, #0x30 @ MMU off
  74. mcr p15, 0, r0, c1, c0, 0
  75. mov r0, r0
  76. mov pc, lr
  77. .ltorg
  78. 1:
  79. /* And the rest */
  80. #include "head.S"