head.S 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * arch/alpha/kernel/head.S
  3. *
  4. * initial boot stuff.. At this point, the bootloader has already
  5. * switched into OSF/1 PAL-code, and loaded us at the correct address
  6. * (START_ADDR). So there isn't much left for us to do: just set up
  7. * the kernel global pointer and jump to the kernel entry-point.
  8. */
  9. #include <linux/init.h>
  10. #include <asm/system.h>
  11. #include <asm/asm-offsets.h>
  12. __HEAD
  13. .globl swapper_pg_dir
  14. .globl _stext
  15. swapper_pg_dir=SWAPPER_PGD
  16. .set noreorder
  17. .globl __start
  18. .ent __start
  19. _stext:
  20. __start:
  21. .prologue 0
  22. br $27,1f
  23. 1: ldgp $29,0($27)
  24. /* We need to get current_task_info loaded up... */
  25. lda $8,init_thread_union
  26. /* ... and find our stack ... */
  27. lda $30,0x4000 - SIZEOF_PT_REGS($8)
  28. /* ... and then we can start the kernel. */
  29. jsr $26,start_kernel
  30. call_pal PAL_halt
  31. .end __start
  32. #ifdef CONFIG_SMP
  33. .align 3
  34. .globl __smp_callin
  35. .ent __smp_callin
  36. /* On entry here from SRM console, the HWPCB of the per-cpu
  37. slot for this processor has been loaded. We've arranged
  38. for the UNIQUE value for this process to contain the PCBB
  39. of the target idle task. */
  40. __smp_callin:
  41. .prologue 1
  42. ldgp $29,0($27) # First order of business, load the GP.
  43. call_pal PAL_rduniq # Grab the target PCBB.
  44. mov $0,$16 # Install it.
  45. call_pal PAL_swpctx
  46. lda $8,0x3fff # Find "current".
  47. bic $30,$8,$8
  48. jsr $26,smp_callin
  49. call_pal PAL_halt
  50. .end __smp_callin
  51. #endif /* CONFIG_SMP */
  52. #
  53. # The following two functions are needed for supporting SRM PALcode
  54. # on the PC164 (at least), since that PALcode manages the interrupt
  55. # masking, and we cannot duplicate the effort without causing problems
  56. #
  57. .align 3
  58. .globl cserve_ena
  59. .ent cserve_ena
  60. cserve_ena:
  61. .prologue 0
  62. bis $16,$16,$17
  63. lda $16,52($31)
  64. call_pal PAL_cserve
  65. ret ($26)
  66. .end cserve_ena
  67. .align 3
  68. .globl cserve_dis
  69. .ent cserve_dis
  70. cserve_dis:
  71. .prologue 0
  72. bis $16,$16,$17
  73. lda $16,53($31)
  74. call_pal PAL_cserve
  75. ret ($26)
  76. .end cserve_dis
  77. #
  78. # It is handy, on occasion, to make halt actually just loop.
  79. # Putting it here means we dont have to recompile the whole
  80. # kernel.
  81. #
  82. .align 3
  83. .globl halt
  84. .ent halt
  85. halt:
  86. .prologue 0
  87. call_pal PAL_halt
  88. .end halt