root/arch/sparc/kernel/entry.S

/* [previous][next][first][last][top][bottom][index][help] */
   1 /* arch/sparc/kernel/entry.S:  Sparc trap low-level entry points.
   2  *
   3  * Sparc traps are so ugly, this code is going to go through a lot
   4  * of changes as I find out more interesting things. See head.S for
   5  * the trap table and how it works, this will show you how we get
   6  * to these routines.
   7  *
   8  * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
   9  */
  10 
  11 #include <asm/cprefix.h>
  12 #include <asm/head.h>
  13 #include <asm/asi.h>
  14 
  15 /* Here are macros for routines we do often, this allows me to inline this
  16  * without making the code look real ugly. Well, the macro looks ugly too but
  17  * makes the trap entry code easier to understand.
  18  */
  19 
  20 /* I really don't like synthetic instructions. So I avoid them like the
  21  * plague.
  22  */
  23 
  24 /* Note that when I have to write a window out, and it is a user's window, I
  25  * have to check that the pages of memory that I am going to throw the window(s)
  26  * onto are valid and are writable by the user (this is %sp to %sp + 64) before
  27  * I start dumping stuff there. We always assume that kernels stack is ok.
  28  *
  29  * If we have to save a kernel window, only one branch is taken. This should
  30  * make trap handlers quicker in this scenario.
  31  *
  32  * Once 'current' is loaded into %g6, it stays there until we leave
  33  * this macro.
  34  *
  35  * XXX must do some checking on the assumption that kernel stack is always ok
  36  */
  37 
  38 /* I will document how this works real soon. TODO */
  39 
  40 #define TRAP_WIN_CLEAN \
  41         or      %g0, %g5, %l5;    /* we need the globals to do our work */ \
  42         or      %g0, %g6, %l6;    /* and %l0 to %l4 are loaded with important */ \
  43         or      %g0, %g7, %l7;    /* information like the psr and pc's to return to */ \
  44         sethi   %hi( C_LABEL(current) ), %g6; \
  45         ld      [%g6 + %lo( C_LABEL(current) )], %g6; \
  46         ld      [%g6 + THREAD_UWINDOWS], %g7; /* how many user wins are active? */ \
  47         subcc   %g7, 0x0, %g0
  48         bne     2f;                            /* If there are any, branch. */ \
  49         save    %g0, %g0, %g0;                 /* Save into that window either way. */ \
  50         std     %l0, [%sp];                    /* If above shows only kernel windows */ \
  51 1:      std     %l2, [%sp + 0x8];              /* then we get here. */ \
  52         std     %l4, [%sp + 0x10]; \
  53         std     %l6, [%sp + 0x18]; \
  54         std     %i0, [%sp + 0x20]; \
  55         std     %i2, [%sp + 0x28]; \
  56         std     %i4, [%sp + 0x30]; \
  57         std     %i6, [%sp + 0x38]; \
  58         or      %g0, 0x1, %g5; \
  59         rd      %psr, %g7; \
  60         sll     %g5, %g7, %g5; \
  61         wr      %g5, 0x0, %wim;                 /* update %wim to 'now' invalid */ \
  62         and     %g7, 0x1f, %g7; \
  63         st      %g7, [%g6 + THREAD_WIM];        /* save 'this' threads mask */ \
  64         restore %g0, %g0, %g0; \
  65         or      %g0, %l5, %g5;                  /* restore the globals we used */ \
  66         or      %g0, %l6, %g6; \
  67         b       8f;                             /* we are done */ \
  68         or      %g0, %l7, %g7; \
  69 2:      sub     %g7, 0x1, %g7; \
  70         st      %g7, [%g6 + THREAD_UWINDOWS];   /* There are user windows if we */ \
  71         andcc   %sp, 0x7, %g0;                  /* get here. Check for stack alignment. */ \
  72         bne     5f;                             /* Stack is unaligned, yuck. */ \
  73         sra     %sp, 0x1e, %g7;                 /* This stuff checks to see if top 3-bits */ \
  74         subcc   %g7, 0x0, %g0;                  /* of stack pointer address are ok. */ \
  75         be,a    3f; \
  76         andn    %sp, 0xfff, %g7; \
  77         subcc   %g7, -1, %g0; \
  78         bne     5f;                             /* bad stack pointer, ugh */ \
  79         andn    %sp, 0xfff, %g7; \
  80 3:      lda     [%g7] ASI_PTE, %g7;             /* Ok, user stack is a valid address */ \
  81         srl     %g7, 0x1d, %g7; \
  82         subcc   %g7, 0x6, %g0;                  /* Can the user write to it? */ \
  83         bne     5f; \
  84         and     %sp, 0xfff, %g7; \
  85         subcc   %g7, 0xfc1, %g0;                /* Is our save area on one page? */ \
  86         bl,a    1b; \
  87         std     %l0, [%sp]; \
  88         add     %sp, 0x38, %g5;                 /* Nope, have to check both pages */ \
  89         sra     %g5, 0x1e, %g7; \
  90         subcc   %g7, 0x0, %g0; \
  91         be,a    4f; \
  92         andn    %g5, 0xfff, %g7; \
  93         subcc   %g7, -1, %g0; \
  94         bne     5f; \
  95         andn    %g5, 0xfff, %g7; \
  96 4:      lda     [%g7] ASI_PTE, %g7;             /* Stack space in 2nd page is valid */ \
  97         srl     %g7, 0x1d, %g7; \
  98         subcc   %g7, 0x6, %g0;                  /* Can user write here too? */ \
  99         be,a    1b; \
 100         std     %l0, [%sp]; \
 101 5:      ld      [%g6 + THREAD_UWINDOWS], %g7;   /* This is due to either bad page perms */ \
 102         add     %g6, THREAD_REG_WINDOW, %g5;    /* for the users stack area, or the stack */ \
 103 6:      std     %l0, [%g5];                     /* pointer is misaligned. See above. */ \
 104         std     %l2, [%g5 + 0x8]; \
 105         std     %l4, [%g5 + 0x10]; \
 106         std     %l6, [%g5 + 0x18]; \
 107         std     %i0, [%g5 + 0x20]; \
 108         std     %i2, [%g5 + 0x28]; \
 109         std     %i4, [%g5 + 0x30]; \
 110         std     %i6, [%g5 + 0x38]; \
 111         subcc   %g7, 0x1, %g7; \
 112         bge,a   6b;                             /* while(uwindows>=0) { write_win(); */ \
 113         save    %g5, 0x40, %g5;                 /*     uwindows--; } */ \
 114         st      %sp, [%g6 + THREAD_USP]; \
 115         or      %g0, 0x1, %g5; \
 116         rd      %psr, %g7; \
 117         sll     %g5, %g7, %g5; \
 118         wr      %g5, 0x0, %wim; \
 119         and     %g7, 0x1f, %g7; \
 120         st      %g7, [%g6 + THREAD_WIM];        /* Update thread_struct fields */ \
 121         ld      [%g6 + THREAD_UWINDOWS], %g7; \
 122         add     %g7, 0x1, %g5; \
 123         st      %g5, [%g6 + THREAD_W_SAVED]; \
 124         st      %g0, [%g6 + THREAD_UWINDOWS]; \
 125 7:      subcc   %g7, 0x1, %g7;                  /* Restore back to where we started. */ \
 126         bge     7b; \
 127         restore %g0, %g0, %g0; \
 128         or      %g0, %l5, %g5;                  /* Restore the globals. */ \
 129         or      %g0, %l6, %g6; \
 130         or      %g0, %l7, %g7; \
 131 8:                                              /* We are done when we get here. */ \
 132 
 133 
 134 /* As if the last macro wasn't enough, we have to go through a very similar routine
 135  * upon entry to most traps and interrupts. This is save away the current window
 136  * if it is the trap window, clean it, and adjust the stack for the handler c-code
 137  * to work.
 138  */
 139 
 140 #define ENTER_TRAP \
 141         rd      %wim, %l4; \
 142         or      %g0, 0x1, %l5; \
 143         sll     %l5, %l0, %l5; \
 144         andcc   %l0, 0x40, %g0; \
 145         bz      1f; \
 146         andcc   %l4, %l5, %g0; \
 147         bz,a    3f; \
 148         sub     %fp, 0xb0, %sp; \
 149         TRAP_WIN_CLEAN \
 150         b       3f; \
 151         sub     %fp, 0xb0, %sp; \
 152 1:      sethi   %hi( C_LABEL(current) ), %l6; \
 153         ld      [%l6 + %lo( C_LABEL(current) )], %l6; \
 154         ld      [%l6 + THREAD_WIM], %l5; \
 155         and     %l0, 0x1f, %l4; \
 156         cmp     %l5, %l3; \
 157         ble,a   4f; \
 158         sethi   %hi( C_LABEL(nwindowsm1) ), %l4; \
 159         sub     %l5, %l3, %l3; \
 160         b       5f; \
 161         sub     %l3, 0x1, %l5; \
 162 4:      ld      [%l4 + %lo( C_LABEL(nwindowsm1) )], %l4; \
 163         sub     %l4, %l3, %l4; \
 164         add     %l5, %l4, %l5; \
 165 5:      st      %l5, [%l6 + THREAD_UWINDOWS]; \
 166         bz,a    2f; \
 167         sethi   %hi(TASK_SIZE-176), %l5; \
 168         TRAP_WIN_CLEAN; \
 169         sethi   %hi( C_LABEL(current) ), %l6; \
 170         ld      [%l6 + %lo( C_LABEL(current) )], %l6; \
 171         sethi   %hi(TASK_SIZE-176), %l5; \
 172 2:      or      %l5, %lo(TASK_SIZE-176), %l5; \
 173         add     %l6, %l5, %sp; \
 174 3: \
 175 
 176 #define ENTER_IRQ \
 177         rd      %wim, %l4; \
 178         or      %g0, 0x1, %l5; \
 179         sll     %l5, %l0, %l5; \
 180         andcc   %l0, 0x40, %g0; \
 181         bz      1f; \
 182         andcc   %l4, %l5, %g0; \
 183         bz,a    0f; \
 184         sethi   %hi( C_LABEL(eintstack) ), %l7; \
 185         TRAP_WIN_CLEAN \
 186         sethi   %hi( C_LABEL(eintstack) ), %l7; \
 187 0:      cmp     %fp, %l7; \
 188         bge,a   3f; \
 189         sub     %l7, 0xb0, %sp; \
 190         b       3f; \
 191         sub     %fp, 0xb0, %sp; \
 192 1:      sethi   %hi( C_LABEL(current) ), %l6; \
 193         ld      [%l6 + %lo( C_LABEL(current) )], %l6; \
 194         ld      [%l6 + PCB_WIM], %l5; \
 195         and     %l0, 0x1f, %l7; \
 196         cmp     %l5, %l7; \
 197         ble,a   4f; \
 198         sethi   %hi( C_LABEL(nwindowsm1) ), %l4; \
 199         sub     %l5, %l7, %l7; \
 200         b       5f; \
 201         sub     %l7, 0x1, %l5; \
 202 4:      ld      [%l4 + %lo( C_LABEL(nwindowsm1) )], %l4; \
 203         sub     %l4, %l7, %l4; \
 204         add     %l5, %l4, %l5; \
 205 5:      st      %l5, [%l6 + THREAD_UWINDOWS]; \
 206         bz,a    2f; \
 207         sethi   %hi( C_LABEL(eintstack) ), %l7; \
 208         TRAP_WIN_CLEAN; \
 209         sethi   %hi( C_LABEL(eintstack) ), %l7; \
 210 2: \
 211         sub     %l7, 0xb0, %sp; \
 212 3: \
 213 
 214         .text
 215         .align 4
 216 
 217 /* Default trap handler */
 218         .globl my_trap_handler
 219 my_trap_handler:
 220                 rd %wim, %l4
 221                 or %g0, 0x1, %l5
 222                 sll %l5, %l0, %l5
 223                 cmp %l4, %l5        ! are we in the invalid window?
 224         
 225                 TRAP_WIN_CLEAN
 226 
 227                 nop
 228                 or %g0, %l3, %o0
 229                 call C_LABEL(do_hw_interrupt)
 230                 or %g0, %g0, %o1
 231                 wr %l0, 0x20, %psr  ! re-enable traps and reset the condition codes
 232                 nop
 233                 nop
 234                 nop                 ! click our heels three times, "no place like home"
 235                 jmp %l1
 236                 rett %l2
 237         
 238 /* This routine is optimized for kernel window fills. User fills take about two
 239  * or three extra jumps on the average. We'll see how this works out.
 240  */
 241 
 242 /* Don't use local labels, or if you do be REAL CAREFUL. TRAP_WIN_CLEAN is
 243  * full of them! If you think this routine is hairy, window spills are worse,
 244  * see below.
 245  */
 246 
 247         .globl fill_window_entry
 248 fill_window_entry:
 249         andcc   %l0, 0x40, %g0          ! see if this is a user window fill
 250         bz,a    fill_from_user
 251         nop
 252 
 253         TRAP_WIN_CLEAN                  /* danger, danger... */
 254         wr      %l0, 0x0, %psr  
 255         nop
 256         jmp     %l1
 257         rett    %l2
 258 
 259 fill_from_user:
 260         sethi   %hi( C_LABEL(current) ), %l6
 261         ld      [%l6 + %lo( C_LABEL(current) )], %l6
 262         ld      [%l6 + THREAD_WIM], %l5
 263         and     %l0, 0x1f, %l3
 264 
 265 /* I don't know what's worse, the extra comparison here, or an extra load
 266  * from a lookup table, we'll see.
 267  */
 268         cmp     %l5, %l3
 269         ble,a   1f
 270         sethi   %hi( C_LABEL(nwindowsm1) ), %l4
 271         sub     %l5, %l3, %l3
 272         b       2f
 273         sub     %l3, 0x1, %l5
 274 1:      ld      [%l4 + %lo( C_LABEL(nwindowsm1) )], %l4
 275         sub     %l4, %l3, %l4
 276         add     %l5, %l4, %l5
 277 2:      st      %l5, [%l6 + THREAD_UWINDOWS]
 278 
 279         TRAP_WIN_CLEAN             /* danger, danger... */
 280         sethi   %hi( C_LABEL(current) ), %l6
 281         ld      [%l6 + %lo( C_LABEL(current) )], %l6
 282         ld      [%l6 + THREAD_KSP], %sp
 283         and     %l0, 0x1f, %l3
 284         sethi   %hi(lnx_winmask), %l6
 285         or      %l6, %lo(lnx_winmask), %l6
 286         ldub    [%l6 + %l3], %l5
 287         rd      %wim, %l4
 288         jmp     %l1
 289         rett    %l2
 290 
 291 /* A window spill has occurred.  This presents a weird situation, a restore
 292  * was attempted and a trap occurred. Therefore the restore attempt had no
 293  * effect on window movement and the trap saved, which means it went in the
 294  * other direction. :-( We are in a trap window which is two restores away
 295  * from the window we want to un-invalidate so to speak and three away from
 296  * the one which will become invalid after this routine. There are probably
 297  * bugs already this routine. Bugs suck.
 298  */
 299 
 300 /* This is a very complicated and hairy routine, don't expect to understand
 301  * it the first time. :>
 302  */
 303 
 304         .globl spill_window_entry
 305 spill_window_entry:
 306         wr      %g0, 0, %wim            ! Can not enter invalid register without this.
 307         andcc   %l0, 0x40, %g0          ! From user?
 308         restore                         ! restore to where trap occurred
 309         bz      spill_from_user
 310         restore                         ! enter invalid register, whee...
 311         restore %g0, 0x1, %l1           ! enter one-past invalid register
 312         rd      %psr, %l0               ! this is the window we need to save
 313         and     %l0, 0x1f, %l0
 314         sll     %l1, %l0, %l1
 315         wr      %l1, 0x0, %wim
 316         sethi   %hi( C_LABEL(current) ), %l1
 317         ld      [%l1 + %lo( C_LABEL(current) )], %l1
 318         st      %l0, [%l1 + THREAD_WIM]
 319         save    %g0, %g0, %g0           ! back to invalid register
 320         ldd     [%sp], %l0              ! load the window from stack
 321         ldd     [%sp + 8], %l2
 322         ldd     [%sp + 16], %l4
 323         ldd     [%sp + 24], %l6
 324         ldd     [%sp + 32], %i0
 325         ldd     [%sp + 40], %i2
 326         ldd     [%sp + 48], %i4
 327         ldd     [%sp + 56], %i6
 328         save    %g0, %g0, %g0           ! to window where trap happened
 329         save    %g0, %g0, %g0           ! back to trap window, so rett works
 330         wr      %l0, 0x0, %psr          ! load condition codes
 331         nop
 332         jmp     %l1
 333         rett    %l2                     ! are you as confused as I am?
 334 
 335 spill_from_user:
 336         andcc   %sp, 0x7, %g0           ! check for alignment of user stack
 337         bne     spill_bad_stack
 338         sra     %sp, 0x1e, %l7
 339         cmp     %l7, 0x0
 340         be,a    1f
 341         andn    %sp, 0xfff, %l7
 342         cmp     %l7, -1
 343         bne     spill_bad_stack
 344         andn    %sp, 0xfff, %l7
 345 1:      lda     [%l7] ASI_PTE, %l7
 346         srl     %l7, 0x1d, %l7
 347         andn    %l7, 0x2, %l7
 348         cmp     %l7, 0x4
 349         bne     spill_bad_stack
 350         and     %sp, 0xfff, %l7
 351         cmp     %l7, 0xfc1
 352         bl,a    spill_stack_ok
 353         restore %g0, 1, %l1
 354         add     %sp, 0x38, %l5
 355         sra     %sp, 0x1e, %l7
 356         cmp     %l7, 0x0
 357         be,a    1f
 358         andn    %sp, 0xfff, %l7
 359         cmp     %l7, -1
 360         bne     spill_bad_stack
 361         andn    %sp, 0xfff, %l7
 362 1:      lda     [%l7] ASI_PTE, %l7
 363         srl     %l7, 0x1d, %l7
 364         andn    %l7, 0x2, %l7
 365         cmp     %l7, 0x4
 366         be,a    spill_stack_ok
 367         restore %g0, 0x1, %l1
 368 
 369 spill_bad_stack:
 370         save    %g0, %g0, %g0                   ! save to where restore happened
 371         save    %g0, 0x1, %l4                   ! save is an add remember? to trap window
 372         sethi   %hi( C_LABEL(current) ), %l6
 373         ld      [%l6 + %lo( C_LABEL(current) )], %l6
 374         st      %l4, [%l6 + THREAD_UWINDOWS]    ! update current->tss values
 375         ld      [%l6 + THREAD_WIM], %l5
 376         sll     %l4, %l5, %l4
 377         wr      %l4, 0x0, %wim
 378         ld      [%l6 + THREAD_KSP], %sp         ! set to kernel stack pointer
 379         wr      %l0, 0x20, %psr                 ! turn off traps
 380         std     %l0, [%sp + C_STACK]            ! set up thread_frame on stack
 381         rd      %y, %l3
 382         std     %l2, [%sp + C_STACK + 0x8]
 383         or      %g0, 0x6, %o0                   ! so _sparc_trap knows what to do
 384         st      %g1, [%sp + C_STACK + 0x14]     ! no need to save %g0, always zero
 385         or      %g0, %l0, %o1
 386         std     %g2, [%sp + C_STACK + 0x18]
 387         or      %g0, %l1, %o2
 388         std     %g4, [%sp + C_STACK + 0x20]
 389         add     %sp, C_STACK, %o3
 390         std     %g6, [%sp + C_STACK + 0x28]
 391         std     %i0, [%sp + C_STACK + 0x30]
 392         std     %i2, [%sp + C_STACK + 0x38]
 393         std     %i4, [%sp + C_STACK + 0x40]
 394         call    sparc_trap
 395         std     %i6, [%sp + C_STACK + 0x48]
 396         
 397         ldd     [%sp + C_STACK], %l0
 398         ldd     [%sp + C_STACK + 0x8], %l2
 399         wr      %l3, 0, %y
 400         ld      [%sp + C_STACK + 0x14], %g1
 401         ldd     [%sp + C_STACK + 0x18], %g2
 402         ldd     [%sp + C_STACK + 0x20], %g4
 403         ldd     [%sp + C_STACK + 0x28], %g6
 404         ldd     [%sp + C_STACK + 0x30], %i0
 405         ldd     [%sp + C_STACK + 0x38], %i2
 406         ldd     [%sp + C_STACK + 0x40], %i4
 407         wr      %l0, 0, %psr                    ! disable traps again
 408         ldd     [%sp + C_STACK + 0x48], %i6
 409         sethi   %hi( C_LABEL(current) ), %l6
 410         ld      [%l6 + %lo( C_LABEL(current) )], %l6
 411         ld      [%l6 + THREAD_W_SAVED], %l7
 412         cmp     %l7, 0x0
 413         bl,a    1f
 414         wr      %g0, 0x0, %wim
 415         b,a     leave_trap
 416 
 417 1:      or      %g0, %g6, %l3
 418         or      %g0, %l6, %g6
 419         st      %g0, [%g6 + THREAD_W_SAVED]
 420         restore %g0, %g0, %g0
 421         restore %g0, %g0, %g0
 422         restore %g0, 0x1, %l1
 423         rd      %psr, %l0
 424         sll     %l1, %l0, %l1
 425         wr      %l1, 0x0, %wim
 426         and     %l0, 0x1f, %l0
 427         st      %l0, [%g6 + THREAD_WIM]
 428         nop
 429         save    %g0, %g0, %g0
 430         ldd     [%sp], %l0                      ! load number one
 431         ldd     [%sp + 0x8], %l2
 432         ldd     [%sp + 0x10], %l4
 433         ldd     [%sp + 0x18], %l6
 434         ldd     [%sp + 0x20], %i0
 435         ldd     [%sp + 0x28], %i2
 436         ldd     [%sp + 0x30], %i4
 437         ldd     [%sp + 0x38], %i6
 438         save    %g0, %g0, %g0
 439         ldd     [%sp], %l0                      ! load number two
 440         ldd     [%sp + 0x8], %l2        
 441         ldd     [%sp + 0x10], %l4
 442         ldd     [%sp + 0x18], %l6
 443         ldd     [%sp + 0x20], %i0
 444         ldd     [%sp + 0x28], %i2
 445         ldd     [%sp + 0x30], %i4
 446         ldd     [%sp + 0x38], %i6
 447         save    %g0, %g0, %g0                   ! re-enter trap window
 448         wr      %l0, 0x0, %psr                  ! restore condition codes
 449         or      %g0, %l3, %g6                   ! restore scratch register
 450         jmp     %l1
 451         rett    %l2
 452 
 453 spill_stack_ok:
 454         rd      %psr, %l0
 455         sll     %l1, %l0, %l1
 456         wr      %l1, 0x0, %wim
 457         sethi   %hi( C_LABEL(current) ), %l2
 458         ld      [%l2 + %lo( C_LABEL(current) )], %l2
 459         and     %l0, 0x1f, %l0
 460         st      %l0, [%l2 + THREAD_WIM]
 461         save    %g0, %g0, %g0
 462         ldd     [%sp], %l0                      ! only one load necessary
 463         ldd     [%sp + 0x8], %l2
 464         ldd     [%sp + 0x10], %l4
 465         ldd     [%sp + 0x18], %l6
 466         ldd     [%sp + 0x20], %i0
 467         ldd     [%sp + 0x28], %i2
 468         ldd     [%sp + 0x30], %i4
 469         ldd     [%sp + 0x38], %i6
 470         save    %g0, %g0, %g0
 471         save    %g0, %g0, %g0                   ! save into trap window
 472         wr      %l0, 0x0, %psr                  ! local number 0 here has cond codes
 473         nop
 474         jmp     %l1
 475         rett    %l2
 476 
 477         .globl trap_entry
 478 trap_entry:
 479         TRAP_WIN_CLEAN
 480         jmp     %l1
 481         rett    %l2
 482 
 483         .globl linux_trap_nmi
 484 linux_trap_nmi:
 485         TRAP_WIN_CLEAN
 486         jmp     %l1
 487         rett    %l2
 488 
 489         .globl sparc_trap
 490 sparc_trap:
 491         TRAP_WIN_CLEAN
 492         jmp     %l1
 493         rett    %l2
 494 
 495         .globl leave_trap
 496 leave_trap:
 497         jmp     %l1
 498         rett    %l2
 499 
 500 /* The following two things point to window management tables. The first
 501    one is used to quickly look up how many user windows there are from
 502    trap-land. The second is used in a trap handler to determine if a rett
 503    instruction will land us smack inside the invalid window that possibly
 504    the trap was called to fix-up.
 505 */
 506 
 507 /* For now these are static tables geared for a 7 window sparc. */
 508 
 509                 .data
 510                 .align 4
 511 lnx_winmask:    .byte   2, 4, 8, 16, 32, 64, 128,1  ! lnx_winmask[0..7]
 512 
 513         
 514                 .align 4
 515                 .globl C_LABEL(sys_call_table)
 516 C_LABEL(sys_call_table):
 517         .long C_LABEL(sys_setup)                /* 0 */
 518         .long C_LABEL(sys_exit)
 519         .long C_LABEL(sys_fork)
 520         .long C_LABEL(sys_read)
 521         .long C_LABEL(sys_write)
 522         .long C_LABEL(sys_open)                 /* 5 */
 523         .long C_LABEL(sys_close)
 524         .long C_LABEL(sys_waitpid)
 525         .long C_LABEL(sys_creat)
 526         .long C_LABEL(sys_link)
 527         .long C_LABEL(sys_unlink)               /* 10 */
 528         .long C_LABEL(sys_execve)
 529         .long C_LABEL(sys_chdir)
 530         .long C_LABEL(sys_time)
 531         .long C_LABEL(sys_mknod)
 532         .long C_LABEL(sys_chmod)                /* 15 */
 533         .long C_LABEL(sys_chown)
 534         .long C_LABEL(sys_break)
 535         .long C_LABEL(sys_stat)
 536         .long C_LABEL(sys_lseek)
 537         .long C_LABEL(sys_getpid)               /* 20 */
 538         .long C_LABEL(sys_mount)
 539         .long C_LABEL(sys_umount)
 540         .long C_LABEL(sys_setuid)
 541         .long C_LABEL(sys_getuid)
 542         .long C_LABEL(sys_stime)                /* 25 */
 543         .long C_LABEL(sys_ni_syscall)           /* this will be sys_ptrace() */
 544         .long C_LABEL(sys_alarm)
 545         .long C_LABEL(sys_fstat)
 546         .long C_LABEL(sys_pause)
 547         .long C_LABEL(sys_utime)                /* 30 */
 548         .long C_LABEL(sys_stty)
 549         .long C_LABEL(sys_gtty)
 550         .long C_LABEL(sys_access)
 551         .long C_LABEL(sys_nice)
 552         .long C_LABEL(sys_ftime)                /* 35 */
 553         .long C_LABEL(sys_sync)
 554         .long C_LABEL(sys_kill)
 555         .long C_LABEL(sys_rename)
 556         .long C_LABEL(sys_mkdir)
 557         .long C_LABEL(sys_rmdir)                /* 40 */
 558         .long C_LABEL(sys_dup)
 559         .long C_LABEL(sys_pipe)
 560         .long C_LABEL(sys_times)
 561         .long C_LABEL(sys_prof)
 562         .long C_LABEL(sys_brk)                  /* 45 */
 563         .long C_LABEL(sys_setgid)
 564         .long C_LABEL(sys_getgid)
 565         .long C_LABEL(sys_signal)
 566         .long C_LABEL(sys_geteuid)
 567         .long C_LABEL(sys_getegid)              /* 50 */
 568         .long C_LABEL(sys_acct)
 569         .long C_LABEL(sys_phys)
 570         .long C_LABEL(sys_lock)
 571         .long C_LABEL(sys_ioctl)
 572         .long C_LABEL(sys_fcntl)                /* 55 */
 573         .long C_LABEL(sys_mpx)
 574         .long C_LABEL(sys_setpgid)
 575         .long C_LABEL(sys_ulimit)
 576         .long C_LABEL(sys_olduname)
 577         .long C_LABEL(sys_umask)        /* 60 */
 578         .long C_LABEL(sys_chroot)
 579         .long C_LABEL(sys_ustat)
 580         .long C_LABEL(sys_dup2)
 581         .long C_LABEL(sys_getppid)
 582         .long C_LABEL(sys_getpgrp)              /* 65 */
 583         .long C_LABEL(sys_setsid)
 584         .long C_LABEL(sys_sigaction)
 585         .long C_LABEL(sys_sgetmask)
 586         .long C_LABEL(sys_ssetmask)
 587         .long C_LABEL(sys_setreuid)             /* 70 */
 588         .long C_LABEL(sys_setregid)
 589         .long C_LABEL(sys_sigsuspend)
 590         .long C_LABEL(sys_sigpending)
 591         .long C_LABEL(sys_sethostname)
 592         .long C_LABEL(sys_setrlimit)            /* 75 */
 593         .long C_LABEL(sys_getrlimit)
 594         .long C_LABEL(sys_getrusage)
 595         .long C_LABEL(sys_gettimeofday)
 596         .long C_LABEL(sys_settimeofday)
 597         .long C_LABEL(sys_getgroups)            /* 80 */
 598         .long C_LABEL(sys_setgroups)
 599         .long C_LABEL(sys_select)
 600         .long C_LABEL(sys_symlink)
 601         .long C_LABEL(sys_lstat)
 602         .long C_LABEL(sys_readlink)             /* 85 */
 603         .long C_LABEL(sys_uselib)
 604         .long C_LABEL(sys_swapon)
 605         .long C_LABEL(sys_reboot)
 606         .long C_LABEL(sys_readdir)
 607         .long C_LABEL(sys_mmap)                 /* 90 */
 608         .long C_LABEL(sys_munmap)
 609         .long C_LABEL(sys_truncate)
 610         .long C_LABEL(sys_ftruncate)
 611         .long C_LABEL(sys_fchmod)
 612         .long C_LABEL(sys_fchown)               /* 95 */
 613         .long C_LABEL(sys_getpriority)
 614         .long C_LABEL(sys_setpriority)
 615         .long C_LABEL(sys_profil)
 616         .long C_LABEL(sys_statfs)
 617         .long C_LABEL(sys_fstatfs)              /* 100 */
 618         .long C_LABEL(sys_ni_syscall)
 619         .long C_LABEL(sys_socketcall)
 620         .long C_LABEL(sys_syslog)
 621         .long C_LABEL(sys_setitimer)
 622         .long C_LABEL(sys_getitimer)            /* 105 */
 623         .long C_LABEL(sys_newstat)
 624         .long C_LABEL(sys_newlstat)
 625         .long C_LABEL(sys_newfstat)
 626         .long C_LABEL(sys_uname)
 627         .long C_LABEL(sys_ni_syscall)           /* 110 */
 628         .long C_LABEL(sys_vhangup)
 629         .long C_LABEL(sys_idle)
 630         .long C_LABEL(sys_ni_syscall)           /* was vm86, meaningless on Sparc */
 631         .long C_LABEL(sys_wait4)
 632         .long C_LABEL(sys_swapoff)              /* 115 */
 633         .long C_LABEL(sys_sysinfo)
 634         .long C_LABEL(sys_ipc)
 635         .long C_LABEL(sys_fsync)
 636         .long C_LABEL(sys_sigreturn)
 637         .long C_LABEL(sys_ni_syscall)           /* 120 */
 638         .long C_LABEL(sys_setdomainname)
 639         .long C_LABEL(sys_newuname)
 640         .long C_LABEL(sys_ni_syscall)
 641         .long C_LABEL(sys_adjtimex)
 642         .long C_LABEL(sys_mprotect)             /* 125 */
 643         .long C_LABEL(sys_sigprocmask)
 644         .long C_LABEL(sys_create_module)
 645         .long C_LABEL(sys_init_module)
 646         .long C_LABEL(sys_delete_module)
 647         .long C_LABEL(sys_get_kernel_syms)      /* 130 */
 648         .long C_LABEL(sys_ni_syscall)
 649         .long C_LABEL(sys_getpgid)
 650         .long C_LABEL(sys_fchdir)
 651         .long C_LABEL(sys_bdflush)
 652         .long C_LABEL(sys_sysfs)        /* 135 */
 653         .long C_LABEL(sys_personality)
 654         .long 0                         /* for afs_syscall */
 655         .long C_LABEL(sys_setfsuid)
 656         .long C_LABEL(sys_setfsgid)
 657         .long C_LABEL(sys_llseek)               /* 140 */

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