diff options
author | jhb <jhb@FreeBSD.org> | 2014-01-29 13:35:12 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2014-01-29 13:35:12 +0000 |
commit | 647b92bf0a989dc8e99ced34a4fd33e2e1d6dc96 (patch) | |
tree | ddf69a1306e432a02088c43f51d6530a00ac3dec /usr.sbin/bhyve/rtc.c | |
parent | 3e6f6a1694cd4c4265eab094e4a811fc9f1482a2 (diff) | |
download | FreeBSD-src-647b92bf0a989dc8e99ced34a4fd33e2e1d6dc96.zip FreeBSD-src-647b92bf0a989dc8e99ced34a4fd33e2e1d6dc96.tar.gz |
MFC 260206:
Rework the DSDT generation code a bit to generate more accurate info about
LPC devices. Among other things, the LPC serial ports now appear as
ACPI devices.
Diffstat (limited to 'usr.sbin/bhyve/rtc.c')
-rw-r--r-- | usr.sbin/bhyve/rtc.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/usr.sbin/bhyve/rtc.c b/usr.sbin/bhyve/rtc.c index f3ce2bc..1187747 100644 --- a/usr.sbin/bhyve/rtc.c +++ b/usr.sbin/bhyve/rtc.c @@ -40,7 +40,9 @@ __FBSDID("$FreeBSD$"); #include <machine/vmm.h> #include <vmmapi.h> +#include "acpi.h" #include "inout.h" +#include "pci_lpc.h" #include "rtc.h" #define IO_RTC 0x70 @@ -358,3 +360,24 @@ rtc_init(struct vmctx *ctx) INOUT_PORT(rtc, IO_RTC, IOPORT_F_INOUT, rtc_addr_handler); INOUT_PORT(rtc, IO_RTC + 1, IOPORT_F_INOUT, rtc_data_handler); + +static void +rtc_dsdt(void) +{ + + dsdt_line(""); + dsdt_line("Device (RTC)"); + dsdt_line("{"); + dsdt_line(" Name (_HID, EisaId (\"PNP0B00\"))"); + dsdt_line(" Name (_CRS, ResourceTemplate ()"); + dsdt_line(" {"); + dsdt_indent(2); + dsdt_fixed_ioport(IO_RTC, 2); + dsdt_fixed_irq(8); + dsdt_unindent(2); + dsdt_line(" })"); + dsdt_line("}"); +} +LPC_DSDT(rtc_dsdt); + +SYSRES_IO(0x72, 6); |