aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRoman Bolshakov <r.bolshakov@yadro.com>2020-06-26 21:06:58 +0300
committerKevin O'Connor <kevin@koconnor.net>2020-06-26 14:18:23 -0400
commit88ab0c15525ced2eefe39220742efe4769089ad8 (patch)
treeeac2b70a3b1575c0739be723449bce1f1403b360 /scripts
parentd11c75185276ded944f2ea0277532b7fee849bbc (diff)
downloadseabios-hppa-88ab0c15525ced2eefe39220742efe4769089ad8.zip
seabios-hppa-88ab0c15525ced2eefe39220742efe4769089ad8.tar.gz
seabios-hppa-88ab0c15525ced2eefe39220742efe4769089ad8.tar.bz2
timer: Handle decrements of PIT counter
There's a fallback to PIT if TSC is not present but it doesn't work properly. It prevents boot from floppy on isapc and 486 cpu [1][2]. SeaBIOS configures PIT in Mode 2. PIT counter is decremented in the mode but timer_adjust_bits() thinks that the counter overflows and increases 32-bit tick counter on each detected "overflow". Invalid overflow detection results in 55ms time advance (1 / 18.2Hz) on each read from PIT counter. So all timers expire much faster and 5-second floppy timeout expires in 83 real microseconds (or just a bit longer). It can be fixed by making the counter recieved from PIT an increasing value so it can be passed to timer_adjust_bits(): 0, 1, 2 and up to 65535 and then the counter is re-loaded with 0. 1. https://bugs.launchpad.net/seabios/+bug/1840719 2. https://lists.gnu.org/archive/html/qemu-devel/2019-08/msg03924.html Fixes: eac11944019 ("Unify pmtimer_read() and pittimer_read() code.") Reported-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions