Home | History | Annotate | Line # | Download | only in include
intrdefs.h revision 1.17
      1  1.17  cherry /*	$NetBSD: intrdefs.h,v 1.17 2011/11/06 11:40:47 cherry Exp $	*/
      2   1.1    fvdl 
      3   1.4    yamt #ifndef _X86_INTRDEFS_H_
      4   1.4    yamt #define _X86_INTRDEFS_H_
      5   1.1    fvdl 
      6  1.11      ad /* Interrupt priority levels. */
      7   1.1    fvdl #define	IPL_NONE	0x0	/* nothing */
      8  1.13      ad #define	IPL_PREEMPT	0x1	/* fake, to prevent recursive preemptions */
      9  1.13      ad #define	IPL_SOFTCLOCK	0x2	/* timeouts */
     10  1.13      ad #define	IPL_SOFTBIO	0x3	/* block I/O passdown */
     11  1.13      ad #define	IPL_SOFTNET	0x4	/* protocol stacks */
     12  1.13      ad #define	IPL_SOFTSERIAL	0x5	/* serial passdown */
     13  1.13      ad #define	IPL_VM		0x6	/* low I/O, memory allocation */
     14  1.13      ad #define IPL_SCHED	0x7	/* medium I/O, scheduler, clock */
     15  1.13      ad #define	IPL_HIGH	0x8	/* high I/O, statclock, IPIs */
     16  1.13      ad #define	NIPL		9
     17   1.1    fvdl 
     18   1.1    fvdl /* Interrupt sharing types. */
     19   1.1    fvdl #define	IST_NONE	0	/* none */
     20   1.1    fvdl #define	IST_PULSE	1	/* pulsed */
     21   1.1    fvdl #define	IST_EDGE	2	/* edge-triggered */
     22   1.1    fvdl #define	IST_LEVEL	3	/* level-triggered */
     23   1.1    fvdl 
     24   1.1    fvdl /*
     25   1.9      ad  * Local APIC masks and software interrupt masks, in order
     26   1.9      ad  * of priority.  Must not conflict with SIR_* below.
     27   1.1    fvdl  */
     28   1.1    fvdl #define LIR_IPI		31
     29   1.1    fvdl #define LIR_TIMER	30
     30   1.1    fvdl 
     31   1.9      ad /*
     32   1.9      ad  * XXX These should be lowest numbered, but right now would
     33   1.9      ad  * conflict with the legacy IRQs.  Their current position
     34   1.9      ad  * means that soft interrupt take priority over hardware
     35   1.9      ad  * interrupts when lowering the priority level!
     36   1.9      ad  */
     37   1.9      ad #define	SIR_SERIAL	29
     38   1.1    fvdl #define	SIR_NET		28
     39   1.9      ad #define	SIR_BIO		27
     40   1.9      ad #define	SIR_CLOCK	26
     41  1.13      ad #define	SIR_PREEMPT	25
     42   1.1    fvdl 
     43   1.1    fvdl /*
     44   1.1    fvdl  * Maximum # of interrupt sources per CPU. 32 to fit in one word.
     45   1.1    fvdl  * ioapics can theoretically produce more, but it's not likely to
     46   1.1    fvdl  * happen. For multiple ioapics, things can be routed to different
     47   1.1    fvdl  * CPUs.
     48   1.1    fvdl  */
     49   1.1    fvdl #define MAX_INTR_SOURCES	32
     50   1.1    fvdl #define NUM_LEGACY_IRQS		16
     51   1.1    fvdl 
     52   1.1    fvdl /*
     53   1.1    fvdl  * Low and high boundaries between which interrupt gates will
     54   1.1    fvdl  * be allocated in the IDT.
     55   1.1    fvdl  */
     56   1.1    fvdl #define IDT_INTR_LOW	(0x20 + NUM_LEGACY_IRQS)
     57   1.1    fvdl #define IDT_INTR_HIGH	0xef
     58   1.1    fvdl 
     59  1.17  cherry #ifndef XEN
     60  1.17  cherry 
     61   1.1    fvdl #define X86_IPI_HALT			0x00000001
     62   1.1    fvdl #define X86_IPI_MICROSET		0x00000002
     63  1.15   rmind #define X86_IPI__UNUSED1		0x00000004
     64   1.1    fvdl #define X86_IPI_SYNCH_FPU		0x00000008
     65   1.9      ad #define X86_IPI_MTRR			0x00000010
     66   1.9      ad #define X86_IPI_GDT			0x00000020
     67  1.16   rmind #define X86_IPI_XCALL			0x00000040
     68  1.12   joerg #define X86_IPI_ACPI_CPU_SLEEP		0x00000080
     69  1.13      ad #define X86_IPI_KPREEMPT		0x00000100
     70   1.1    fvdl 
     71  1.13      ad #define X86_NIPI		9
     72   1.1    fvdl 
     73  1.14      ad #define X86_IPI_NAMES { "halt IPI", "timeset IPI", "unused", \
     74   1.9      ad 			 "FPU synch IPI", "MTRR update IPI", \
     75  1.16   rmind 			 "GDT update IPI", "xcall IPI", \
     76  1.13      ad 			 "ACPI CPU sleep IPI", "kpreempt IPI" }
     77  1.17  cherry #endif /* XEN */
     78   1.2    fvdl 
     79   1.2    fvdl #define IREENT_MAGIC	0x18041969
     80   1.1    fvdl 
     81   1.4    yamt #endif /* _X86_INTRDEFS_H_ */
     82