irq_vectors.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * This file should contain #defines for all of the interrupt vector
  3. * numbers used by this architecture.
  4. *
  5. * In addition, there are some standard defines:
  6. *
  7. * FIRST_EXTERNAL_VECTOR:
  8. * The first free place for external interrupts
  9. *
  10. * SYSCALL_VECTOR:
  11. * The IRQ vector a syscall makes the user to kernel transition
  12. * under.
  13. *
  14. * TIMER_IRQ:
  15. * The IRQ number the timer interrupt comes in at.
  16. *
  17. * NR_IRQS:
  18. * The total number of interrupt vectors (including all the
  19. * architecture specific interrupts) needed.
  20. *
  21. */
  22. #ifndef _ASM_IRQ_VECTORS_H
  23. #define _ASM_IRQ_VECTORS_H
  24. /*
  25. * IDT vectors usable for external interrupt sources start
  26. * at 0x20:
  27. */
  28. #define FIRST_EXTERNAL_VECTOR 0x20
  29. #define SYSCALL_VECTOR 0x80
  30. /*
  31. * Vectors 0x20-0x2f are used for ISA interrupts.
  32. */
  33. /*
  34. * Special IRQ vectors used by the SMP architecture, 0xf0-0xff
  35. *
  36. * some of the following vectors are 'rare', they are merged
  37. * into a single vector (CALL_FUNCTION_VECTOR) to save vector space.
  38. * TLB, reschedule and local APIC vectors are performance-critical.
  39. *
  40. * Vectors 0xf0-0xfa are free (reserved for future Linux use).
  41. */
  42. #define SPURIOUS_APIC_VECTOR 0xff
  43. #define ERROR_APIC_VECTOR 0xfe
  44. #define INVALIDATE_TLB_VECTOR 0xfd
  45. #define RESCHEDULE_VECTOR 0xfc
  46. #define CALL_FUNCTION_VECTOR 0xfb
  47. #define CALL_FUNCTION_SINGLE_VECTOR 0xfa
  48. #define THERMAL_APIC_VECTOR 0xf0
  49. /*
  50. * Local APIC timer IRQ vector is on a different priority level,
  51. * to work around the 'lost local interrupt if more than 2 IRQ
  52. * sources per level' errata.
  53. */
  54. #define LOCAL_TIMER_VECTOR 0xef
  55. /*
  56. * First APIC vector available to drivers: (vectors 0x30-0xee)
  57. * we start at 0x31 to spread out vectors evenly between priority
  58. * levels. (0x80 is the syscall vector)
  59. */
  60. #define FIRST_DEVICE_VECTOR 0x31
  61. #define FIRST_SYSTEM_VECTOR 0xef
  62. #define TIMER_IRQ 0
  63. /*
  64. * 16 8259A IRQ's, 208 potential APIC interrupt sources.
  65. * Right now the APIC is mostly only used for SMP.
  66. * 256 vectors is an architectural limit. (we can have
  67. * more than 256 devices theoretically, but they will
  68. * have to use shared interrupts)
  69. * Since vectors 0x00-0x1f are used/reserved for the CPU,
  70. * the usable vector space is 0x20-0xff (224 vectors)
  71. */
  72. /*
  73. * The maximum number of vectors supported by i386 processors
  74. * is limited to 256. For processors other than i386, NR_VECTORS
  75. * should be changed accordingly.
  76. */
  77. #define NR_VECTORS 256
  78. #include "irq_vectors_limits.h"
  79. #define FPU_IRQ 13
  80. #define FIRST_VM86_IRQ 3
  81. #define LAST_VM86_IRQ 15
  82. #define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15)
  83. #endif /* _ASM_IRQ_VECTORS_H */