arm, dev: pl011 console interactivity

Improve PL011 console interactivity

Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
This commit is contained in:
Bjoern A. Zeeb 2016-10-15 15:11:04 -05:00
parent 976ef444b8
commit 28c84d2886

View file

@ -86,6 +86,11 @@ Pl011::read(PacketPtr pkt)
// Since we don't simulate a FIFO for incoming data, we // Since we don't simulate a FIFO for incoming data, we
// assume it's empty and clear RXINTR and RTINTR. // assume it's empty and clear RXINTR and RTINTR.
clearInterrupts(UART_RXINTR | UART_RTINTR); clearInterrupts(UART_RXINTR | UART_RTINTR);
if (term->dataAvailable()) {
DPRINTF(Uart, "Re-raising interrupt due to more data "
"after UART_DR read\n");
dataAvailable();
}
} }
break; break;
case UART_FR: case UART_FR:
@ -224,6 +229,11 @@ Pl011::write(PacketPtr pkt)
case UART_ICR: case UART_ICR:
DPRINTF(Uart, "Clearing interrupts 0x%x\n", data); DPRINTF(Uart, "Clearing interrupts 0x%x\n", data);
clearInterrupts(data); clearInterrupts(data);
if (term->dataAvailable()) {
DPRINTF(Uart, "Re-raising interrupt due to more data after "
"UART_ICR write\n");
dataAvailable();
}
break; break;
default: default:
panic("Tried to write PL011 at offset %#x that doesn't exist\n", daddr); panic("Tried to write PL011 at offset %#x that doesn't exist\n", daddr);