ia32
[Interrupt handling and dispatching]


Files

file  interrupt.h
file  interrupt.c

Data Structures

struct  istate

Defines

#define IVT_ITEMS   IDT_ITEMS
#define EXC_COUNT   32
#define IRQ_COUNT   16
#define IVT_EXCBASE   0
#define IVT_IRQBASE   (IVT_EXCBASE+EXC_COUNT)
#define IVT_FREEBASE   (IVT_IRQBASE+IRQ_COUNT)
#define IRQ_CLK   0
#define IRQ_KBD   1
#define IRQ_PIC1   2
#define IRQ_PIC_SPUR   7
#define VECTOR_APIC_SPUR   (IVT_ITEMS-1)
#define VECTOR_DEBUG   1
#define VECTOR_PIC_SPUR   (IVT_IRQBASE+IRQ_PIC_SPUR)
#define VECTOR_CLK   (IVT_IRQBASE+IRQ_CLK)
#define VECTOR_KBD   (IVT_IRQBASE+IRQ_KBD)
#define VECTOR_SYSCALL   (IVT_FREEBASE+0)
#define VECTOR_TLB_SHOOTDOWN_IPI   (IVT_FREEBASE+1)
#define VECTOR_DEBUG_IPI   (IVT_FREEBASE+2)

Functions

static int istate_from_uspace (istate_t *istate)
static void istate_set_retaddr (istate_t *istate, __address retaddr)
static __native istate_get_pc (istate_t *istate)
void PRINT_INFO_ERRCODE (istate_t *istate)
void null_interrupt (int n, istate_t *istate)
void gp_fault (int n, istate_t *istate)
void nm_fault (int n, istate_t *istate)
void ss_fault (int n, istate_t *istate)
void simd_fp_exception (int n, istate_t *istate)
void syscall (int n, istate_t *istate)
void tlb_shootdown_ipi (int n, istate_t *istate)
void trap_virtual_enable_irqs (__u16 irqmask)
void trap_virtual_disable_irqs (__u16 irqmask)
void trap_virtual_eoi (void)
static void ipc_int (int n, istate_t *istate)
void irq_ipc_bind_arch (__native irq)

Variables

void(* disable_irqs_function )(__u16 irqmask)
void(* enable_irqs_function )(__u16 irqmask)
void(* eoi_function )(void)
void(* disable_irqs_function )(__u16 irqmask) = NULL
void(* enable_irqs_function )(__u16 irqmask) = NULL
void(* eoi_function )(void) = NULL

Define Documentation

#define EXC_COUNT   32
 

Definition at line 43 of file interrupt.h.

#define IRQ_CLK   0
 

Definition at line 50 of file interrupt.h.

Referenced by i8254_normal_operation(), and irq_ipc_bind_arch().

#define IRQ_COUNT   16
 

Definition at line 44 of file interrupt.h.

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

#define IRQ_KBD   1
 

Definition at line 51 of file interrupt.h.

Referenced by i8042_init().

#define IRQ_PIC1   2
 

Definition at line 52 of file interrupt.h.

Referenced by i8259_init().

#define IRQ_PIC_SPUR   7
 

Definition at line 53 of file interrupt.h.

#define IVT_EXCBASE   0
 

Definition at line 46 of file interrupt.h.

#define IVT_FREEBASE   (IVT_IRQBASE+IRQ_COUNT)
 

Definition at line 48 of file interrupt.h.

#define IVT_IRQBASE   (IVT_EXCBASE+EXC_COUNT)
 

Definition at line 47 of file interrupt.h.

Referenced by apic_init(), i8259_init(), ipc_int(), and irq_ipc_bind_arch().

#define IVT_ITEMS   IDT_ITEMS
 

Definition at line 41 of file interrupt.h.

#define VECTOR_APIC_SPUR   (IVT_ITEMS-1)
 

Definition at line 56 of file interrupt.h.

Referenced by apic_init(), and l_apic_init().

#define VECTOR_CLK   (IVT_IRQBASE+IRQ_CLK)
 

Definition at line 64 of file interrupt.h.

Referenced by apic_init(), i8254_normal_operation(), and l_apic_init().

#define VECTOR_DEBUG   1
 

Definition at line 62 of file interrupt.h.

#define VECTOR_DEBUG_IPI   (IVT_FREEBASE+2)
 

Definition at line 69 of file interrupt.h.

#define VECTOR_KBD   (IVT_IRQBASE+IRQ_KBD)
 

Definition at line 65 of file interrupt.h.

Referenced by i8042_grab(), and i8042_release().

#define VECTOR_PIC_SPUR   (IVT_IRQBASE+IRQ_PIC_SPUR)
 

Definition at line 63 of file interrupt.h.

Referenced by i8259_init().

#define VECTOR_SYSCALL   (IVT_FREEBASE+0)
 

Definition at line 67 of file interrupt.h.

Referenced by arch_pre_mm_init(), and idt_init().

#define VECTOR_TLB_SHOOTDOWN_IPI   (IVT_FREEBASE+1)
 

Definition at line 68 of file interrupt.h.

Referenced by arch_pre_mm_init(), and tlb_shootdown_ipi_send().


Function Documentation

void gp_fault int  n,
istate_t istate
 

General Protection Fault.

Definition at line 95 of file interrupt.c.

References CPU, fault_if_from_uspace, io_perm_bitmap_install(), panic, PRINT_INFO_ERRCODE(), spinlock_lock, spinlock_unlock(), and TASK.

Here is the call graph for this function:

static void ipc_int int  n,
istate_t istate
[static]
 

Definition at line 192 of file interrupt.c.

References ipc_irq_send_notif(), IVT_IRQBASE, and trap_virtual_eoi().

Referenced by irq_ipc_bind_arch().

Here is the call graph for this function:

void irq_ipc_bind_arch __native  irq  ) 
 

Definition at line 200 of file interrupt.c.

References exc_register(), ipc_int(), IRQ_CLK, IVT_IRQBASE, and trap_virtual_enable_irqs().

Referenced by sys_ipc_register_irq().

Here is the call graph for this function:

static int istate_from_uspace istate_t istate  )  [static]
 

Return true if exception happened while in userspace

Definition at line 93 of file interrupt.h.

References istate::eip.

Referenced by exc_dispatch().

static __native istate_get_pc istate_t istate  )  [static]
 

Definition at line 103 of file interrupt.h.

References istate::eip.

static void istate_set_retaddr istate_t istate,
__address  retaddr
[static]
 

Definition at line 98 of file interrupt.h.

References istate::eip.

void nm_fault int  n,
istate_t istate
 

Definition at line 146 of file interrupt.c.

References fault_if_from_uspace, panic, and scheduler_fpu_lazy_request().

Here is the call graph for this function:

void null_interrupt int  n,
istate_t istate
 

Definition at line 86 of file interrupt.c.

References fault_if_from_uspace, panic, and PRINT_INFO_ERRCODE().

Referenced by idt_init().

Here is the call graph for this function:

void PRINT_INFO_ERRCODE istate_t istate  ) 
 

Definition at line 63 of file interrupt.c.

References CPU, istate::cs, istate::eax, istate::ebp, istate::ebx, istate::ecx, istate::edi, istate::edx, istate::eflags, istate::eip, istate::error_word, istate::esi, get_symtab_entry(), printf(), and istate::stack.

Referenced by gp_fault(), null_interrupt(), page_fault(), simd_fp_exception(), and ss_fault().

Here is the call graph for this function:

void simd_fp_exception int  n,
istate_t istate
 

Definition at line 130 of file interrupt.c.

References fault_if_from_uspace, panic, PRINT_INFO_ERRCODE(), and printf().

Here is the call graph for this function:

void ss_fault int  n,
istate_t istate
 

Definition at line 122 of file interrupt.c.

References fault_if_from_uspace, panic, and PRINT_INFO_ERRCODE().

Here is the call graph for this function:

void syscall int  n,
istate_t istate
 

Definition at line 156 of file interrupt.c.

References panic.

Referenced by arch_pre_mm_init().

void tlb_shootdown_ipi int  n,
istate_t istate
 

Definition at line 161 of file interrupt.c.

References tlb_shootdown_ipi_recv(), and trap_virtual_eoi().

Referenced by arch_pre_mm_init().

Here is the call graph for this function:

void trap_virtual_disable_irqs __u16  irqmask  ) 
 

Definition at line 175 of file interrupt.c.

References disable_irqs_function, and panic.

void trap_virtual_enable_irqs __u16  irqmask  ) 
 

Definition at line 167 of file interrupt.c.

References enable_irqs_function, and panic.

Referenced by i8042_init(), and irq_ipc_bind_arch().

void trap_virtual_eoi void   ) 
 

Definition at line 183 of file interrupt.c.

References eoi_function, and panic.

Referenced by i8042_interrupt(), i8254_interrupt(), ipc_int(), and tlb_shootdown_ipi().


Variable Documentation

void(* disable_irqs_function)(__u16 irqmask) = NULL
 

Definition at line 59 of file interrupt.c.

Referenced by apic_init(), i8259_init(), and trap_virtual_disable_irqs().

void(* disable_irqs_function)(__u16 irqmask)
 

Definition at line 59 of file interrupt.c.

Referenced by apic_init(), i8259_init(), and trap_virtual_disable_irqs().

void(* enable_irqs_function)(__u16 irqmask) = NULL
 

Definition at line 60 of file interrupt.c.

Referenced by apic_init(), i8259_init(), and trap_virtual_enable_irqs().

void(* enable_irqs_function)(__u16 irqmask)
 

Definition at line 60 of file interrupt.c.

Referenced by apic_init(), i8259_init(), and trap_virtual_enable_irqs().

void(* eoi_function)(void) = NULL
 

Definition at line 61 of file interrupt.c.

Referenced by apic_init(), i8259_init(), and trap_virtual_eoi().

void(* eoi_function)(void)
 

Definition at line 61 of file interrupt.c.

Referenced by apic_init(), i8259_init(), and trap_virtual_eoi().


Generated on Sun Jun 18 16:48:49 2006 for HelenOS Kernel (ia32) by  doxygen 1.4.6