root/arch/alpha/boot/head.S

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

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