Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/sun4u/start.S

    r4872160 r7f1d897  
    3636#include <arch/mm/tlb.h>
    3737#include <arch/mm/tte.h>
     38#include <arch/mm/cache_spec.h>
    3839
    3940#ifdef CONFIG_SMP
     
    6263 *
    6364 * The registers are expected to be in this state:
    64  *  - %o0 bootinfo structure address (BSP only)
    65  *  - %o1 starting address of physical memory
     65 *  - %o0 starting address of physical memory
    6666 *        + bootstrap processor flag
    6767 *          bits 63...1: physical memory starting address / 2
    6868 *          bit 0:       non-zero on BSP processor, zero on AP processors
     69 *  - %o1 bootinfo structure address (BSP only)
     70 *
    6971 *
    7072 * Moreover, we depend on boot having established the following environment:
     
    7779kernel_image_start:
    7880        mov BSP_FLAG, %l0
    79         and %o1, %l0, %l7                       ! l7 <= bootstrap processor?
    80         andn %o1, %l0, %l6                      ! l6 <= start of physical memory
     81        and %o0, %l0, %l7                       ! l7 <= bootstrap processor?
     82        andn %o0, %l0, %l6                      ! l6 <= start of physical memory
    8183
    8284        ! Get bits (PHYSMEM_ADDR_SIZE - 1):13 of physmem_base.
     
    268270        or %l3, %l5, %l3
    269271        stx %l3, [%l4 + %lo(kernel_8k_tlb_data_template)]
    270 
    271         /*
    272          * Flush D-Cache.
    273          */
    274         call dcache_flush
    275         nop
    276 
     272       
     273        ! flush the whole D-cache
     274        set (DCACHE_SIZE - DCACHE_LINE_SIZE), %g1
     275        stxa %g0, [%g1] ASI_DCACHE_TAG
     276       
     2770:
     278        membar #Sync
     279        subcc %g1, DCACHE_LINE_SIZE, %g1
     280        bnz,pt %xcc, 0b
     281        stxa %g0, [%g1] ASI_DCACHE_TAG
     282        membar #Sync
     283       
    277284        /*
    278285         * So far, we have not touched the stack.
     
    282289        or %sp, %lo(temporary_boot_stack), %sp
    283290        sub %sp, STACK_BIAS, %sp
    284 
     291       
     292        /*
     293         * Call arch_pre_main(bootinfo)
     294         */
    285295        call arch_pre_main
    286         nop
    287        
     296        mov %o1, %o0
     297       
     298        /*
     299         * Create the first stack frame.
     300         */
     301        save %sp, -(STACK_WINDOW_SAVE_AREA_SIZE + STACK_ARG_SAVE_AREA_SIZE), %sp
     302        flushw
     303        add %g0, -STACK_BIAS, %fp
     304
    288305        call main_bsp
    289306        nop
     
    292309
    2933100:
    294         ba %xcc, 0b
    295         nop
     311        ba,a %xcc, 0b
    296312
    297313
     
    343359        ldx [%g1], %o6
    344360
     361        /*
     362         * Create the first stack frame.
     363         */
     364        save %sp, -(STACK_WINDOW_SAVE_AREA_SIZE + STACK_ARG_SAVE_AREA_SIZE), %sp
     365        flushw
     366        add %g0, -STACK_BIAS, %fp
     367
    345368        call main_ap
    346369        nop
     
    350373       
    3513740:
    352         ba %xcc, 0b
    353         nop
     375        ba,a %xcc, 0b
    354376
    355377
Note: See TracChangeset for help on using the changeset viewer.