|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Re: [Xen-changelog] If Xen is told to use a serial console via a com1= or com2= directive
On Mar 23, 2005, at 9:10 PM, BitKeeper Bot wrote: ChangeSet 1.1358, 2005/03/24 03:10:42+00:00,
iap10@xxxxxxxxxxxxxxxxxxxxx
That isn't possible, though it has been a frequent feature request for the Linux serial layer. Major 4 minor 64 is reserved for the serial driver(s). Other drivers, even similar drivers, must get their own. This is to be expected: the SCSI driver does not take over major 3 minor 0, even though SCSI is a block driver "like IDE". There is plenty of precedent here. The drivers in drivers/serial hijack the ttyS nodes, since serial ports are generally onboard and it's almost unheard-of to have different types present. Drivers that do not fit into the serial framework, however, need their own major. IBM pSeries virtual console uses /dev/hvsi*. Cyclades uses /dev/ttyC*. $(grep '"tty."' drivers/char) will show you more than you ever knew existed... and they all use their own major number and device nodes. I wrote drivers/char/hvsi.c, so I've been here before, and I'd definitely recommend not trying to hijack serial (ttyS) nodes. It just doesn't make sense: what does hardware flow control mean to a virtual console? What about baud rate, parity, stop bits, IO port? Even worse, all those ioctls like TIOCSERGETLSR ("get line status register") -- which ioctls can you return an error for, and which can you fake, and what will you break when you fake it? Example from anaconda (Red Hat's installer):
if (major(sb.st_rdev) != 3 && major(sb.st_rdev) != 136 &&
(virtpcon != NULL)){
if ((ioctl (0, TIOCLINUX, &twelve) < 0) &&
(ioctl(0, TIOCGSERIAL, &si) != -1))
flags |= LOADER_FLAGS_SERIAL;
}
Wouldn't want to break that. I wonder if we want LOADER_FLAGS_SERIAL
set or not. I wonder what other installers do...
I haven't looked at hijacking the tty driver, but I'm wary for the same reasons. I'd suggest not trying to take over anybody else's major/minor. -- Hollis Blanchard IBM Linux Technology Center ------------------------------------------------------- This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005 Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |