Changeset 240 for soft/giet_vm/sys


Ignore:
Timestamp:
Jun 3, 2013, 5:28:47 PM (11 years ago)
Author:
joannou
Message:

Bug fix for scheduler handling :

  • In boot_init.c, changed left shifts of 10 to left shifts of 12 to support 4K schedulers instead of 1K schedulers
  • In common.c, updated _get_sched() function to return the content of CP0_SCHED register
File:
1 edited

Legend:

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

    r238 r240  
    2626//       _get_sched()
    2727// Access CP0 and returns a pointer (virtual address) on the calling
    28 // processor scheduler (taking into account the processor local index).
     28// processor scheduler.
    2929///////////////////////////////////////////////////////////////////////////////////
    3030static_scheduler_t* _get_sched()
    3131{
    32     static_scheduler_t* psched;
    33     unsigned int        vaddr;
    34     unsigned int        lpid = _procid() % NB_PROCS_MAX;
    35 
     32    unsigned int vaddr;
    3633    asm volatile(
    3734            "mfc0    %0,   $22    \n"
    3835            : "=r"(vaddr) );
    39 
    40     psched = (static_scheduler_t*)vaddr;
    41     return (psched + lpid);
     36    return (static_scheduler_t*)vaddr;
    4237}
    4338
Note: See TracChangeset for help on using the changeset viewer.