Dirty hack for serial I/O on Ron's AMD
authorBarret Rhoden <brho@cs.berkeley.edu>
Sun, 8 Dec 2013 23:29:08 +0000 (15:29 -0800)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 16 Jan 2014 21:07:51 +0000 (13:07 -0800)
Hopefully this will go away very soon.  We're not getting serial IRQs,
so we poll whenever another IRQ (timer) goes off.

kern/arch/x86/trap.c

index 34cba80..ef408eb 100644 (file)
@@ -485,6 +485,16 @@ void handle_irq(struct hw_trapframe *hw_tf)
                irq_h->isr(hw_tf, irq_h->data);
                irq_h = irq_h->next;
        }
+
+       //lapic_print_isr();
+       //printk("LAPIC LINT0: %p\n", read_mmreg32(LAPIC_LVT_LINT0));
+       //printk("COM1, IIR %p\n", inb(0x3f8 + 2));
+       irq_h = irq_handlers[4 + 32];
+       while (irq_h) {
+               irq_h->isr(hw_tf, irq_h->data);
+               irq_h = irq_h->next;
+       }
+
        // if we're a general purpose IPI function call, down the cpu_list
        extern handler_wrapper_t handler_wrappers[NUM_HANDLER_WRAPPERS];
        if ((I_SMP_CALL0 <= hw_tf->tf_trapno) &&