sparc64
[Interrupt handling and dispatching]


Files

file  interrupt.h
file  exception.h
file  interrupt.h
 This file contains interrupt vector trap handler.
file  mmu.h
 This file contains fast MMU trap handlers.
file  regwin.h
 This file contains register window trap handlers.
file  trap.h
file  trap_table.h
file  exception.c
file  interrupt.c
file  trap.c

Data Structures

struct  istate
struct  trap_table_entry

Defines

#define IRQ_COUNT   1
#define IVT_ITEMS   15
#define IVT_FIRST   1
#define IRQ_KBD   2
#define VECTOR_KBD   IRQ_KBD
#define trap_virtual_enable_irqs(x)
#define trap_virtual_eoi()
#define TT_INSTRUCTION_ACCESS_EXCEPTION   0x08
#define TT_ILLEGAL_INSTRUCTION   0x10
#define TT_DATA_ACCESS_ERROR   0x32
#define TT_MEM_ADDRESS_NOT_ALIGNED   0x34
#define TT_INTERRUPT_LEVEL_1   0x41
#define TT_INTERRUPT_LEVEL_2   0x42
#define TT_INTERRUPT_LEVEL_3   0x43
#define TT_INTERRUPT_LEVEL_4   0x44
#define TT_INTERRUPT_LEVEL_5   0x45
#define TT_INTERRUPT_LEVEL_6   0x46
#define TT_INTERRUPT_LEVEL_7   0x47
#define TT_INTERRUPT_LEVEL_8   0x48
#define TT_INTERRUPT_LEVEL_9   0x49
#define TT_INTERRUPT_LEVEL_10   0x4a
#define TT_INTERRUPT_LEVEL_11   0x4b
#define TT_INTERRUPT_LEVEL_12   0x4c
#define TT_INTERRUPT_LEVEL_13   0x4d
#define TT_INTERRUPT_LEVEL_14   0x4e
#define TT_INTERRUPT_LEVEL_15   0x4f
#define TT_INTERRUPT_VECTOR_TRAP   0x60
#define INTERRUPT_LEVEL_N_HANDLER_SIZE   TRAP_TABLE_ENTRY_SIZE
#define INTERRUPT_VECTOR_TRAP_HANDLER_SIZE   TRAP_TABLE_ENTRY_SIZE
#define TT_FAST_INSTRUCTION_ACCESS_MMU_MISS   0x64
#define TT_FAST_DATA_ACCESS_MMU_MISS   0x68
#define TT_FAST_DATA_ACCESS_PROTECTION   0x6c
#define FAST_MMU_HANDLER_SIZE   128
#define TT_CLEAN_WINDOW   0x24
#define TT_SPILL_0_NORMAL   0x80
#define TT_FILL_0_NORMAL   0xc0
#define REGWIN_HANDLER_SIZE   128
#define CLEAN_WINDOW_HANDLER_SIZE   REGWIN_HANDLER_SIZE
#define SPILL_HANDLER_SIZE   REGWIN_HANDLER_SIZE
#define FILL_HANDLER_SIZE   REGWIN_HANDLER_SIZE
#define L0_OFFSET   0
#define L1_OFFSET   8
#define L2_OFFSET   16
#define L3_OFFSET   24
#define L4_OFFSET   32
#define L5_OFFSET   40
#define L6_OFFSET   48
#define L7_OFFSET   56
#define I0_OFFSET   64
#define I1_OFFSET   72
#define I2_OFFSET   80
#define I3_OFFSET   88
#define I4_OFFSET   96
#define I5_OFFSET   104
#define I6_OFFSET   112
#define I7_OFFSET   120
#define TRAP_TABLE_ENTRY_COUNT   1024
#define TRAP_TABLE_ENTRY_SIZE   32
#define TRAP_TABLE_SIZE   (TRAP_TABLE_ENTRY_COUNT*TRAP_TABLE_ENTRY_SIZE)

Typedefs

typedef trap_table_entry trap_table_entry_t

Functions

static void istate_set_retaddr (istate_t *istate, __address retaddr)
static int istate_from_uspace (istate_t *istate)
static __native istate_get_pc (istate_t *istate)
void interrupt_register (int n, const char *name, iroutine f)
void do_instruction_access_exc (void)
void do_mem_address_not_aligned (void)
void do_data_access_error (void)
void do_illegal_instruction (void)
static void trap_switch_trap_table (void)
void trap_init (void)
void irq_ipc_bind_arch (__native irq)

Variables

trap_table_entry packed
trap_table_entry_t trap_table [TRAP_TABLE_ENTRY_COUNT]
trap_table_entry_t trap_table_save [TRAP_TABLE_ENTRY_COUNT]

Define Documentation

#define CLEAN_WINDOW_HANDLER_SIZE   REGWIN_HANDLER_SIZE
 

Definition at line 48 of file regwin.h.

#define FAST_MMU_HANDLER_SIZE   128
 

Definition at line 46 of file mmu.h.

#define FILL_HANDLER_SIZE   REGWIN_HANDLER_SIZE
 

Definition at line 50 of file regwin.h.

#define I0_OFFSET   64
 

Definition at line 61 of file regwin.h.

#define I1_OFFSET   72
 

Definition at line 62 of file regwin.h.

#define I2_OFFSET   80
 

Definition at line 63 of file regwin.h.

#define I3_OFFSET   88
 

Definition at line 64 of file regwin.h.

#define I4_OFFSET   96
 

Definition at line 65 of file regwin.h.

#define I5_OFFSET   104
 

Definition at line 66 of file regwin.h.

#define I6_OFFSET   112
 

Definition at line 67 of file regwin.h.

#define I7_OFFSET   120
 

Definition at line 68 of file regwin.h.

#define INTERRUPT_LEVEL_N_HANDLER_SIZE   TRAP_TABLE_ENTRY_SIZE
 

Definition at line 61 of file interrupt.h.

#define INTERRUPT_VECTOR_TRAP_HANDLER_SIZE   TRAP_TABLE_ENTRY_SIZE
 

Definition at line 62 of file interrupt.h.

#define IRQ_COUNT   1
 

Definition at line 42 of file interrupt.h.

Referenced by ipc_init(), sys_ipc_register_irq(), and sys_ipc_unregister_irq().

#define IRQ_KBD   2
 

Definition at line 48 of file interrupt.h.

Referenced by i8042_init().

#define IVT_FIRST   1
 

Definition at line 45 of file interrupt.h.

#define IVT_ITEMS   15
 

Definition at line 44 of file interrupt.h.

#define L0_OFFSET   0
 

Window Save Area offsets.

Definition at line 53 of file regwin.h.

#define L1_OFFSET   8
 

Definition at line 54 of file regwin.h.

#define L2_OFFSET   16
 

Definition at line 55 of file regwin.h.

#define L3_OFFSET   24
 

Definition at line 56 of file regwin.h.

#define L4_OFFSET   32
 

Definition at line 57 of file regwin.h.

#define L5_OFFSET   40
 

Definition at line 58 of file regwin.h.

#define L6_OFFSET   48
 

Definition at line 59 of file regwin.h.

#define L7_OFFSET   56
 

Definition at line 60 of file regwin.h.

#define REGWIN_HANDLER_SIZE   128
 

Definition at line 46 of file regwin.h.

#define SPILL_HANDLER_SIZE   REGWIN_HANDLER_SIZE
 

Definition at line 49 of file regwin.h.

#define TRAP_TABLE_ENTRY_COUNT   1024
 

Definition at line 44 of file trap_table.h.

#define TRAP_TABLE_ENTRY_SIZE   32
 

Definition at line 45 of file trap_table.h.

#define TRAP_TABLE_SIZE   (TRAP_TABLE_ENTRY_COUNT*TRAP_TABLE_ENTRY_SIZE)
 

Definition at line 46 of file trap_table.h.

#define trap_virtual_enable_irqs  ) 
 

Definition at line 51 of file interrupt.h.

Referenced by i8042_init().

 
#define trap_virtual_eoi  ) 
 

Definition at line 52 of file interrupt.h.

Referenced by i8042_interrupt().

#define TT_CLEAN_WINDOW   0x24
 

Definition at line 42 of file regwin.h.

#define TT_DATA_ACCESS_ERROR   0x32
 

Definition at line 41 of file exception.h.

#define TT_FAST_DATA_ACCESS_MMU_MISS   0x68
 

Definition at line 43 of file mmu.h.

#define TT_FAST_DATA_ACCESS_PROTECTION   0x6c
 

Definition at line 44 of file mmu.h.

#define TT_FAST_INSTRUCTION_ACCESS_MMU_MISS   0x64
 

Definition at line 42 of file mmu.h.

#define TT_FILL_0_NORMAL   0xc0
 

Definition at line 44 of file regwin.h.

#define TT_ILLEGAL_INSTRUCTION   0x10
 

Definition at line 40 of file exception.h.

#define TT_INSTRUCTION_ACCESS_EXCEPTION   0x08
 

Definition at line 39 of file exception.h.

#define TT_INTERRUPT_LEVEL_1   0x41
 

Definition at line 43 of file interrupt.h.

#define TT_INTERRUPT_LEVEL_10   0x4a
 

Definition at line 52 of file interrupt.h.

#define TT_INTERRUPT_LEVEL_11   0x4b
 

Definition at line 53 of file interrupt.h.

#define TT_INTERRUPT_LEVEL_12   0x4c
 

Definition at line 54 of file interrupt.h.

#define TT_INTERRUPT_LEVEL_13   0x4d
 

Definition at line 55 of file interrupt.h.

#define TT_INTERRUPT_LEVEL_14   0x4e
 

Definition at line 56 of file interrupt.h.

#define TT_INTERRUPT_LEVEL_15   0x4f
 

Definition at line 57 of file interrupt.h.

#define TT_INTERRUPT_LEVEL_2   0x42
 

Definition at line 44 of file interrupt.h.

#define TT_INTERRUPT_LEVEL_3   0x43
 

Definition at line 45 of file interrupt.h.

#define TT_INTERRUPT_LEVEL_4   0x44
 

Definition at line 46 of file interrupt.h.

#define TT_INTERRUPT_LEVEL_5   0x45
 

Definition at line 47 of file interrupt.h.

#define TT_INTERRUPT_LEVEL_6   0x46
 

Definition at line 48 of file interrupt.h.

#define TT_INTERRUPT_LEVEL_7   0x47
 

Definition at line 49 of file interrupt.h.

#define TT_INTERRUPT_LEVEL_8   0x48
 

Definition at line 50 of file interrupt.h.

#define TT_INTERRUPT_LEVEL_9   0x49
 

Definition at line 51 of file interrupt.h.

#define TT_INTERRUPT_VECTOR_TRAP   0x60
 

Definition at line 59 of file interrupt.h.

#define TT_MEM_ADDRESS_NOT_ALIGNED   0x34
 

Definition at line 42 of file exception.h.

#define TT_SPILL_0_NORMAL   0x80
 

Definition at line 43 of file regwin.h.

#define VECTOR_KBD   IRQ_KBD
 

Definition at line 49 of file interrupt.h.

Referenced by i8042_grab(), and i8042_release().


Typedef Documentation

typedef struct trap_table_entry trap_table_entry_t
 

Definition at line 53 of file trap_table.h.


Function Documentation

void do_data_access_error void   ) 
 

Handle data_access_error.

Definition at line 53 of file exception.c.

References panic, and tpc_read().

Here is the call graph for this function:

void do_illegal_instruction void   ) 
 

Handle mem_address_not_aligned.

Definition at line 59 of file exception.c.

References panic, and tpc_read().

Here is the call graph for this function:

void do_instruction_access_exc void   ) 
 

Handle instruction_access_exception.

Definition at line 41 of file exception.c.

References panic.

void do_mem_address_not_aligned void   ) 
 

Handle mem_address_not_aligned.

Definition at line 47 of file exception.c.

References panic.

void interrupt_register int  n,
const char *  name,
iroutine  f
 

Register Interrupt Level Handler.

Parameters:
n Interrupt Level (1 - 15).
name Short descriptive string.
f Handler.

Definition at line 47 of file interrupt.c.

References ASSERT, exc_register(), IVT_FIRST, and IVT_ITEMS.

Referenced by tick_init().

Here is the call graph for this function:

void irq_ipc_bind_arch __native  irq  ) 
 

Definition at line 55 of file interrupt.c.

References panic.

Referenced by sys_ipc_register_irq().

static int istate_from_uspace istate_t istate  )  [static]
 

Definition at line 61 of file interrupt.h.

Referenced by exc_dispatch().

static __native istate_get_pc istate_t istate  )  [static]
 

Definition at line 66 of file interrupt.h.

static void istate_set_retaddr istate_t istate,
__address  retaddr
[static]
 

Definition at line 57 of file interrupt.h.

void trap_init void   ) 
 

Initialize trap table.

Definition at line 50 of file trap.c.

Referenced by arch_pre_mm_init().

static void trap_switch_trap_table void   )  [static]
 

Switch to in-kernel trap table.

Definition at line 42 of file trap.h.

References tba_write(), and trap_table.

Referenced by tlb_arch_init().

Here is the call graph for this function:


Variable Documentation

struct trap_table_entry packed
 

trap_table_entry_t trap_table[TRAP_TABLE_ENTRY_COUNT]
 

Referenced by trap_switch_trap_table().

trap_table_entry_t trap_table_save[TRAP_TABLE_ENTRY_COUNT]
 


Generated on Sun Jun 18 17:46:37 2006 for HelenOS Kernel (sparc64) by  doxygen 1.4.6