Ignore:
Timestamp:
Jul 27, 2017, 12:23:29 AM (7 years ago)
Author:
alain
Message:

1) Introduce independant command fields for the various devices in the thread descriptor.
2) Introduce a new dev_pic_enable_ipi() function in the generic PIC device
3) Fix two bugs identified by Maxime in the scheduler initialisation, and in the sched_select().
4) fix several bugs in the TSAR hal_kentry.S.
5) Introduce a third kgiet segment (besides kdata and kcode) in the TSAR bootloader.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/core/hal_special.c

    r124 r279  
    3232struct thread_s;
    3333
     34/////////////////////////////////
     35void hal_set_ebase( reg_t  base )
     36{
     37        asm volatile ("mtc0    %0,  $15,  1" : : "r" (base));
     38}
    3439
    3540//////////////////////////
     
    4853    cycle_t count;
    4954
    50         asm volatile ("mfc0   %0,  $9  " : "=&r" (count));
     55        asm volatile ("mfc0   %0,  $9" : "=&r" (count));
    5156
    5257    return count;
     58}
     59
     60/////////////////////////
     61inline reg_t hal_get_sr()
     62{
     63    register uint32_t sr;
     64
     65        asm volatile ("mfc0    %0,    $12" : "=&r" (sr));
     66
     67        return sr;
    5368}
    5469
     
    90105        void * thread_ptr;
    91106 
    92         asm volatile
    93     ( "mfc0    %0,  $4,  2  \n"
    94       : "=&r" (thread_ptr)  );
     107        asm volatile ("mfc0    %0,  $4,  2" : "=&r" (thread_ptr));
    95108
    96109        return thread_ptr;
     
    100113void hal_set_current_thread( struct thread_s * thread )
    101114{
    102         asm volatile
    103     ( "mtc0    %0,  $4,  2  \n"
    104       : : "r" (thread) );
     115        asm volatile ("mtc0    %0,  $4,  2" : : "r" (thread));
    105116}
    106117
     
    135146        register uint32_t sp;
    136147 
    137         asm volatile
    138         ( "or    %0,   $0,   $29  \n"
    139        : "=&r" (sp) );
     148        asm volatile ("or    %0,   $0,   $29" : "=&r" (sp));
    140149 
    141150        return sp;
Note: See TracChangeset for help on using the changeset viewer.