Commit Graph

20 Commits

Author SHA1 Message Date
avg
f6def40e18 kern cons: introduce infrastructure for console grabbing by kernel
At the moment grab and ungrab methods of all console drivers are no-ops.

Current intended meaning of the calls is that the kernel takes control of
console input.  In the future the semantics may be extended to mean that
the calling thread takes full ownership of the console (e.g. console
output from other threads could be suspended).

Inspired by:	bde
MFC after:	2 months
2011-12-17 15:08:43 +00:00
rwatson
3eec7d0264 Add support for alternative break-to-debugger support on the Xen console.
This should help debug boot-time hangs experienced in 9.0-BETA.

MFC after:	3 weeks
Tested by:	sbruno
Approved by:	re (kib)
2011-09-02 17:36:01 +00:00
cperciva
83176a3464 A lack of console input is not the same thing as a byte of \0 input.
Correctly return -1 from cngetc when no input is available to be read.

This fixes the '(CTRL-C to abort)' spam while dumping.

MFC after:	3 days
2010-12-29 05:13:21 +00:00
kmacy
4d2755f79e remove annoying printf that cripples kdb on PV guests 2009-11-24 07:18:38 +00:00
ed
e23bffc564 Cleanups to the Xen console driver:
- Use CONSOLE_DRIVER() instead of the deprecated CONS_DRIVER() declaration.

- This means we cannot use cn_checkc anymore, which is supposed to do
  the same as cn_getc nowadays. Remove the cn_getc implementation (that
  was never being called) and rename cn_checkc to cn_getc.

- Don't run-time patch cn_putc, but add the logic to xc_cnputc().

This means I could do some cleanups to our console code...

Tested by:	nobody on hackers@
2009-08-24 08:27:42 +00:00
ed
8d73adc757 Last minute TTY API change: remove mutex argument from tty_alloc().
I don't want people to override the mutex when allocating a TTY. It has
to be there, to keep drivers like syscons happy. So I'm creating a
tty_alloc_mutex() which can be used in those cases. tty_alloc_mutex()
should eventually be removed.

The advantage of this approach, is that we can just remove a function,
without breaking the regular API in the future.
2009-05-29 06:41:23 +00:00
adrian
646dc483a5 Disable some un-needed console debugging. 2009-05-18 04:50:31 +00:00
kmacy
4e4682a2b6 don't acquire tty lock with console lock held 2009-05-11 23:03:15 +00:00
kmacy
64224d156a xen console lock needs to be a spin lock in case it is acquired from an interrupt context 2009-05-11 22:55:49 +00:00
dfr
df0ed71781 Fix the Xen build for i386 PV mode. 2009-04-01 17:06:28 +00:00
dfr
598fb4217f Merge in support for Xen HVM on amd64 architecture. 2009-03-11 15:30:12 +00:00
kmacy
9198d09682 merge 186535, 186537, and 186538 from releng_7_xen
Log:
 - merge in latest xenbus from dfr's xenhvm
 - fix race condition in xs_read_reply by converting tsleep to mtx_sleep

Log:
 unmask evtchn in bind_{virq, ipi}_to_irq

Log:
 - remove code for handling case of not being able to sleep
 - eliminate tsleep - make sleeps atomic
2008-12-29 06:31:03 +00:00
dfr
19b6af98ec Clone Kip's Xen on stable/6 tree so that I can work on improving FreeBSD/amd64
performance in Xen's HVM mode.
2008-11-22 16:14:52 +00:00
ed
db4c3eb350 Remove unused consdev structure fields.
The cn_unit and cn_tp fields don't seem to be used anywhere. Some
drivers set them, while others don't. Just remove them, in an attempt to
make our consdev code a little easier to understand.
2008-10-27 11:45:31 +00:00
kmacy
8234483524 update console to pre-MPSAFE tty interfaces 2008-10-15 05:43:13 +00:00
ed
4efdef565f Replace all calls to minor() with dev2unit().
After I removed all the unit2minor()/minor2unit() calls from the kernel
yesterday, I realised calling minor() everywhere is quite confusing.
Character devices now only have the ability to store a unit number, not
a minor number. Remove the confusion by using dev2unit() everywhere.

This commit could also be considered as a bug fix. A lot of drivers call
minor(), while they should actually be calling dev2unit(). In -CURRENT
this isn't a problem, but it turns out we never had any problem reports
related to that issue in the past. I suspect not many people connect
more than 256 pieces of the same hardware.

Reviewed by:	kib
2008-09-27 08:51:18 +00:00
kmacy
e647d11859 change netfront to match xen31_6
fix console locking
2008-08-20 09:47:49 +00:00
ed
0fa96a5411 Integrate the Xen console driver.
I initially didn't want to integrate the Xen console driver, because it
did not receive any testing. Kip Macy suggested that I'd better check it
in right now, because this is the easiest way for him to test it while
he is working on the Xen import.

Requested by:	kmacy
2008-08-20 09:03:03 +00:00
kmacy
b65933479a Compile fixes for xen build.
MFC after:	1 month.
2008-08-15 04:00:44 +00:00
kmacy
510c672e13 Import Xen paravirtual drivers.
MFC after:	2 weeks
2008-08-12 20:01:57 +00:00