aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/bvm/bvm_console.c
diff options
context:
space:
mode:
authorPeter Grehan <grehan@FreeBSD.org>2011-05-19 21:53:25 +0000
committerPeter Grehan <grehan@FreeBSD.org>2011-05-19 21:53:25 +0000
commit1f3025e13378bfb7be746e15743c2050fae45a93 (patch)
tree025b0a5578ec9688795c45d9e672d8faf8d42845 /sys/dev/bvm/bvm_console.c
parent17debe0d59fed38e2f5451580cf85d7f5fb6bbfa (diff)
Notes
Diffstat (limited to 'sys/dev/bvm/bvm_console.c')
-rw-r--r--sys/dev/bvm/bvm_console.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/dev/bvm/bvm_console.c b/sys/dev/bvm/bvm_console.c
index ac12b6f588d3..392346ee3eae 100644
--- a/sys/dev/bvm/bvm_console.c
+++ b/sys/dev/bvm/bvm_console.c
@@ -70,6 +70,8 @@ static int alt_break_state;
#define BVM_CONS_PORT 0x220
static int bvm_cons_port = BVM_CONS_PORT;
+#define BVM_CONS_SIG ('b' << 8 | 'v')
+
static void bvm_timeout(void *);
static cn_probe_t bvm_cnprobe;
@@ -171,14 +173,16 @@ bvm_cnprobe(struct consdev *cp)
int disabled, port;
disabled = 0;
+ cp->cn_pri = CN_DEAD;
+
resource_int_value("bvmconsole", 0, "disabled", &disabled);
- if (disabled)
- cp->cn_pri = CN_DEAD;
- else
- cp->cn_pri = CN_NORMAL;
+ if (!disabled) {
+ if (resource_int_value("bvmconsole", 0, "port", &port) == 0)
+ bvm_cons_port = port;
- if (resource_int_value("bvmconsole", 0, "port", &port) == 0)
- bvm_cons_port = port;
+ if (inw(bvm_cons_port) == BVM_CONS_SIG)
+ cp->cn_pri = CN_REMOTE;
+ }
}
static void