Page MenuHomeFreeBSD

vmm: Normalize a zero PIT count before starting channel 0
ClosedPublic

Authored by hayzam_gmail.com on Thu, Sep 17, 12:08 AM.
Tags
None
Referenced Files
F173058667: D59749.id186927.diff
Wed, Sep 23, 6:15 AM
F173058128: D59749.id186927.diff
Wed, Sep 23, 6:09 AM
F173057788: D59749.id187342.diff
Wed, Sep 23, 6:03 AM
F173055722: D59749.diff
Wed, Sep 23, 5:34 AM
Unknown Object (File)
Tue, Sep 22, 1:56 PM
Unknown Object (File)
Tue, Sep 22, 10:51 AM
Unknown Object (File)
Tue, Sep 22, 8:42 AM
Unknown Object (File)
Tue, Sep 22, 3:10 AM
Subscribers

Details

Summary

pit_timer_start_cntr0() does not schedule a callout when the initial
count is zero. The counter write handler normalizes a programmed zero
count only after calling it, leaving an initially unarmed channel 0
without a scheduled timer event.

Move the existing normalization before the timer-start call. Retain the
historical 0xffff representation of a zero count.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77006
Build 73889: arc lint + arc unit

Event Timeline

How did you notice the problem?

This revision is now accepted and ready to land.Thu, Sep 17, 1:48 PM

How did you notice the problem?

The symptom was a legacy guest hanging at the BIOS screen with its tick frozen while I was bringing up CSMWrap (https://github.com/CSMWrap/CSMWrap) on bhyve. I traced that back to SeaBIOS programming the PIT with a zero count for the normal ~18 Hz tick, which led me to this code.