Changeset 293 for soft/giet_vm/giet_boot


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.

File:
1 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) );
Note: See TracChangeset for help on using the changeset viewer.