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_remote.c

    r204 r279  
    3434    uint32_t cxy = (uint32_t)GET_CXY( xp );
    3535
    36     hal_disable_irq( &save_sr );
    37 
    38     asm volatile(
    39         ".set noreorder              \n"
    40         "mfc2   $15,    $24          \n"  /* $15 <= PADDR_EXT */   
    41         "mtc2   %2,     $24          \n"  /* PADDR_EXT <= cxy */   
    42         "sb     %0,     0(%1)        \n"  /* *paddr <= value  */
    43         "mtc2   $15,    $24          \n"  /* PADDR_EXT <= $15 */   
     36/* TODO improve all hal remote functions to include SR handling in assembly code */
     37/* as it is done below for hal_remote_sb                                         */
     38
     39    asm volatile(
     40        ".set noreorder              \n"
     41        "mfc0   $14,    $12          \n"  /* $14 <= CP0_SR      */
     42        "srl    $13,    $14,    1    \n"
     43        "sll    $13,    $13,    1    \n"  /* $13 <= SR masked   */
     44        "mtc0   $13,    $12          \n"  /* IRQ disabled       */
     45       
     46
     47        "mfc2   $15,    $24          \n"  /* $15 <= PADDR_EXT   */   
     48        "mtc2   %2,     $24          \n"  /* PADDR_EXT <= cxy   */   
     49        "sb     %0,     0(%1)        \n"  /* *paddr <= value    */
     50        "mtc2   $15,    $24          \n"  /* PADDR_EXT <= $15   */   
     51
     52        "mtc0   $14,    $12          \n"  /* SR restored        */
     53
    4454        "sync                        \n"
    4555        ".set reorder                \n"
    46         : : "r" (data), "r" (ptr), "r" (cxy) : "$15" );
    47 
    48     hal_restore_irq( save_sr );
    49 
     56        : : "r" (data), "r" (ptr), "r" (cxy) : "$13", "$14", "$15" );
    5057}
    5158
Note: See TracChangeset for help on using the changeset viewer.