uart; interrupt driven receive doesn't work
Posted: Sun Jan 08, 2023 1:12 pm
Previously I set the serial console (com0) in my bootloader and "kernel" to log messages there. In PM I'm using poll_uart_write to poll write to the port. Initialization was done by early_uart_init.
All works as expected, client can see the output. Printing is done by printk() which relies on cputc() which is just navigating/writing in memory starting at 0xb8000. If serial console is enabled data is written via above mentioned poll_uart_write().
I was playing around with the interrupt driven receive as next step. I've uart_init that sets "Received Data Available Interrupt" in IER, sets the proper ISR for irq4 and enables it.
This works just fine in qemu. On real HW nothing is happening. According to my stats no interrupt is requested for irq4. PIC's IMR is set properly. Other IRQs work fine (time,kbd).
I thought maybe there's a problem that I'm using poll write and interrupt to read. Tests I did show it's not true.
Cables I'm using are ok (tested on the test HW with actual OS).
I must be missing something ..
All works as expected, client can see the output. Printing is done by printk() which relies on cputc() which is just navigating/writing in memory starting at 0xb8000. If serial console is enabled data is written via above mentioned poll_uart_write().
I was playing around with the interrupt driven receive as next step. I've uart_init that sets "Received Data Available Interrupt" in IER, sets the proper ISR for irq4 and enables it.
This works just fine in qemu. On real HW nothing is happening. According to my stats no interrupt is requested for irq4. PIC's IMR is set properly. Other IRQs work fine (time,kbd).
I thought maybe there's a problem that I'm using poll write and interrupt to read. Tests I did show it's not true.
Cables I'm using are ok (tested on the test HW with actual OS).
I must be missing something ..