summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bhyve/pmtmr.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC 259826,259997,259998:jhb2014-01-231-9/+4
| | | | | | | | | | | | | | | | | Support soft power-off via the ACPI S5 state for bhyve guests and wire up a virtual power button to SIGTERM: - Implement the PM1_EVT and PM1_CTL registers required by ACPI. - Emulate the Reset Control register at I/O port 0xcf9. - Advertise an _S5 package. - Implement an SMI_CMD register with commands to enable and disable ACPI. Currently the only change when ACPI is enabled is to enable the virtual power button via SIGTERM. - Implement a fixed-feature power button when ACPI is enabled by asserting PWRBTN_STS in PM1_EVT when SIGTERM is received. - Add support for EVFILT_SIGNAL events to mevent. - Implement support for the ACPI system command interrupt (SCI) and assert it when needed based on the values in PM1_EVT. Mark the SCI as active-low and level triggered in the MADT and MP Table.
* Unsynchronized TSCs on the host require special handling in bhyve:neel2013-04-101-14/+87
| | | | | | | | | | | | - use clock_gettime(2) as the time base for the emulated ACPI timer instead of directly using rdtsc(). - don't advertise the invariant TSC capability to the guest to discourage it from using the TSC as its time base. Discussed with: jhb@ (about making 'smp_tsc' a global) Reported by: Dan Mack on freebsd-virtualization@ Obtained from: NetApp
* Use the correct type (uint64_t) to retrieve sysctl machdep.tsc_freq.neel2013-01-251-5/+2
| | | | | | | | Simplify the function a bit by falling through after initialization and return via the normal code path. Reviewed by: grehan Obtained from: NetApp
* Use 64-bit arithmetic throughout, and lock accesses to globals.grehan2013-01-071-6/+13
| | | | | | | | With this change, dbench with >= 4 processes runs without getting weird jumps forward in time when the APCI pmtimer is the default timecounter. Obtained from: NetApp
* ACPI support for bhyve.grehan2012-11-201-0/+101
The -A option will create the minimal set of required ACPI tables in guest memory. Since ACPI mandates an IOAPIC, the -I option must also be used. Template ASL files are created, and then passed to the iasl compiler to generate AML files. These are then loaded into guest physical mem. In support of this, the ACPI PM timer is implemented, in 32-bit mode. Tested on 7.4/8.*/9.*/10-CURRENT. Reviewed by: neel Obtained from: NetApp Discussed with: jhb (a long while back)
OpenPOWER on IntegriCloud