head-clps7500.S
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:2k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

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