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

Linux/Unix编程

开发平台:

Unix_Linux

  1. /*
  2.  * arch/alpha/boot/head.S
  3.  *
  4.  * initial bootloader stuff..
  5.  */
  6. #include <asm/system.h>
  7. .set noreorder
  8. .globl __start
  9. .ent __start
  10. __start:
  11. br $29,2f
  12. 2: ldgp $29,0($29)
  13. jsr $26,start_kernel
  14. call_pal PAL_halt
  15. .end __start
  16. .align 5
  17. .globl wrent
  18. .ent wrent
  19. wrent:
  20. .prologue 0
  21. call_pal PAL_wrent
  22. ret ($26)
  23. .end wrent
  24. .align 5
  25. .globl wrkgp
  26. .ent wrkgp
  27. wrkgp:
  28. .prologue 0
  29. call_pal PAL_wrkgp
  30. ret ($26)
  31. .end wrkgp
  32. .align 5
  33. .globl switch_to_osf_pal
  34. .ent switch_to_osf_pal
  35. switch_to_osf_pal:
  36. subq $30,128,$30
  37. .frame $30,128,$26
  38. stq $26,0($30)
  39. stq $1,8($30)
  40. stq $2,16($30)
  41. stq $3,24($30)
  42. stq $4,32($30)
  43. stq $5,40($30)
  44. stq $6,48($30)
  45. stq $7,56($30)
  46. stq $8,64($30)
  47. stq $9,72($30)
  48. stq $10,80($30)
  49. stq $11,88($30)
  50. stq $12,96($30)
  51. stq $13,104($30)
  52. stq $14,112($30)
  53. stq $15,120($30)
  54. .prologue 0
  55. stq $30,0($17) /* save KSP in PCB */
  56. bis $30,$30,$20 /* a4 = KSP */
  57. br $17,1f
  58. ldq $26,0($30)
  59. ldq $1,8($30)
  60. ldq $2,16($30)
  61. ldq $3,24($30)
  62. ldq $4,32($30)
  63. ldq $5,40($30)
  64. ldq $6,48($30)
  65. ldq $7,56($30)
  66. ldq $8,64($30)
  67. ldq $9,72($30)
  68. ldq $10,80($30)
  69. ldq $11,88($30)
  70. ldq $12,96($30)
  71. ldq $13,104($30)
  72. ldq $14,112($30)
  73. ldq $15,120($30)
  74. addq $30,128,$30
  75. ret ($26)
  76. 1: call_pal PAL_swppal
  77. .end switch_to_osf_pal
  78. .align 3
  79. .globl tbi
  80. .ent tbi
  81. tbi:
  82. .prologue 0
  83. call_pal PAL_tbi
  84. ret ($26)
  85. .end tbi
  86. .align 3
  87. .globl halt
  88. .ent halt
  89. halt:
  90. .prologue 0
  91. call_pal PAL_halt
  92. .end halt