Home | History | Annotate | Line # | Download | only in include
intrdefs.h revision 1.22
      1  1.22    nonaka /*	$NetBSD: intrdefs.h,v 1.22 2019/02/15 08:54:01 nonaka 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.22    nonaka #define LIR_HV		29
     31   1.1      fvdl 
     32   1.9        ad /*
     33   1.9        ad  * XXX These should be lowest numbered, but right now would
     34   1.9        ad  * conflict with the legacy IRQs.  Their current position
     35   1.9        ad  * means that soft interrupt take priority over hardware
     36   1.9        ad  * interrupts when lowering the priority level!
     37   1.9        ad  */
     38  1.22    nonaka #define	SIR_SERIAL	28
     39  1.22    nonaka #define	SIR_NET		27
     40  1.22    nonaka #define	SIR_BIO		26
     41  1.22    nonaka #define	SIR_CLOCK	25
     42  1.22    nonaka #define	SIR_PREEMPT	24
     43   1.1      fvdl 
     44   1.1      fvdl /*
     45   1.1      fvdl  * Maximum # of interrupt sources per CPU. 32 to fit in one word.
     46   1.1      fvdl  * ioapics can theoretically produce more, but it's not likely to
     47   1.1      fvdl  * happen. For multiple ioapics, things can be routed to different
     48   1.1      fvdl  * CPUs.
     49   1.1      fvdl  */
     50   1.1      fvdl #define MAX_INTR_SOURCES	32
     51   1.1      fvdl #define NUM_LEGACY_IRQS		16
     52   1.1      fvdl 
     53   1.1      fvdl /*
     54   1.1      fvdl  * Low and high boundaries between which interrupt gates will
     55   1.1      fvdl  * be allocated in the IDT.
     56   1.1      fvdl  */
     57   1.1      fvdl #define IDT_INTR_LOW	(0x20 + NUM_LEGACY_IRQS)
     58   1.1      fvdl #define IDT_INTR_HIGH	0xef
     59   1.1      fvdl 
     60  1.21    cherry #ifndef XENPV
     61  1.17    cherry 
     62   1.1      fvdl #define X86_IPI_HALT			0x00000001
     63   1.1      fvdl #define X86_IPI_MICROSET		0x00000002
     64  1.20     rmind #define X86_IPI_GENERIC			0x00000004
     65  1.19  christos #define X86_IPI_SYNCH_FPU		0x00000008
     66   1.9        ad #define X86_IPI_MTRR			0x00000010
     67   1.9        ad #define X86_IPI_GDT			0x00000020
     68  1.16     rmind #define X86_IPI_XCALL			0x00000040
     69  1.12     joerg #define X86_IPI_ACPI_CPU_SLEEP		0x00000080
     70  1.13        ad #define X86_IPI_KPREEMPT		0x00000100
     71   1.1      fvdl 
     72  1.13        ad #define X86_NIPI		9
     73   1.1      fvdl 
     74  1.20     rmind #define X86_IPI_NAMES { "halt IPI", "timeset IPI", "generic IPI", \
     75   1.9        ad 			 "FPU synch IPI", "MTRR update IPI", \
     76  1.16     rmind 			 "GDT update IPI", "xcall IPI", \
     77  1.13        ad 			 "ACPI CPU sleep IPI", "kpreempt IPI" }
     78  1.21    cherry #endif /* XENPV */
     79   1.2      fvdl 
     80   1.2      fvdl #define IREENT_MAGIC	0x18041969
     81   1.1      fvdl 
     82   1.4      yamt #endif /* _X86_INTRDEFS_H_ */
     83