vmm_arm: uart device model needs to take all chars

When receiving a terminal signal, the uart device model has to
take all characters out of the stream. Otherwise, characters
might never arrive at the VM. This was not recognized before,
because it was used with a quite slow UART only, which obviously
never achieved to send more characters at once.

Ref #3278
This commit is contained in:
Stefan Kalkowski 2019-04-04 16:38:28 +02:00 committed by Christian Helmuth
parent 94881e757a
commit 0a470e66f2

View File

@ -1185,9 +1185,11 @@ class Vmm
{
if (!_terminal.avail()) return;
unsigned char c = 0;
_terminal.read(&c, 1);
_rx_buf.add(c);
while (_terminal.avail()) {
unsigned char c = 0;
_terminal.read(&c, 1);
_rx_buf.add(c);
}
_gic.inject_irq(Board::PL011_0_IRQ);
_ris |= 1 << 4;