Ignore:
Timestamp:
Sep 19, 2012, 10:52:43 AM (12 years ago)
Author:
alain
Message:

Introducing support for Network controller

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/sys/kernel_init.c

    r216 r218  
    3333
    3434///////////////////////////////////////////////////////////////////////////////////
    35 // Kernel Global variables
     35// array of pointers on the page tables (both virtual and physical addresses)
    3636///////////////////////////////////////////////////////////////////////////////////
    3737
     
    4242unsigned int                    _ptabs_vaddr[GIET_NB_VSPACE_MAX];
    4343
     44///////////////////////////////////////////////////////////////////////////////////
     45// array of pointers on the schedulers (physical addresses)
     46///////////////////////////////////////////////////////////////////////////////////
     47
    4448__attribute__((section (".kdata")))
    4549static_scheduler_t*             _schedulers_paddr[NB_CLUSTERS*NB_PROCS_MAX];
     50
     51///////////////////////////////////////////////////////////////////////////////////
     52// staks for the "idle" tasks (256 bytes for each processor)
     53///////////////////////////////////////////////////////////////////////////////////
    4654
    4755__attribute__((section (".kdata")))
     
    201209    }
    202210
    203     // step 5 : initialise the "idle" task context
     211    // step 5 : initialise, for each processor, the "idle" task context:
    204212    //          the SR initialisation value is 0xFF03 because
    205     //          the task _ctx_idle() executes in kernel mode...
     213    //          the task _ctx_idle() executes in kernel mode.
    206214    //          it uses the page table of vspace[0]
     215    //          the stack size is 256 bytes
    207216 
    208217    _set_context_slot( IDLE_TASK_INDEX, CTX_RUN_ID,  1 );
    209218    _set_context_slot( IDLE_TASK_INDEX, CTX_SR_ID,   0xFF03 );
    210     _set_context_slot( IDLE_TASK_INDEX, CTX_SP_ID,   (unsigned int)&_idle_stack[global_pid] + 64 );
     219    _set_context_slot( IDLE_TASK_INDEX, CTX_SP_ID,   (unsigned int)_idle_stack + (global_pid<<8) );
    211220    _set_context_slot( IDLE_TASK_INDEX, CTX_RA_ID,   (unsigned int)&_ctx_eret );
    212221    _set_context_slot( IDLE_TASK_INDEX, CTX_EPC_ID,  (unsigned int)&_ctx_idle );
     
    233242
    234243        _get_lock( &_tty_put_lock );
    235         _puts("\n [GIET WARNING] No task allocated to processor ");
     244        _puts("\n[GIET WARNING] No task allocated to processor ");
    236245        _putd( global_pid );
    237246        _puts(" => idle\n");
Note: See TracChangeset for help on using the changeset viewer.