PC Chipset: Improve serial divisor calculation
commit0147883450fe84bb8de2d4a58381881f4262ce9b
authorCalvin Lee <cyrus296@gmail.com>
Sat, 12 May 2018 00:05:44 +0000 (11 18:05 -0600)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 16 Jul 2018 14:58:16 +0000 (16 16:58 +0200)
tree45adbaf4658801b2dedb51eb10784ec9c8553361
parent9ee8a692f1da77d798842fdc1e0dc2a5ff0fc0c1
PC Chipset: Improve serial divisor calculation

This fixes several problems I found in the UART serial implementation.
Now all divisor values are allowed, while before divisor values of zero
and below the base baud rate were rejected. All changes are in reference
to http://www.sci.muni.cz/docs/pc/serport.txt

Signed-off-by: Calvin Lee <cyrus296@gmail.com>
Message-Id: <20180512000545.966-2-cyrus296@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/char/serial.c