summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2014-02-19 18:36:53 +0000
committerjhb <jhb@FreeBSD.org>2014-02-19 18:36:53 +0000
commitf840747a6b427e35f77cc6339cf0ba5e197b30de (patch)
treeb034b4c90b5e6f475ad83930636a8b6dbe20914d /usr.sbin
parent169a4e8371dd1f60ac3b3e9d6fbb216c7d19accd (diff)
downloadFreeBSD-src-f840747a6b427e35f77cc6339cf0ba5e197b30de.zip
FreeBSD-src-f840747a6b427e35f77cc6339cf0ba5e197b30de.tar.gz
MFC 261607:
Mark the I/O ports used by the bhyve console and debug devices as system resources.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bhyve/consport.c3
-rw-r--r--usr.sbin/bhyve/dbgport.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/bhyve/consport.c b/usr.sbin/bhyve/consport.c
index a31038a..b9eb4ce 100644
--- a/usr.sbin/bhyve/consport.c
+++ b/usr.sbin/bhyve/consport.c
@@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
#include <stdbool.h>
#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 97a86ef..534ae65 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)
{
OpenPOWER on IntegriCloud