Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/include/intr.h
Show All 24 Lines | |||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
*/ | */ | ||||
#ifndef __X86_INTR_MACHDEP_H__ | #ifndef __X86_INTR_MACHDEP_H__ | ||||
#define __X86_INTR_MACHDEP_H__ | #define __X86_INTR_MACHDEP_H__ | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
/* FreeBSD standard interrupt controller interface */ | |||||
typedef struct intsrc interrupt_t; | |||||
extern interrupt_t *intrtab_lookup(u_int irq) __pure; | |||||
#define _intr2event(intr) ((intr)->is_event) | |||||
#define intr2event(intr) ((intr) != NULL ? _intr2event(intr) : NULL) | |||||
/* FreeBSD standard interrupt controller interface */ | |||||
/* | /* | ||||
* Values used in determining the allocation of IRQ values among | * Values used in determining the allocation of IRQ values among | ||||
* different types of I/O interrupts. These values are used as | * different types of I/O interrupts. These values are used as | ||||
* indices into a interrupt source array to map I/O interrupts to a | * indices into a interrupt source array to map I/O interrupts to a | ||||
* device interrupt source whether it be a pin on an interrupt | * device interrupt source whether it be a pin on an interrupt | ||||
* controller or an MSI interrupt. The 16 ISA IRQs are assigned fixed | * controller or an MSI interrupt. The 16 ISA IRQs are assigned fixed | ||||
* IDT vectors, but all other device interrupts allocate IDT vectors | * IDT vectors, but all other device interrupts allocate IDT vectors | ||||
* on demand. Currently we have 191 IDT vectors available for device | * on demand. Currently we have 191 IDT vectors available for device | ||||
▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | |||||
int intr_add_handler(const char *name, struct intsrc *isrc, | int intr_add_handler(const char *name, struct intsrc *isrc, | ||||
driver_filter_t filter, driver_intr_t handler, void *arg, | driver_filter_t filter, driver_intr_t handler, void *arg, | ||||
enum intr_type flags, void **cookiep, int domain); | enum intr_type flags, void **cookiep, int domain); | ||||
int intr_config_intr(struct intsrc *isrc, enum intr_trigger trig, | int intr_config_intr(struct intsrc *isrc, enum intr_trigger trig, | ||||
enum intr_polarity pol); | enum intr_polarity pol); | ||||
int intr_describe(struct intsrc *isrc, void *ih, const char *descr); | int intr_describe(struct intsrc *isrc, void *ih, const char *descr); | ||||
void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); | void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); | ||||
u_int intr_next_cpu(int domain); | u_int intr_next_cpu(int domain); | ||||
struct intsrc *intr_lookup_source(int vector); | |||||
int intr_register_pic(struct pic *pic); | int intr_register_pic(struct pic *pic); | ||||
int intr_register_source(struct intsrc *isrc); | int intr_register_source(struct intsrc *isrc); | ||||
int intr_remove_handler(void *cookie); | int intr_remove_handler(void *cookie); | ||||
void intr_resume(bool suspend_cancelled); | void intr_resume(bool suspend_cancelled); | ||||
void intr_suspend(void); | void intr_suspend(void); | ||||
void intr_reprogram(void); | void intr_reprogram(void); | ||||
void intrcnt_add(const char *name, u_long **countp); | void intrcnt_add(const char *name, u_long **countp); | ||||
void nexus_add_irq(u_long irq); | void nexus_add_irq(u_long irq); | ||||
Show All 13 Lines |