Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/src/start.S

    rd9ee2ea rfe7abd0  
    4747
    4848stack0:
     49
     50#
     51# Kernel entry point.
     52#
     53# This is where we are passed control from the boot code.
     54# Register contents:
     55#
     56#       r2      Address of the boot code's bootinfo structure.
     57#
    4958kernel_image_start:
    5059        .auto
    51        
    52 #ifdef CONFIG_SMP
    53         # Identify self(CPU) in OS structures by ID / EID
    54        
    55         mov r9 = cr64
    56         mov r10 = 1
    57         movl r12 = 0xffffffff
    58         movl r8 = cpu_by_id_eid_list
    59         and r8 = r8, r12
    60         shr r9 = r9, 16
    61         add r8 = r8, r9
    62         st1 [r8] = r10
    63 #endif
    6460       
    6561        mov psr.l = r0
     
    164160        bsw.1
    165161       
    166 #ifdef CONFIG_SMP
    167         # Am I BSP or AP?
    168         movl r20 = bsp_started ;;
    169         ld8 r20 = [r20] ;;
    170         cmp.eq p3, p2 = r20, r0 ;;
    171 #else
    172         cmp.eq p3, p2 = r0, r0 ;;  /* you are BSP */
    173 #endif  /* CONFIG_SMP */
    174        
    175162        # Initialize register stack
    176163        mov ar.rsc = r0
     
    179166        loadrs
    180167       
    181         # Initialize memory stack to some sane value
    182         movl r12 = stack0 ;;
    183         add r12 = -16, r12  /* allocate a scratch area on the stack */
     168        #
     169        # Initialize memory stack to some sane value and allocate a scratch are
     170        # on it.
     171        #
     172        movl sp = stack0 ;;
     173        add sp = -16, sp
    184174       
    185175        # Initialize gp (Global Pointer) register
     176        movl gp = kernel_image_start
     177       
     178        #       
     179        # Initialize bootinfo on BSP.
     180        #
    186181        movl r20 = (VRN_KERNEL << VRN_SHIFT) ;;
    187         or r20 = r20, r1 ;;
    188         movl r1 = kernel_image_start
    189        
    190         /*
    191          * Initialize bootinfo on BSP.
    192          */
    193 (p3)    addl r21 = @gprel(bootinfo), gp ;;
    194 (p3)    st8 [r21] = r20
     182        or r20 = r20, r2 ;;
     183        addl r21 = @gprel(bootinfo), gp ;;
     184        st8 [r21] = r20
    195185       
    196186        ssm (1 << 19) ;; /* Disable f32 - f127 */
     
    198188        srlz.d ;;
    199189       
    200 #ifdef CONFIG_SMP
    201 (p2)    movl r18 = main_ap ;;
    202 (p2)    mov b1 = r18 ;;
    203 (p2)    br.call.sptk.many b0 = b1
    204        
    205         # Mark that BSP is on
    206        
    207         mov r20 = 1 ;;
    208         movl r21 = bsp_started ;;
    209         st8 [r21] = r20 ;;
    210 #endif
    211        
    212190        br.call.sptk.many b0 = arch_pre_main
    213        
    214         movl r18 = main_bsp ;;
    215         mov b1 = r18 ;;
    216         br.call.sptk.many b0 = b1
    217 
     1910:
     192        br.call.sptk.many b0 = main_bsp
    2181930:
    219194        br 0b
    220 
    221 #ifdef CONFIG_SMP
    222 
    223 .align 4096
    224 kernel_image_ap_start:
    225         .auto
    226        
    227         # Identify self(CPU) in OS structures by ID / EID
    228        
    229         mov r9 = cr64
    230         mov r10 = 1
    231         movl r12 = 0xffffffff
    232         movl r8 = cpu_by_id_eid_list
    233         and r8 = r8, r12
    234         shr r9 = r9, 16
    235         add r8 = r8, r9
    236         st1 [r8] = r10
    237        
    238         # Wait for wakeup synchro signal (#3 in cpu_by_id_eid_list)
    239 
    240 kernel_image_ap_start_loop:
    241         movl r11 = kernel_image_ap_start_loop
    242         and r11 = r11, r12
    243         mov b1 = r11
    244        
    245         ld1 r20 = [r8]
    246         movl r21 = 3
    247         cmp.eq p2, p3 = r20, r21
    248 (p3)    br.call.sptk.many b0 = b1
    249        
    250         movl r11 = kernel_image_start
    251         and r11 = r11, r12
    252         mov b1 = r11
    253         br.call.sptk.many b0 = b1
    254 
    255 .align 16
    256 .global bsp_started
    257 bsp_started:
    258         .space 8
    259 
    260 .align 4096
    261 .global cpu_by_id_eid_list
    262 cpu_by_id_eid_list:
    263         .space 65536
    264 
    265 #endif  /* CONFIG_SMP */
Note: See TracChangeset for help on using the changeset viewer.