Ignore:
Timestamp:
May 10, 2017, 5:04:01 PM (7 years ago)
Author:
alain
Message:

mprove the HAL for interrupt, exception, syscall handling.

File:
1 edited

Legend:

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

    r1 r16  
    3838        asm volatile ("mfc0    %0,  $15, 1" : "=&r" (proc_id));
    3939
    40         return (proc_id & 0xFFF);  // at most 4096 cores...
     40        return (proc_id & 0x3FF);  // 4/4/2 format for TSAR
    4141}
    4242
     
    186186}
    187187
    188 
    189 
    190 
     188//////////////////////////////////////////////////
     189void hal_get_mmu_excp( intptr_t * mmu_ins_excp_code,
     190                       intptr_t * mmu_ins_bad_vaddr,
     191                       intptr_t * mmu_dat_excp_code,
     192                       intptr_t * mmu_dat_bad_vaddr )
     193{
     194    asm volatile
     195    ( "mfc2   %0,    $11        \n"
     196      "mfc2   %1,    $13        \n"
     197      "mfc2   %2,    $12        \n"
     198      "mfc2   %3,    $14        \n"
     199      : "=&r"(mmu_ins_excp_code),
     200        "=&r"(mmu_ins_bad_vaddr),
     201        "=&r"(mmu_dat_excp_code),
     202        "=&r"(mmu_dat_bad_vaddr) );
     203}
Note: See TracChangeset for help on using the changeset viewer.