8254 timer woes
Simon 'corecode' Schubert
corecode at fs.ei.tum.de
Mon Aug 30 17:54:14 PDT 2004
Hey,
I'm wondering... did we yet find a way to prevent bios calls from
trashing our timer? Currently XOrg is freezing my machine (VIA EPIA
M10k) when via_drv init reads the VBE EDID. Sure, I could just disable
that, but a more clean solution would be to fix this situation.
Short info what happens: system freezes (a little bit) delayed (at
least so it seems) when XOrg/via_drv/vbe calls int
0x10/ax=0x4f15/bx=0x01/cx=0x0. I disassembled bits of the VGA BIOS (VGA
is a integrated VIA CLE266 unichrome chipset), and it does, besides
spooky register handling, set i8254 time counter 2 to divisor 0x4a9,
i.e. 1kHz (if I'm not wrong) and then busy loops for a certain time.
Freezing my system means: nothing works any more, I can only break to
ddb (if I'm lucky). Time freezes (for DragonFly): nanouptime() always
reports the same. calling timer_restore() from ddb/gdb fixes
everything: X starts as desired and system works again.
Problem here is that the system completely freezes and not "just" has
funny time. The cause of this is that the VGA BIOS (card is an
integrated VIA CLE266 unichrome) disables the timer 2 gate. A
hackaround for me would be to (unconditionally) set the gate bit in
cputimer_count(), but that can't be the real solution.
Is is possible to fault on special port IO so that we can prevent
legacy BIOS/programs to destroy our timing?
cheers
simon
--
/"\
\ /
\ ASCII Ribbon Campaign
/ \ Against HTML Mail and News
Attachment:
PGP.sig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00006.pgp
Type: application/octet-stream
Size: 186 bytes
Desc: "Description: This is a digitally signed message part"
URL: <http://lists.dragonflybsd.org/pipermail/bugs/attachments/20040830/2df641d4/attachment-0021.obj>
More information about the Bugs
mailing list