summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bhyve/pit_8254.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bhyve/pit_8254.c')
-rw-r--r--usr.sbin/bhyve/pit_8254.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/usr.sbin/bhyve/pit_8254.c b/usr.sbin/bhyve/pit_8254.c
index 9ecb565..3eb1aa7 100644
--- a/usr.sbin/bhyve/pit_8254.c
+++ b/usr.sbin/bhyve/pit_8254.c
@@ -42,9 +42,11 @@ __FBSDID("$FreeBSD$");
#include <vmmapi.h>
+#include "acpi.h"
#include "bhyverun.h"
#include "inout.h"
#include "mevent.h"
+#include "pci_lpc.h"
#include "pit_8254.h"
#define TIMER_SEL_MASK 0xc0
@@ -268,3 +270,22 @@ INOUT_PORT(8254, TIMER_MODE, IOPORT_F_OUT, pit_8254_handler);
INOUT_PORT(8254, TIMER_CNTR0, IOPORT_F_INOUT, pit_8254_handler);
INOUT_PORT(8254, TIMER_CNTR1, IOPORT_F_INOUT, pit_8254_handler);
INOUT_PORT(8254, TIMER_CNTR2, IOPORT_F_INOUT, pit_8254_handler);
+
+static void
+pit_dsdt(void)
+{
+
+ dsdt_line("");
+ dsdt_line("Device (TIMR)");
+ dsdt_line("{");
+ dsdt_line(" Name (_HID, EisaId (\"PNP0100\"))");
+ dsdt_line(" Name (_CRS, ResourceTemplate ()");
+ dsdt_line(" {");
+ dsdt_indent(2);
+ dsdt_fixed_ioport(IO_TIMER1, 4);
+ dsdt_fixed_irq(0);
+ dsdt_unindent(2);
+ dsdt_line(" })");
+ dsdt_line("}");
+}
+LPC_DSDT(pit_dsdt);
OpenPOWER on IntegriCloud