Changeset 293


Ignore:
Timestamp:
Mar 3, 2014, 1:44:03 PM (11 years ago)
Author:
cfuguet
Message:

Initializing the CP0 CAUSE value on the task contexts to
zero during creation of tasks (boot_scheduler_init). This
is to avoid writing non initialized data on the CAUSE
register when swithing tasks for the first time.

Location:
soft/giet_vm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_boot/boot.c

    r289 r293  
    13021302            //   must be re-initialised by kernel_parallel_init()
    13031303
     1304            psched->context[IDLE_TASK_INDEX][CTX_CR_ID]    = 0;
    13041305            psched->context[IDLE_TASK_INDEX][CTX_SR_ID]    = 0xFF03;
    13051306            psched->context[IDLE_TASK_INDEX][CTX_PTPR_ID]  = _ptabs_paddr[0]>>13;
     
    14991500
    15001501            // initializes the task context in scheduler
     1502            psched->context[ltid][CTX_CR_ID]    = 0;
    15011503            psched->context[ltid][CTX_SR_ID]    = ctx_sr;
    15021504            psched->context[ltid][CTX_SP_ID]    = ctx_sp;
     
    22012203    unsigned int kernel_entry = (unsigned int)&seg_kernel_init_base;
    22022204
     2205#if GIET_DEBUG_INIT
    22032206    _tty_get_lock( 0 );
    2204     _puts("\n[BOOT] Processor[");
     2207    _puts("\n[BOOT DEBUG] Processor[");
    22052208    _putd( cluster_xy >> Y_WIDTH );
    22062209    _puts(",");
     
    22142217    _puts("\n");
    22152218    _tty_release_lock( 0 );
     2219#endif
    22162220
    22172221    asm volatile( "jr   %0" ::"r"(kernel_entry) );
  • soft/giet_vm/giet_common/utils.c

    r268 r293  
    1919
    2020// This global variable is allocated in the boot.c file or in kernel_init.c file
    21 extern static_scheduler_t* _schedulers[X_SIZE * Y_SIZE * NB_PROCS_MAX];
     21extern static_scheduler_t* _schedulers[NB_PROCS_MAX<<(X_WIDTH+Y_WIDTH)];
    2222
    2323///////////////////////////////////////////////////////////////////////////////////
  • soft/giet_vm/giet_kernel/kernel_init.c

    r289 r293  
    408408_putx(epc_value);
    409409_puts("\n");
    410 _tty_release_lock( 0 );
    411 #endif
    412 
    413 _tty_get_lock( 0 );
    414 _puts("\n[GIET] Processor[");
     410
     411_puts("\n[GIET DEBUG] Processor[");
    415412_putd( cluster_xy >> Y_WIDTH );
    416413_puts(",");
     
    424421_puts("\n");
    425422_tty_release_lock( 0 );
     423#endif
    426424
    427425    // Step 7 : set  registers and jump to user code
Note: See TracChangeset for help on using the changeset viewer.