1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00
freebsd/sys/dev
Ed Schouten 537de51435 Make syscons(4) use ttyv0 instead of consolectl as its primary window.
When I was hacking on uart(4) to make it work with the MPSAFE TTY layer,
I noticed there was a difference between the way syscons and uart work
with respect to consoles:

- The uart(4) driver sets cn_name to the corresponding ttyu%r node,
  which means init(8) (which opens /dev/console) will have its output
  redirected to /dev/ttyu%r. After /etc/rc is done, it can spawn a getty
  on that device node as well.

- Syscons used a little different approach. Apart from the /dev/ttyv%r
  nodes, it creates a /dev/consolectl node. This device node is used by
  moused and others to deliver their data, but for some reason it also
  acts as a TTY, which shares its stat structure with ttyv0. This device
  node is used as a console (run conscontrol).

There are a couple advantages of this approach:

- Because we use two different TTY's to represent the 0th syscons
  window, we allocate two sets of TTY buffers. Even if you don't use
  /dev/consolectl after the system has booted (systems that don't run
  moused), it seems the buffers are still allocated.

- We have to apply an evil hack to redirect input to /dev/consolectl.
  Because each window (stat) is associated not associated with one TTY,
  syscons solves this by redirecting all input to closed TTY's to
  consolectl.

  This means that opening /dev/ttyv0 while in single user mode will
  probably cause strange things to happen with respect to keyboard input
  redirection.

The first patch that I discussed with philip@ turned consolectl into a
symlink to ttyv0, but this was not a good idea, because in theory we
would want consolectl to be a simple device node, which contains all the
`privileged' ioctl()'s. Apart from that, it didn't work, because each
time /dev/ttyv0 got revoked, moused also lost its descriptor to deliver
input, which meant you had to plug out/in your mouse to make it work
again. This version just leaves the consolectl device the way it is. It
can still be used to write output to ttyv0, but it can no longer receive
any input.

In my opinion this patch is not a complete solution, but it's already a
step in the good direction. It would allow us to turn consolectl into a
special (non-TTY) device node in the far future. It shaves off 15 KB of
wasted TTY buffer space.

Discussed with:	philip
2008-08-24 19:50:57 +00:00
..
aac Add explicit PCI IDs for the following Adaptec RAID Series 2 adapters: 2008-06-27 19:34:47 +00:00
acpi_support Fix typo in comment. 2008-08-19 22:28:24 +00:00
acpica Handle errors from device_get_children. 2008-08-23 16:38:20 +00:00
adlink
advansys
age Fix a typo: jme -> age 2008-08-14 02:43:18 +00:00
agp When device_get_children returns an error, ignore that bus' children. 2008-08-23 15:57:43 +00:00
aha Minor typo fix, caught while skimming through the file. 2008-08-10 15:10:39 +00:00
ahb
aic
aic7xxx Only print sense data diagnostics if debugging is enabled with the 2008-02-17 16:00:36 +00:00
amd
amr While spin-waiting for the mailbox semaphore to update, do flushing reads of 2008-07-20 16:50:14 +00:00
an
ar
arcmsr
asmc Match the Mac Pro with 8 cores. This machine reports 35 temperature 2008-04-12 12:04:09 +00:00
asr
ata Introduce a new loader tunable "hw.ata.ata_dma_check_80pin", defaulting to 1. 2008-08-15 10:55:11 +00:00
ath Change the calling convention for ic_node_alloc to deal with 2008-06-07 18:38:02 +00:00
atkbdc Fill in sysctl descriptions. 2008-07-26 00:01:19 +00:00
auxio
bce - Added support for BCM5709 and BCM5716 controllers. 2008-06-13 01:16:37 +00:00
bfe Add a new sysctl node 'dev.bfe.N.stats' that shows various MAC 2008-08-22 06:46:55 +00:00
bge Improve the integration of BCM5906[M] support: 2008-05-14 21:00:27 +00:00
bktr Add locking to the various iicbus(4) bridge drivers: 2008-08-04 20:46:15 +00:00
bm Fix some locking and logic bugs pointed out by jhb. These fix driver detach and speed up data transfer by nearly a factor of 2. 2008-07-03 21:51:30 +00:00
buslogic
cardbus
ce Fix instances of bogus #elsif directive. 2008-07-01 14:41:03 +00:00
ciss Correctly set the interrupt enable and disable bits. The previous 2008-08-02 13:04:26 +00:00
cm
cmx Commit cmx(4), a driver for Omnikey CardMan 4040 PCMCIA smartcard readers. 2008-03-06 08:09:45 +00:00
coretemp style(9): remove FreeBSD CVS ID from the initial license comment. 2008-05-14 10:02:25 +00:00
cp Do not set IFF_DEBUG directly from the driver. 2008-06-30 21:18:27 +00:00
cpuctl - Add cpuctl(4) pseudo-device driver to provide access to some low-level 2008-08-08 16:26:53 +00:00
cpufreq Attach the cpufreq child devices with specific orders to enforce relative 2008-08-13 16:09:40 +00:00
cs Improve the EEPROM parsing, based on finding a datasheet that describes 2008-07-09 16:47:55 +00:00
ct
ctau Do not set IFF_DEBUG directly from the driver. 2008-06-30 21:18:27 +00:00
cx Do not set IFF_DEBUG directly from the driver. 2008-06-30 21:18:27 +00:00
cxgb Commit step 1 of the vimage project, (network stack) 2008-08-17 23:27:27 +00:00
cy
dc - Use m_collapse(9) instead of m_defrag(9) if possible. This results 2008-08-23 20:57:48 +00:00
dcons Integrate the new MPSAFE TTY layer to the FreeBSD operating system. 2008-08-20 08:31:58 +00:00
de During attach on some de(4) adapters the driver sends out a test packet as 2008-04-05 17:24:44 +00:00
digi
dpt
drm Update drm kernel drivers. 2008-08-23 20:59:12 +00:00
e1000 Data type fix 2008-07-31 02:22:53 +00:00
ed When the miibus for the AX88x90 or TC5299J cards fails to attach, we 2008-08-06 22:22:27 +00:00
eisa
en Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT. 2008-03-25 09:39:02 +00:00
ep
esp o Fix style(9) bugs and similar nits. 2008-07-22 13:51:21 +00:00
et Don't leak DMA map if not freed. 2008-07-11 18:26:12 +00:00
ex Some PC Card variants of the 82365 don't seem to like setting the IRQ 2008-08-24 00:22:42 +00:00
exca
fatm Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT. 2008-03-25 09:39:02 +00:00
fb Convert amd64 and i386 to share the atrtc device driver. 2008-04-14 08:00:00 +00:00
fdc
fe - Use bus_foo() rather than bus_space_foo() and retire the bus tag and handle 2008-06-23 18:16:25 +00:00
firewire Commit step 1 of the vimage project, (network stack) 2008-08-17 23:27:27 +00:00
flash
fxp Reuse the mbuf that was just retrieved from the receive ring if mbuf 2008-03-22 18:13:39 +00:00
gem - Restore the behavior of enabling the MII buffer for an internal 2008-08-23 15:03:26 +00:00
glxsb - Convert sc_sessions_mtx mutex to a rwlock, so in the fast path 2008-08-11 08:41:08 +00:00
hatm Give MEXTADD() another argument to make both void pointers to the 2008-02-01 19:36:27 +00:00
hifn
hme - Use the revamped code from the gem(4) PCI front-end, which 2008-04-26 14:17:21 +00:00
hptiop Update the hptiop driver to version 1.3. This adds support for the 4xxx 2008-02-03 16:07:12 +00:00
hptmv
hptrr Fix a mistake made during the import of the driver. Previous versions of 2008-03-08 18:06:48 +00:00
hwpmc - Provide kernelname as the name for process with P_KTHREAD set as 2008-07-25 05:49:48 +00:00
ic Support for Freescale QUad Integrated Communications Controller. 2008-03-03 18:20:17 +00:00
ichsmb - Use bus_foo() rather than bus_space_foo() and remove bus space tag/handle 2008-06-06 18:29:56 +00:00
ichwd
ida
ie Use the new bus device_shutdown hook for performing the shutdown action 2008-08-01 21:33:07 +00:00
ieee488 Remove the distinction between device minor and unit numbers. 2008-05-29 12:50:46 +00:00
if_ndis Fix a mutex LOR introduced by the conversion of if_ndis from spinlocks to 2008-07-09 00:10:55 +00:00
iicbus Handle errors from device_get_chidlren. 2008-08-23 07:38:00 +00:00
iir
io Remove D_NEEDGIANT from io(4). 2008-08-08 13:43:56 +00:00
ipmi
ips
ipw Minor cleanup of vap create work: 2008-05-12 00:15:30 +00:00
iscsi/initiator Record the dependency of the iscsi initiator on cam. 2008-04-20 15:56:59 +00:00
isp
ispfw
iwi Change the calling convention for ic_node_alloc to deal with 2008-06-07 18:38:02 +00:00
iwn Change the calling convention for ic_node_alloc to deal with 2008-06-07 18:38:02 +00:00
ixgb
ixgbe This updates the ixgbe driver to Intel internal version 1.4.7 2008-07-30 18:15:18 +00:00
jme Fix buffer discard index. 2008-07-28 02:37:15 +00:00
joy
k8temp Fix comment: s/before/after. 2008-07-06 16:18:58 +00:00
kbd Don't include <sys/tty.h> in non-TTY drivers. 2008-07-24 09:54:10 +00:00
kbdmux Don't include <sys/tty.h> in non-TTY drivers. 2008-07-24 09:54:10 +00:00
le
led Add sbuf_new_auto as a shortcut for the very common case of creating a 2008-08-09 11:14:05 +00:00
lge Plug memory leak in jumbo buffer allocation failure path. 2008-03-05 05:36:09 +00:00
lmc Make lmc(4) compile without INET6 defined[1]. While here make it 2008-08-24 18:27:19 +00:00
malo Minor cleanup of vap create work: 2008-05-12 00:15:30 +00:00
mc146818
mca
mcd
md Remove the distinction between device minor and unit numbers. 2008-05-29 12:50:46 +00:00
mem
mfi Fix style nit: s/^ }/}/ in two places. 2008-08-23 23:30:54 +00:00
mii Move the code that looks for the companion phy to a subroutine to make 2008-08-23 15:50:18 +00:00
mk48txx
mlx
mly
mmc
mpt Allocate a single CCB at the start of the main loop of the RAID monitoring 2008-07-21 18:43:02 +00:00
mse
msk Move comments block 1 line up to remark on the setting 2008-03-11 02:39:52 +00:00
mxge Adapt mxge shims to detect phys contig jumbo frames 2008-08-21 16:35:34 +00:00
my
ncv
nfe Add support for MCP73 chips. 2008-04-10 01:25:09 +00:00
nge
nmdm Integrate the new MPSAFE TTY layer to the FreeBSD operating system. 2008-08-20 08:31:58 +00:00
nsp
null
nve Import rewritten nve device id's, which brings this more 2008-05-31 14:17:36 +00:00
nvram - Use an sx lock to serialize writes since they update the checksum. 2008-08-01 20:39:18 +00:00
nxge
ofw Integrate the new MPSAFE TTY layer to the FreeBSD operating system. 2008-08-20 08:31:58 +00:00
patm Give MEXTADD() another argument to make both void pointers to the 2008-02-01 19:36:27 +00:00
pbio
pccard Fix a small problem in the comment about departure from NetBSD. 2008-08-07 21:16:14 +00:00
pccbb Read the config space of the child, not the bridge, to determine when 2008-08-10 09:55:14 +00:00
pcf - Consolidate module version for the pcf module into just pcf.c instead 2008-08-05 17:39:37 +00:00
pci Cope with errors from device_get_children(). These errors can happen 2008-08-23 07:23:52 +00:00
pcn Move pcn driver from sys/pci to sys/dev/pcn. 2008-08-14 20:34:46 +00:00
pdq
powermac_nvram
ppbus Whitespace fix. 2008-08-22 18:42:18 +00:00
ppc Use bus_foo() rather than bus_space_foo() and remove bus handle and tag 2008-08-22 18:43:19 +00:00
pst
puc Add the Decision Computer Inc, PCCOM 8-port serial card. 2008-08-22 00:13:17 +00:00
quicc Support for Freescale QUad Integrated Communications Controller. 2008-03-03 18:20:17 +00:00
ral Change the calling convention for ic_node_alloc to deal with 2008-06-07 18:38:02 +00:00
random
ray
rc
re Fix VLAN hardware tag insertion/stripping on big-endian 2008-08-13 03:40:08 +00:00
rndtest
rp
safe
scc With rev 1.24 of sys/powerpc/powermac/macio.c, we now get a 2008-04-26 18:40:59 +00:00
scd
sf
si Remove sicontrol(8)'s "ttystat". 2008-06-09 08:43:27 +00:00
sio Expand kdb_alt_break a little, most commonly used with the option 2008-05-04 23:29:38 +00:00
sis There actually were bugs in the original handling that I missed last 2008-08-23 15:34:31 +00:00
sk Prefer NULL over integer 0 for pointer type. 2008-02-14 01:25:01 +00:00
smbus - Store the device_t of the smbX device in the softc. 2008-06-06 18:45:32 +00:00
smc - Move ether_ifdetach earlier. 2008-06-17 05:48:42 +00:00
sn
snc Convert to new style PC Card front end driver. Add support for the 2008-08-07 20:55:20 +00:00
snp Convert the snp(4) driver to use cdevpriv. 2008-08-15 13:07:07 +00:00
sound Make sure that we handle errors in device_get_children correctly. 2008-08-23 18:27:10 +00:00
speaker Move speaker a lot closer to style(9) 2008-05-15 01:22:48 +00:00
spibus
sr
ste Move the ste driver from sys/pci to sys/dev/ste. 2008-08-14 20:09:58 +00:00
stg
stge
streams
sym Allow 53C1010 without NVRAM to negotiate Ultra-3. 2008-08-07 23:41:17 +00:00
syscons Make syscons(4) use ttyv0 instead of consolectl as its primary window. 2008-08-24 19:50:57 +00:00
tdfx Add the module dependency on the mem(4) module. This will fix the module 2008-03-13 14:08:41 +00:00
ti Remove some remnant alpha hacks. 2008-04-26 14:13:48 +00:00
tl Move the tl driver form sys/pci to sys/dev/tl. 2008-08-14 20:02:34 +00:00
trm
tsec Convert TSEC watchdog to the new scheme. 2008-03-12 16:35:25 +00:00
twa
twe Add missing \n. 2008-02-12 08:58:26 +00:00
tx Make tx(4) MPSAFE 2008-06-10 17:59:43 +00:00
txp
uart Integrate the new MPSAFE TTY layer to the FreeBSD operating system. 2008-08-20 08:31:58 +00:00
ubsec
usb Style nit: s/^ }/}/ 2008-08-23 23:28:33 +00:00
utopia
vge
vkbd Don't enforce unique device minor number policy anymore. 2008-06-11 18:55:19 +00:00
vr Fix a multicast handling regression on VT6105M introduced in 2008-07-16 08:35:29 +00:00
vx - vx_stop() requires the driver lock to be held. 2008-04-24 22:51:43 +00:00
watchdog
wb Move wb driver from sys/pci to sys/dev/wb. 2008-08-14 21:26:29 +00:00
wds
wi Add an altnerative Siemens SpeedStream ID. This one is for a Prism 3 2008-08-02 20:50:13 +00:00
wl
wpi - Fix compile if WPI_DEBUG is not defined 2008-06-23 15:40:56 +00:00
xe Style(9) xe(4). The MD5 sums are different, but comparing the dissassemblies 2008-06-04 20:26:57 +00:00
xen Evidently the block device starts at 767. 2008-08-24 04:42:41 +00:00
xl Move the xl driver form sys/pci to sys/dev/xl for consistency. 2008-08-10 09:45:52 +00:00