5

I am trying to go more indepth os understanding. So, the linux boot has to deal with an assembly file. I know about mov, push, pop, but here I am quite lost with this :

.globl  __start
    .ent    __start
__start:
    br  $29,2f
2:  ldgp    $29,0($29)
    jsr $26,start_kernel
    call_pal PAL_halt
    .end __start

switch_to_osf_pal:
    subq    $30,128,$30
...

Am I correct if I say that __start is a label ? So will it be called as soon as it is called in an other peace of code ? I tried to google around to understand the ldgp, or call_pal symbols but I found nothing. At last, I found in c files that switch_to_osf_pal is called in this way switch_to_osf_pal(2, pcb_va, pcb_pa, VPTB); is this functions taking this params call the assembly function ?

Sorry if there is a to much questions, but I didn't find any clear doc

msam
  • 4,259
  • 3
  • 19
  • 32
epsilones
  • 11,279
  • 21
  • 61
  • 85
  • is this the code for the Alpha architecture? If you want to explore the linux boot loader you might be able to find information much more readily if you explore a more common architecture – msam Apr 03 '13 at 14:54
  • @msam I thinks it is indeed an Alpha architecture. What kind of architecture should I explore ? – epsilones Apr 03 '13 at 14:57
  • 1
    x86 and arm come to mind... – msam Apr 03 '13 at 15:04

1 Answers1

3

__start is a label.

ldgp means load global pointer in Alpha assembly.

call_palmeans call privileged architecture library. It is an unconditional jump to an exception handler.

More information in Assembly Programmer's Guide

mouviciel
  • 66,855
  • 13
  • 106
  • 140