Changeset 16 for trunk/hal


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

mprove the HAL for interrupt, exception, syscall handling.

Location:
trunk/hal
Files:
11 added
3 edited
7 moved

Legend:

Unmodified
Added
Removed
  • trunk/hal/generic/hal_atomic.h

    r2 r16  
    2525#define  _HAL_ATOMIC_H_
    2626
    27 #include <almos_config.h>
     27#include <kernel_config.h>
    2828#include <hal_types.h>
    2929
  • trunk/hal/generic/hal_special.h

    r2 r16  
    116116void hal_fixed_delay();
    117117
     118/*****************************************************************************************
     119 * This function returns informations on MMU exceptions :
     120 * @ mmu_ins_excp_code : [out] instruction fetch exception code
     121 * @ mmu_ins_bad_vaddr : [out] instruction fetch faulty virtual address
     122 * @ mmu_dat_excp_code : [out] data access exception code
     123 * @ mmu_dat_bad_vaddr : [out] data access faulty virtual address
     124 ****************************************************************************************/
     125void hal_get_mmu_excp( intptr_t * mmu_ins_excp_code,
     126                       intptr_t * mmu_ins_bad_vaddr,
     127                       intptr_t * mmu_dat_excp_code,
     128                       intptr_t * mmu_dat_bad_vaddr );
    118129
    119130
  • trunk/hal/i386/hal_types.h

    r8 r16  
    2525#define HAL_TYPES_H_
    2626
    27 #include <almos_config.h>
     27#include <kernel_config.h>
    2828#include <stdint.h>
    2929
  • 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}
  • trunk/hal/tsar_mips32/hal_types.h

    r8 r16  
    2525#define HAL_TYPES_H_
    2626
    27 #include <almos_config.h>
     27#include <kernel_config.h>
    2828
    2929#ifndef NULL
     
    8181 **************************************************************************/
    8282
    83 typedef uint64_t      clock_t;   // for cycle counters
     83typedef uint64_t      cycle_t;   // for cycle counters
    8484
    8585/***************************************************************************
     
    144144__attribute__((packed)) cacheline_t;
    145145
    146 #define CACHELINE_ALIGNED __attribute__((aligned(CONFIG_CACHE_LINE_SIZE)))
    147 
    148146/***************************************************************************
    149147 *  Address types and macros         !!!  hardware dependant  !!!
Note: See TracChangeset for help on using the changeset viewer.