amd64
[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_TLB_SHOOTDOWN_IPI   (IVT_FREEBASE+0)
#define VECTOR_WAKEUP_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 (int n, 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 page_fault (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)
void ident_page_fault (int n, istate_t *istate)
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 irq_ipc_bind_arch().

#define IRQ_COUNT   16
 

Definition at line 44 of file interrupt.h.

Referenced by 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.

#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 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.

#define VECTOR_CLK   (IVT_IRQBASE+IRQ_CLK)
 

Definition at line 64 of file interrupt.h.

#define VECTOR_DEBUG   1
 

Definition at line 62 of file interrupt.h.

Referenced by debugger_init().

#define VECTOR_DEBUG_IPI   (IVT_FREEBASE+2)
 

Definition at line 69 of file interrupt.h.

Referenced by debugger_init().

#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.

#define VECTOR_TLB_SHOOTDOWN_IPI   (IVT_FREEBASE+0)
 

Definition at line 67 of file interrupt.h.

Referenced by arch_pre_mm_init(), and tlb_shootdown_ipi_send().

#define VECTOR_WAKEUP_IPI   (IVT_FREEBASE+1)
 

Definition at line 68 of file interrupt.h.


Function Documentation

void gp_fault int  n,
istate_t istate
 

General Protection Fault.

Definition at line 94 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:

void ident_page_fault int  n,
istate_t istate
 

Identity page mapper

We need to map whole physical memory identically before the page subsystem is initializaed. This thing clears page table and fills in the specific items.

Definition at line 126 of file page.c.

References PAGE_NOT_PRESENT, PTL1_ADDR, PTL1_PRESENT, PTL2_ADDR, PTL2_PRESENT, PTL3_ADDR, PTL3_PRESENT, SETUP_FRAME, SETUP_PTL1, SETUP_PTL2, and SETUP_PTL3.

static void ipc_int int  n,
istate_t istate
[static]
 

Definition at line 169 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 177 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 96 of file interrupt.h.

References istate::rip.

Referenced by exc_dispatch().

static __native istate_get_pc istate_t istate  )  [static]
 

Definition at line 105 of file interrupt.h.

References istate::rip.

static void istate_set_retaddr istate_t istate,
__address  retaddr
[static]
 

Definition at line 101 of file interrupt.h.

References istate::rip.

void nm_fault int  n,
istate_t istate
 

Definition at line 128 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 page_fault int  n,
istate_t istate
 

Definition at line 174 of file page.c.

References as_page_fault(), istate::error_word, fault_if_from_uspace, panic, PF_ACCESS_EXEC, PF_ACCESS_READ, PF_ACCESS_WRITE, print_info_errcode(), and printf().

Referenced by as_page_fault().

Here is the call graph for this function:

void print_info_errcode int  n,
istate_t istate
 

Definition at line 56 of file interrupt.c.

References istate::cs, istate::error_word, get_symtab_entry(), printf(), istate::r10, istate::r11, istate::r12, istate::r13, istate::r14, istate::r15, istate::r8, istate::r9, istate::rax, istate::rbp, istate::rbx, istate::rcx, istate::rdi, istate::rdx, istate::rflags, istate::rip, istate::rsi, and istate::stack.

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

Here is the call graph for this function:

void ss_fault int  n,
istate_t istate
 

Definition at line 121 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
 

void tlb_shootdown_ipi int  n,
istate_t istate
 

Definition at line 138 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 152 of file interrupt.c.

References disable_irqs_function, and panic.

void trap_virtual_enable_irqs __u16  irqmask  ) 
 

Definition at line 144 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 160 of file interrupt.c.

References eoi_function, and panic.

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


Variable Documentation

void(* disable_irqs_function)(__u16 irqmask) = NULL
 

Definition at line 82 of file interrupt.c.

Referenced by trap_virtual_disable_irqs().

void(* disable_irqs_function)(__u16 irqmask)
 

Definition at line 82 of file interrupt.c.

Referenced by trap_virtual_disable_irqs().

void(* enable_irqs_function)(__u16 irqmask) = NULL
 

Definition at line 83 of file interrupt.c.

Referenced by trap_virtual_enable_irqs().

void(* enable_irqs_function)(__u16 irqmask)
 

Definition at line 83 of file interrupt.c.

Referenced by trap_virtual_enable_irqs().

void(* eoi_function)(void) = NULL
 

Definition at line 84 of file interrupt.c.

Referenced by trap_virtual_eoi().

void(* eoi_function)(void)
 

Definition at line 84 of file interrupt.c.

Referenced by trap_virtual_eoi().


Generated on Sun Jun 18 16:36:54 2006 for HelenOS Kernel (amd64) by  doxygen 1.4.6