Ignore:
Timestamp:
2010-11-26T20:08:10Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
45df59a
Parents:
fb150d78 (diff), ffdd2b9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 moved

Legend:

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

    rfb150d78 r46c20c8  
    3636#include <arch/mm/tlb.h>
    3737#include <arch/mm/tte.h>
     38#include <arch/mm/cache_spec.h>
    3839
    3940#ifdef CONFIG_SMP
     
    6061/*
    6162 * Here is where the kernel is passed control from the boot loader.
    62  * 
     63 *
    6364 * The registers are expected to be in this state:
    64  * - %o0 starting address of physical memory + bootstrap processor flag
    65  *      bits 63...1:    physical memory starting address / 2
    66  *      bit 0:          non-zero on BSP processor, zero on AP processors
    67  * - %o1 bootinfo structure address (BSP only)
    68  * - %o2 bootinfo structure size (BSP only)
     65 *  - %o0 starting address of physical memory
     66 *        + bootstrap processor flag
     67 *          bits 63...1: physical memory starting address / 2
     68 *          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:
    71  * - TLBs are on
    72  * - identity mapping for the kernel image
     73 *  - TLBs are on
     74 *  - identity mapping for the kernel image
     75 *
    7376 */
    7477
     
    267270        or %l3, %l5, %l3
    268271        stx %l3, [%l4 + %lo(kernel_8k_tlb_data_template)]
    269 
    270         /*
    271          * Flush D-Cache.
    272          */
    273         call dcache_flush
    274         nop
    275 
     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       
    276284        /*
    277285         * So far, we have not touched the stack.
     
    281289        or %sp, %lo(temporary_boot_stack), %sp
    282290        sub %sp, STACK_BIAS, %sp
    283 
    284         sethi %hi(bootinfo), %o0
    285         call memcpy                             ! copy bootinfo
    286         or %o0, %lo(bootinfo), %o0
    287 
     291       
     292        /*
     293         * Call arch_pre_main(bootinfo)
     294         */
    288295        call arch_pre_main
    289         nop
    290        
     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
    291305        call main_bsp
    292306        nop
     
    295309
    2963100:
    297         ba %xcc, 0b
    298         nop
     311        ba,a %xcc, 0b
    299312
    300313
     
    346359        ldx [%g1], %o6
    347360
     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
    348368        call main_ap
    349369        nop
     
    353373       
    3543740:
    355         ba %xcc, 0b
    356         nop
     375        ba,a %xcc, 0b
    357376
    358377
Note: See TracChangeset for help on using the changeset viewer.