root/arch/alpha/head.S

/* [previous][next][first][last][top][bottom][index][help] */
   1 /*
   2  * alpha/boot/head.S
   3  *
   4  * initial boot stuff..
   5  */
   6 
   7 #define __ASSEMBLY__
   8 #include <asm/system.h>
   9 
  10 #define halt .long PAL_halt
  11 
  12 /*
  13  * NOTE! The console bootstrap will load us at 0x20000000, but this image
  14  * is linked to run at START_ADDR, so the first thing we do is to move
  15  * ourself up to the right address.. We'd better be position-independent
  16  * at that stage :-)
  17  */
  18         .set noreorder
  19         .globl  __start
  20         .ent    __start
  21 __start:
  22         bis     $31,$31,$31
  23         br      $1,$200
  24         .long START_ADDR, START_ADDR >> 32      /* strange bug in the assembler.. duh */
  25         .long START_SIZE, START_SIZE >> 32
  26 $200:   ldq     $30,0($1)               /* new stack - below this */
  27         lda     $2,-8($1)               /* __start */
  28         bis     $30,$30,$3              /* new address */
  29         subq    $3,$2,$6                /* difference */
  30         ldq     $4,8($1)                /* size */
  31 $201:   subq    $4,8,$4
  32         ldq     $5,0($2)
  33         addq    $2,8,$2
  34         stq     $5,0($3)
  35         addq    $3,8,$3
  36         bne     $4,$201
  37         br      $1,$202
  38 $202:   addq    $1,$6,$1
  39         addq    $1,12,$1                /* $203 in the new address space */
  40         jmp     $31,($1),$203
  41 $203:   br      $27,$100
  42 $100:   ldgp    $29,0($27)
  43         lda     $27,start_kernel
  44         jsr     $26,($27),start_kernel
  45         halt
  46         .end __start
  47 
  48         .align 5
  49         .globl  wrent
  50         .ent    wrent
  51 wrent:
  52         .long PAL_wrent
  53         ret ($26)
  54         .end wrent
  55 
  56         .align 5
  57         .globl  wrkgp
  58         .ent    wrkgp
  59 wrkgp:
  60         .long PAL_wrkgp
  61         ret ($26)
  62         .end wrkgp
  63 
  64         .align 5
  65         .globl  switch_to_osf_pal
  66         .ent    switch_to_osf_pal
  67 switch_to_osf_pal:
  68         subq    $30,128,$30
  69         stq     $26,0($30)
  70         stq     $1,8($30)
  71         stq     $2,16($30)
  72         stq     $3,24($30)
  73         stq     $4,32($30)
  74         stq     $5,40($30)
  75         stq     $6,48($30)
  76         stq     $7,56($30)
  77         stq     $8,64($30)
  78         stq     $9,72($30)
  79         stq     $10,80($30)
  80         stq     $11,88($30)
  81         stq     $12,96($30)
  82         stq     $13,104($30)
  83         stq     $14,112($30)
  84         stq     $15,120($30)
  85 
  86         stq     $30,0($17)      /* save KSP in PCB */
  87 
  88         bis     $30,$30,$20     /* a4 = KSP */
  89         br      $17,__do_swppal
  90 
  91         ldq     $26,0($30)
  92         ldq     $1,8($30)
  93         ldq     $2,16($30)
  94         ldq     $3,24($30)
  95         ldq     $4,32($30)
  96         ldq     $5,40($30)
  97         ldq     $6,48($30)
  98         ldq     $7,56($30)
  99         ldq     $8,64($30)
 100         ldq     $9,72($30)
 101         ldq     $10,80($30)
 102         ldq     $11,88($30)
 103         ldq     $12,96($30)
 104         ldq     $13,104($30)
 105         ldq     $14,112($30)
 106         ldq     $15,120($30)
 107         addq    $30,128,$30
 108         ret ($26)
 109 
 110 __do_swppal:
 111         .long   PAL_swppal
 112         .end    switch_to_osf_pal

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