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.
25 lines
594 B
Makefile
25 lines
594 B
Makefile
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PROG= bhyve
|
|
|
|
DEBUG_FLAGS= -g -O0
|
|
|
|
MAN= bhyve.8
|
|
SRCS= acpi.c atpic.c bhyverun.c block_if.c consport.c dbgport.c elcr.c
|
|
SRCS+= inout.c legacy_irq.c mem.c mevent.c mptbl.c pci_ahci.c
|
|
SRCS+= pci_emul.c pci_hostbridge.c pci_lpc.c pci_passthru.c pci_virtio_block.c
|
|
SRCS+= pci_virtio_net.c pci_uart.c pit_8254.c pm.c pmtmr.c post.c rtc.c
|
|
SRCS+= uart_emul.c virtio.c xmsr.c spinup_ap.c
|
|
|
|
.PATH: ${.CURDIR}/../../sys/amd64/vmm
|
|
SRCS+= vmm_instruction_emul.c
|
|
|
|
DPADD= ${LIBVMMAPI} ${LIBMD} ${LIBUTIL} ${LIBPTHREAD}
|
|
LDADD= -lvmmapi -lmd -lutil -lpthread
|
|
|
|
WARNS?= 2
|
|
|
|
.include <bsd.prog.mk>
|