From 1f82944f35a4dbb3be2e29e3cf75eed36dcd6edf Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 7 Feb 2014 20:53:41 +0000 Subject: [PATCH] Mark the I/O ports used by the bhyve console and debug devices as system resources. MFC after: 1 week --- usr.sbin/bhyve/consport.c | 3 +++ usr.sbin/bhyve/dbgport.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/usr.sbin/bhyve/consport.c b/usr.sbin/bhyve/consport.c index a31038a9c893..b9eb4ce9cc92 100644 --- a/usr.sbin/bhyve/consport.c +++ b/usr.sbin/bhyve/consport.c @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include "inout.h" +#include "pci_lpc.h" #define BVM_CONSOLE_PORT 0x220 #define BVM_CONS_SIG ('b' << 8 | 'v') @@ -125,6 +126,8 @@ console_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, return (0); } +SYSRES_IO(BVM_CONSOLE_PORT, 4); + static struct inout_port consport = { "bvmcons", BVM_CONSOLE_PORT, diff --git a/usr.sbin/bhyve/dbgport.c b/usr.sbin/bhyve/dbgport.c index 97a86ef0babc..534ae652d19f 100644 --- a/usr.sbin/bhyve/dbgport.c +++ b/usr.sbin/bhyve/dbgport.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include "inout.h" #include "dbgport.h" +#include "pci_lpc.h" #define BVM_DBG_PORT 0x224 #define BVM_DBG_SIG ('B' << 8 | 'V') @@ -110,6 +111,8 @@ static struct inout_port dbgport = { dbg_handler }; +SYSRES_IO(BVM_DBG_PORT, 4); + void init_dbgport(int sport) {