Changeset f6cf76f in mainline
- Timestamp:
- 2019-04-05T18:30:19Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 29beac8
- Parents:
- f4bb404
- Location:
- kernel
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/arch/interrupt.h
rf4bb404 rf6cf76f 61 61 /* NS16550 at COM1 */ 62 62 #define IRQ_NS16550 4 63 #define IRQ_PIC _SPUR763 #define IRQ_PIC0_SPUR 7 64 64 #define IRQ_MOUSE 12 65 #define IRQ_PIC1_SPUR 15 65 66 66 67 /* This one must have four least significant bits set to ones */ … … 77 78 #define VECTOR_PF (IVT_EXCBASE + EXC_PF) 78 79 #define VECTOR_CLK (IVT_IRQBASE + IRQ_CLK) 79 #define VECTOR_PIC_SPUR (IVT_IRQBASE + IRQ_PIC_SPUR) 80 #define VECTOR_PIC0_SPUR (IVT_IRQBASE + IRQ_PIC0_SPUR) 81 #define VECTOR_PIC1_SPUR (IVT_IRQBASE + IRQ_PIC1_SPUR) 80 82 #define VECTOR_SYSCALL IVT_FREEBASE 81 83 #define VECTOR_TLB_SHOOTDOWN_IPI (IVT_FREEBASE + 1) -
kernel/arch/amd64/src/interrupt.c
rf4bb404 rf6cf76f 172 172 bool ack = false; 173 173 assert(inum < IRQ_COUNT); 174 assert((inum != IRQ_PIC_SPUR) && (inum != IRQ_PIC1)); 174 assert(inum != IRQ_PIC0_SPUR); 175 assert(inum != IRQ_PIC1_SPUR); 176 assert(inum != IRQ_PIC1); 175 177 176 178 irq_t *irq = irq_dispatch_and_lock(inum); … … 201 203 } 202 204 205 static void pic_spurious(unsigned int n, istate_t *istate) 206 { 207 /* 208 * XXX: Examine ISR to figure out whether this is indeed a spurious 209 * or actual IRQ. 210 */ 211 #ifdef CONFIG_DEBUG 212 log(LF_ARCH, LVL_DEBUG, "cpu%u: PIC spurious interrupt", CPU->id); 213 #endif 214 } 215 203 216 void interrupt_init(void) 204 217 { … … 209 222 210 223 for (i = 0; i < IRQ_COUNT; i++) { 211 if ((i != IRQ_PIC_SPUR) && (i != IRQ_PIC1)) 224 if ((i != IRQ_PIC0_SPUR) && (i != IRQ_PIC1_SPUR) 225 && (i != IRQ_PIC1)) 212 226 exc_register(IVT_IRQBASE + i, "irq", true, 213 227 (iroutine_t) irq_interrupt); … … 218 232 exc_register(VECTOR_SS, "ss_fault", true, (iroutine_t) ss_fault); 219 233 exc_register(VECTOR_GP, "gp_fault", true, (iroutine_t) gp_fault); 234 exc_register(VECTOR_PIC0_SPUR, "pic0_spurious", true, 235 (iroutine_t) pic_spurious); 236 exc_register(VECTOR_PIC1_SPUR, "pic1_spurious", true, 237 (iroutine_t) pic_spurious); 220 238 221 239 #ifdef CONFIG_SMP -
kernel/arch/ia32/include/arch/interrupt.h
rf4bb404 rf6cf76f 63 63 /* NS16550 at COM1 */ 64 64 #define IRQ_NS16550 4 65 #define IRQ_PIC _SPUR765 #define IRQ_PIC0_SPUR 7 66 66 #define IRQ_MOUSE 12 67 #define IRQ_PIC1_SPUR 15 67 68 68 69 /* This one must have four least significant bits set to ones */ … … 81 82 #define VECTOR_XM (IVT_EXCBASE + EXC_XM) 82 83 #define VECTOR_CLK (IVT_IRQBASE + IRQ_CLK) 83 #define VECTOR_PIC_SPUR (IVT_IRQBASE + IRQ_PIC_SPUR) 84 #define VECTOR_PIC0_SPUR (IVT_IRQBASE + IRQ_PIC0_SPUR) 85 #define VECTOR_PIC1_SPUR (IVT_IRQBASE + IRQ_PIC1_SPUR) 84 86 #define VECTOR_SYSCALL IVT_FREEBASE 85 87 #define VECTOR_TLB_SHOOTDOWN_IPI (IVT_FREEBASE + 1) -
kernel/arch/ia32/src/interrupt.c
rf4bb404 rf6cf76f 192 192 bool ack = false; 193 193 assert(inum < IRQ_COUNT); 194 assert((inum != IRQ_PIC_SPUR) && (inum != IRQ_PIC1)); 194 assert(inum != IRQ_PIC0_SPUR); 195 assert(inum != IRQ_PIC1_SPUR); 196 assert(inum != IRQ_PIC1); 195 197 196 198 irq_t *irq = irq_dispatch_and_lock(inum); … … 220 222 } 221 223 224 static void pic_spurious(unsigned int n, istate_t *istate) 225 { 226 /* 227 * XXX: Examine ISR to figure out whether this is indeed a spurious 228 * or actual IRQ. 229 */ 230 #ifdef CONFIG_DEBUG 231 log(LF_ARCH, LVL_DEBUG, "cpu%u: PIC spurious interrupt", CPU->id); 232 #endif 233 } 234 222 235 void interrupt_init(void) 223 236 { … … 228 241 229 242 for (i = 0; i < IRQ_COUNT; i++) { 230 if ((i != IRQ_PIC_SPUR) && (i != IRQ_PIC1)) 243 if ((i != IRQ_PIC0_SPUR) && (i != IRQ_PIC1_SPUR) && 244 (i != IRQ_PIC1)) 231 245 exc_register(IVT_IRQBASE + i, "irq", true, 232 246 (iroutine_t) irq_interrupt); … … 239 253 exc_register(VECTOR_GP, "gp_fault", true, (iroutine_t) gp_fault); 240 254 exc_register(VECTOR_XM, "simd_fp", true, (iroutine_t) simd_fp_exception); 255 exc_register(VECTOR_PIC0_SPUR, "pic0_spurious", true, 256 (iroutine_t) pic_spurious); 257 exc_register(VECTOR_PIC1_SPUR, "pic1_spurious", true, 258 (iroutine_t) pic_spurious); 241 259 242 260 #ifdef CONFIG_SMP -
kernel/arch/mips32/include/arch/mach/malta/malta.h
rf4bb404 rf6cf76f 45 45 46 46 #define PIC0_BASE (MALTA_PCI_BASE + 0x20) 47 #define PIC0_SPURIOUS_IRQ 7 47 48 #define PIC1_BASE (MALTA_PCI_BASE + 0xa0) 49 #define PIC1_SPURIOUS_IRQ 15 48 50 49 51 #define ISA_IRQ_COUNT 16 -
kernel/arch/mips32/src/mach/malta/malta.c
rf4bb404 rf6cf76f 74 74 { 75 75 uint8_t isa_irq = host2uint32_t_le(pio_read_32(GT64120_PCI0_INTACK)); 76 if (isa_irq == PIC0_SPURIOUS_IRQ || isa_irq == PIC1_SPURIOUS_IRQ) { 77 /* 78 * XXX: Examine ISR to figure out whether this is indeed a 79 * spurious or actual IRQ. 80 */ 81 #ifdef CONFIG_DEBUG 82 log(LF_ARCH, LVL_DEBUG, "cpu%u: PIC spurious interrupt", 83 CPU->id); 84 return; 85 #endif 86 } 76 87 irq_t *irq = irq_dispatch_and_lock(isa_irq); 77 88 if (irq) { -
kernel/genarch/src/drivers/i8259/i8259.c
rf4bb404 rf6cf76f 43 43 #include <interrupt.h> 44 44 45 static void pic_spurious(unsigned int n, istate_t *istate);46 47 45 // XXX: need to change pic_* API to get rid of these 48 46 static i8259_t *saved_pic0; … … 78 76 /* ICW4: i8086 mode */ 79 77 pio_write_8(&pic1->port2, 1); 80 81 /*82 * Register interrupt handler for the PIC spurious interrupt.83 *84 * XXX: This is currently broken. Both IRQ 7 and IRQ 15 can be spurious85 * or can be actual interrupts. This needs to be detected when86 * the interrupt happens by inspecting ISR.87 */88 exc_register(irq0_int + 7, "pic_spurious", false,89 (iroutine_t) pic_spurious);90 78 91 79 pic_disable_irqs(0xffff); /* disable all irq's */ … … 130 118 } 131 119 132 void pic_spurious(unsigned int n __attribute__((unused)), istate_t *istate __attribute__((unused)))133 {134 #ifdef CONFIG_DEBUG135 log(LF_ARCH, LVL_DEBUG, "cpu%u: PIC spurious interrupt", CPU->id);136 #endif137 }138 139 120 /** @} 140 121 */
Note:
See TracChangeset
for help on using the changeset viewer.