version 1.67.2.3, 2011/04/21 01:41:32 |
version 1.68, 2010/06/17 06:40:28 |
Line 176 __KERNEL_RCSID(0, "$NetBSD$"); |
|
Line 176 __KERNEL_RCSID(0, "$NetBSD$"); |
|
#include <dev/pci/ppbreg.h> |
#include <dev/pci/ppbreg.h> |
#endif |
#endif |
|
|
#ifdef DDB |
|
#include <ddb/db_output.h> |
|
#endif |
|
|
|
struct pic softintr_pic = { |
struct pic softintr_pic = { |
.pic_name = "softintr_fakepic", |
.pic_name = "softintr_fakepic", |
.pic_type = PIC_SOFT, |
.pic_type = PIC_SOFT, |
Line 222 intr_default_setup(void) |
|
Line 218 intr_default_setup(void) |
|
* Handle a NMI, possibly a machine check. |
* Handle a NMI, possibly a machine check. |
* return true to panic system, false to ignore. |
* return true to panic system, false to ignore. |
*/ |
*/ |
void |
int |
x86_nmi(void) |
x86_nmi(void) |
{ |
{ |
|
|
log(LOG_CRIT, "NMI port 61 %x, port 70 %x\n", inb(0x61), inb(0x70)); |
log(LOG_CRIT, "NMI port 61 %x, port 70 %x\n", inb(0x61), inb(0x70)); |
|
return(0); |
} |
} |
|
|
/* |
/* |
Line 693 intr_establish(int legacy_irq, struct pi |
|
Line 690 intr_establish(int legacy_irq, struct pi |
|
|
|
#ifdef DIAGNOSTIC |
#ifdef DIAGNOSTIC |
if (legacy_irq != -1 && (legacy_irq < 0 || legacy_irq > 15)) |
if (legacy_irq != -1 && (legacy_irq < 0 || legacy_irq > 15)) |
panic("%s: bad legacy IRQ value", __func__); |
panic("intr_establish: bad legacy IRQ value"); |
|
|
if (legacy_irq == -1 && pic == &i8259_pic) |
if (legacy_irq == -1 && pic == &i8259_pic) |
panic("intr_establish: non-legacy IRQ on i8259"); |
panic("intr_establish: non-legacy IRQ on i8259"); |
Line 701 intr_establish(int legacy_irq, struct pi |
|
Line 698 intr_establish(int legacy_irq, struct pi |
|
|
|
ih = kmem_alloc(sizeof(*ih), KM_SLEEP); |
ih = kmem_alloc(sizeof(*ih), KM_SLEEP); |
if (ih == NULL) { |
if (ih == NULL) { |
printf("%s: can't allocate handler info\n", __func__); |
printf("intr_establish: can't allocate handler info\n"); |
return NULL; |
return NULL; |
} |
} |
|
|
Line 721 intr_establish(int legacy_irq, struct pi |
|
Line 718 intr_establish(int legacy_irq, struct pi |
|
source->is_pic->pic_type != pic->pic_type) { |
source->is_pic->pic_type != pic->pic_type) { |
mutex_exit(&cpu_lock); |
mutex_exit(&cpu_lock); |
kmem_free(ih, sizeof(*ih)); |
kmem_free(ih, sizeof(*ih)); |
printf("%s: can't share intr source between " |
printf("intr_establish: can't share intr source between " |
"different PIC types (legacy_irq %d pin %d slot %d)\n", |
"different PIC types (legacy_irq %d pin %d slot %d)\n", |
__func__, legacy_irq, pin, slot); |
legacy_irq, pin, slot); |
return NULL; |
return NULL; |
} |
} |
|
|
Line 744 intr_establish(int legacy_irq, struct pi |
|
Line 741 intr_establish(int legacy_irq, struct pi |
|
mutex_exit(&cpu_lock); |
mutex_exit(&cpu_lock); |
kmem_free(ih, sizeof(*ih)); |
kmem_free(ih, sizeof(*ih)); |
intr_source_free(ci, slot, pic, idt_vec); |
intr_source_free(ci, slot, pic, idt_vec); |
printf("%s: pic %s pin %d: can't share " |
printf("intr_establish: pic %s pin %d: can't share " |
"type %d with %d\n", |
"type %d with %d\n", pic->pic_name, pin, |
__func__, pic->pic_name, pin, |
|
source->is_type, type); |
source->is_type, type); |
return NULL; |
return NULL; |
} |
} |
break; |
break; |
default: |
default: |
panic("%s: bad intr type %d for pic %s pin %d\n", |
panic("intr_establish: bad intr type %d for pic %s pin %d\n", |
__func__, source->is_type, pic->pic_name, pin); |
source->is_type, pic->pic_name, pin); |
/* NOTREACHED */ |
/* NOTREACHED */ |
} |
} |
|
|
Line 859 intr_disestablish_xcall(void *arg1, void |
|
Line 855 intr_disestablish_xcall(void *arg1, void |
|
; |
; |
if (q == NULL) { |
if (q == NULL) { |
x86_write_psl(psl); |
x86_write_psl(psl); |
panic("%s: handler not registered", __func__); |
panic("intr_disestablish: handler not registered"); |
/* NOTREACHED */ |
/* NOTREACHED */ |
} |
} |
|
|
Line 919 intr_string(int ih) |
|
Line 915 intr_string(int ih) |
|
#endif |
#endif |
|
|
if (ih == 0) |
if (ih == 0) |
panic("%s: bogus handle 0x%x", __func__, ih); |
panic("pci_intr_string: bogus handle 0x%x", ih); |
|
|
|
|
#if NIOAPIC > 0 |
#if NIOAPIC > 0 |
Line 1061 cpu_intr_init(struct cpu_info *ci) |
|
Line 1057 cpu_intr_init(struct cpu_info *ci) |
|
} |
} |
|
|
#if defined(INTRDEBUG) || defined(DDB) |
#if defined(INTRDEBUG) || defined(DDB) |
|
|
#ifdef DDB |
|
#define printf db_printf |
|
#endif |
|
|
|
void |
void |
intr_printconfig(void) |
intr_printconfig(void) |
{ |
{ |
Line 1095 intr_printconfig(void) |
|
Line 1086 intr_printconfig(void) |
|
} |
} |
} |
} |
} |
} |
#ifdef DDB |
|
#undef printf |
|
#endif |
|
#endif |
#endif |
|
|
void |
void |