Lines 149-154
static int enable_extint;
Link Here
|
149 |
SYSCTL_INT(_hw_apic, OID_AUTO, enable_extint, CTLFLAG_RDTUN, &enable_extint, 0, |
149 |
SYSCTL_INT(_hw_apic, OID_AUTO, enable_extint, CTLFLAG_RDTUN, &enable_extint, 0, |
150 |
"Enable the ExtINT pin in the first I/O APIC"); |
150 |
"Enable the ExtINT pin in the first I/O APIC"); |
151 |
|
151 |
|
|
|
152 |
static u_int stuck_irq; |
153 |
SYSCTL_INT(_hw_apic, OID_AUTO, stuck_irq, CTLFLAG_RWTUN, &stuck_irq, 0, |
154 |
"Make this interrupt appear to constantly fire after " |
155 |
"it fires for the first time"); |
156 |
|
152 |
static void |
157 |
static void |
153 |
_ioapic_eoi_source(struct intsrc *isrc, int locked) |
158 |
_ioapic_eoi_source(struct intsrc *isrc, int locked) |
154 |
{ |
159 |
{ |
Lines 157-169
_ioapic_eoi_source(struct intsrc *isrc, int locked
Link Here
|
157 |
volatile uint32_t *apic_eoi; |
162 |
volatile uint32_t *apic_eoi; |
158 |
uint32_t low1; |
163 |
uint32_t low1; |
159 |
|
164 |
|
|
|
165 |
src = (struct ioapic_intsrc *)isrc; |
166 |
io = (struct ioapic *)isrc->is_pic; |
167 |
|
160 |
lapic_eoi(); |
168 |
lapic_eoi(); |
|
|
169 |
|
170 |
if (src->io_irq == stuck_irq) { |
171 |
/* |
172 |
* Virtually re-raise the interrupt using |
173 |
* IRQ Pin Assertion Register (0x20) |
174 |
* after EOI-ing it. |
175 |
*/ |
176 |
volatile uint32_t *apic_irq_assert; |
177 |
|
178 |
apic_irq_assert = (volatile uint32_t *) |
179 |
((volatile char *)io->io_addr + 0x20); |
180 |
*apic_irq_assert = src->io_intpin; |
181 |
} |
182 |
|
161 |
if (!lapic_eoi_suppression) |
183 |
if (!lapic_eoi_suppression) |
162 |
return; |
184 |
return; |
163 |
src = (struct ioapic_intsrc *)isrc; |
185 |
|
164 |
if (src->io_edgetrigger) |
186 |
if (src->io_edgetrigger) |
165 |
return; |
187 |
return; |
166 |
io = (struct ioapic *)isrc->is_pic; |
|
|
167 |
|
188 |
|
168 |
/* |
189 |
/* |
169 |
* Handle targeted EOI for level-triggered pins, if broadcast |
190 |
* Handle targeted EOI for level-triggered pins, if broadcast |
Lines 270-275
ioapic_enable_source(struct intsrc *isrc)
Link Here
|
270 |
intpin->io_masked = 0; |
291 |
intpin->io_masked = 0; |
271 |
} |
292 |
} |
272 |
mtx_unlock_spin(&icu_lock); |
293 |
mtx_unlock_spin(&icu_lock); |
|
|
294 |
|
295 |
if (intpin->io_irq == stuck_irq) { |
296 |
/* |
297 |
* Virtually re-raise the interrupt using |
298 |
* IRQ Pin Assertion Register (0x20) |
299 |
* after unmasking it. |
300 |
*/ |
301 |
volatile uint32_t *apic_irq_assert; |
302 |
|
303 |
apic_irq_assert = (volatile uint32_t *) |
304 |
((volatile char *)io->io_addr + 0x20); |
305 |
*apic_irq_assert = intpin->io_intpin; |
306 |
} |
273 |
} |
307 |
} |
274 |
|
308 |
|
275 |
static void |
309 |
static void |