1 #ifndef __ASM_IO_APIC_H
2 #define __ASM_IO_APIC_H
5 #include <asm/mpspec.h>
8 * Intel IO-APIC support for SMP and UP systems.
10 * Copyright (C) 1997, 1998, 1999, 2000 Ingo Molnar
13 #define APIC_MISMATCH_DEBUG
16 * The structure of the IO-APIC:
18 union IO_APIC_reg_00
{
21 u32 __reserved_2
: 14,
26 } __attribute__ ((packed
)) bits
;
29 union IO_APIC_reg_01
{
37 } __attribute__ ((packed
)) bits
;
40 union IO_APIC_reg_02
{
43 u32 __reserved_2
: 24,
46 } __attribute__ ((packed
)) bits
;
49 union IO_APIC_reg_03
{
54 } __attribute__ ((packed
)) bits
;
58 * # of IO-APICs and # of IRQ routing registers
60 extern int nr_ioapics
;
61 extern int nr_ioapic_registers
[MAX_IO_APICS
];
63 enum ioapic_irq_destination_types
{
74 struct IO_APIC_route_entry
{
76 delivery_mode
: 3, /* 000: FIXED
80 dest_mode
: 1, /* 0: physical, 1: logical */
84 trigger
: 1, /* 0: edge, 1: level */
85 mask
: 1, /* 0: enabled, 1: disabled */
88 __u32 __reserved_3
: 24,
90 } __attribute__ ((packed
));
93 * MP-BIOS irq configuration table structures:
96 /* I/O APIC entries */
97 extern struct mpc_config_ioapic mp_ioapics
[MAX_IO_APICS
];
99 /* # of MP IRQ source entries */
100 extern int mp_irq_entries
;
102 /* MP IRQ source entries */
103 extern struct mpc_config_intsrc mp_irqs
[MAX_IRQ_SOURCES
];
105 /* non-0 if default (table-less) MP configuration */
106 extern int mpc_default_type
;
108 /* 1 if "noapic" boot option passed */
109 extern int skip_ioapic_setup
;
112 * If we use the IO-APIC for IRQ routing, disable automatic
113 * assignment of PCI IRQ's.
115 #define io_apic_assign_pci_irqs (mp_irq_entries && !skip_ioapic_setup && io_apic_irqs)
118 extern int io_apic_get_version (int ioapic
);
119 extern int io_apic_get_redir_entries (int ioapic
);
120 extern int io_apic_set_pci_routing (int ioapic
, int pin
, int irq
, int, int);
123 extern int sis_apic_bug
; /* dummy */
125 void enable_NMI_through_LVT0 (void * dummy
);
127 extern spinlock_t i8259A_lock
;