root/arch/alpha/kernel/entry.S

/* [previous][next][first][last][top][bottom][index][help] */
   1 /*
   2  * alpha/entry.S
   3  *
   4  * kernel entry-points
   5  */
   6 
   7 #include <asm/system.h>
   8 
   9 #define halt    .long PAL_halt
  10 #define rti     .long PAL_rti
  11 
  12 /*
  13  * This defines the normal kernel pt-regs layout.
  14  *
  15  * regs 9-15 preserved by C code
  16  * regs 16-18 saved by PAL-code
  17  * regs 29-30 saved and set up by PAL-code
  18  */
  19 #define SAVE_ALL                        \
  20         subq    $30,160,$30;            \
  21         stq     $0,0($30);              \
  22         stq     $1,8($30);              \
  23         stq     $2,16($30);             \
  24         stq     $3,24($30);             \
  25         stq     $4,32($30);             \
  26         stq     $5,40($30);             \
  27         stq     $6,48($30);             \
  28         stq     $7,56($30);             \
  29         stq     $8,64($30);             \
  30         stq     $19,72($30);            \
  31         stq     $20,80($30);            \
  32         stq     $21,88($30);            \
  33         stq     $22,96($30);            \
  34         stq     $23,104($30);           \
  35         stq     $24,112($30);           \
  36         stq     $25,120($30);           \
  37         stq     $26,128($30);           \
  38         stq     $27,136($30);           \
  39         stq     $28,144($30)
  40 
  41 #define RESTORE_ALL                     \
  42         ldq     $0,0($30);              \
  43         ldq     $1,8($30);              \
  44         ldq     $2,16($30);             \
  45         ldq     $3,24($30);             \
  46         ldq     $4,32($30);             \
  47         ldq     $5,40($30);             \
  48         ldq     $6,48($30);             \
  49         ldq     $7,56($30);             \
  50         ldq     $8,64($30);             \
  51         ldq     $19,72($30);            \
  52         ldq     $20,80($30);            \
  53         ldq     $21,88($30);            \
  54         ldq     $22,96($30);            \
  55         ldq     $23,104($30);           \
  56         ldq     $24,112($30);           \
  57         ldq     $25,120($30);           \
  58         ldq     $26,128($30);           \
  59         ldq     $27,136($30);           \
  60         ldq     $28,144($30);           \
  61         addq    $30,160,$30
  62 
  63 .text
  64 .set noat
  65 
  66 .align 5
  67 .globl  entInt
  68 .ent    entInt
  69 entInt:
  70         SAVE_ALL
  71 /* start atomic operation with respect to software interrupts */
  72         lda     $0,intr_count
  73         ldq     $1,0($0)
  74         addq    $1,1,$1
  75         stq     $1,0($0)
  76 /* set up the arguments to the C interrupt handler */
  77         bis     $30,$30,$19
  78         lda     $27,do_entInt
  79         jsr     $26,($27),do_entInt
  80 /* ok, check if we need to do software interrupts */
  81 1:      lda     $0,intr_count
  82         ldq     $1,0($0)
  83         subq    $1,1,$1
  84         bne     $1,2f           /* interrupt within interrupt: return now */
  85         lda     $2,bh_active
  86         ldq     $3,0($2)
  87         lda     $2,bh_mask
  88         ldq     $2,0($2)
  89         and     $2,$3,$2
  90         bne     $2,3f
  91 2:      stq     $1,0($0)
  92         RESTORE_ALL
  93         rti
  94 .align 5
  95 3:      lda     $27,do_bottom_half
  96         jsr     $26,($27),do_bottom_half
  97         br      $31,1b
  98 .end entInt
  99 
 100 .align 5
 101 .globl  entMM
 102 .ent    entMM
 103 entMM:
 104         SAVE_ALL
 105         bis     $30,$30,$19
 106         lda     $27,do_page_fault
 107         jsr     $26,($27),do_page_fault
 108         RESTORE_ALL
 109         rti
 110 .end entMM
 111 
 112 .align 5
 113 .globl  entArith
 114 .ent    entArith
 115 entArith:
 116         SAVE_ALL
 117         bis     $30,$30,$19
 118         lda     $27,do_entArith
 119         jsr     $26,($27),do_entArith
 120         RESTORE_ALL
 121         rti
 122 .end entArith
 123 
 124 .align 5
 125 .globl  entIF
 126 .ent    entIF
 127 entIF:
 128         SAVE_ALL
 129         bis     $30,$30,$19
 130         lda     $27,do_entIF
 131         jsr     $26,($27),do_entIF
 132         RESTORE_ALL
 133         rti
 134 .end entIF
 135 
 136 .align 5
 137 .globl  entUna
 138 .ent    entUna
 139 entUna:
 140         SAVE_ALL
 141         bis     $30,$30,$19
 142         lda     $27,do_entUna
 143         jsr     $26,($27),do_entUna
 144         RESTORE_ALL
 145         rti
 146 .end entUna
 147 
 148 .align 5
 149 .globl  entSys
 150 .ent    entSys
 151 entSys:
 152         SAVE_ALL
 153         bis     $30,$30,$19
 154         lda     $27,do_entSys
 155         jsr     $26,($27),do_entSys
 156         RESTORE_ALL
 157         rti
 158 .end entSys
 159 
 160         .align 5
 161         .globl sys_call_table
 162 sys_call_table:
 163         .quad 0

/* [previous][next][first][last][top][bottom][index][help] */