rick@pcrat.uucp (Rick Richardson) (07/30/90)
------------------------------------------ Console Ioctl Incompatiblities in UNIX/386 or ABI Really Stands for "Almost Batted In" ------------------------------------------ Rick Richardson first public issue 07/30/90 The following information is provided for the convenience of programmers contending with the loose definition of an ABI w.r.t UNIX/386 Release 3.2 and the console display. Corrections and additions gratefully accepted by rick@pcrat.pcr.com. Legend: A AT&T SVR3.2 E ESIX SVR3.2 C I INTERACTIVE SVR3.2 2.0.2 S SCO SVR3.2.0 V4 Generic SVR4 ? Unknown NI Not Implemented Note: If there needs to be multiple columns for SVR4, I think I'll scream, turn in my AT&T Universal Card and my INTERACTIVE Yo-Yo, and start wearing Blue underwear. Note: As you will see, it is CLEAR that SVR4 must invent yet another upper byte code to implement a consistent set of MODESWITCH modes across all UNIX variants. Whether this is done or not I can only wish. So there should be a new set of SW_* modes, a set of O_SW_* modes, and a set of OO_SW_* modes. MODESWITCH (a.k.a SW_*) A E I S V4 Upper ioctl byte 'x' 'x' 'x' 'S' ? Lower ioctl byte *********** See Table ************ ADAPTER FORMAT COLORS A E I S V4 ------- ------ ------ -- -- -- -- -- EGA 80x25 2 7 7 7 7 ? EGA 80x43 2 10 10 10 112 ? EGA 80x43 16 11 11 11 113 ? EGA 640x350 2 17 17 17 17 ? EGA 640x350 16 18 18 18 18 ? EGA 80x25 2 21 21 21 21 ? EGA 80x25 16 22 22 22 22 ? VGA 80x25 2 27 27 25 25 ? VGA 80x25 16 26 26 24 24 ? VGA 640x480 2 28 28 26 26 ? VGA 640x480 16 29 29 27 27 ? VGA 320x200 256 30 30 28 28 ? VGA+ 800x600 16 31 NI NI NI ? VGA+ 640x400 256 32 NI NI NI ? VGA 640x350 2 NI NI 31 NI ? VGA 640x350 16 NI NI 32 NI ? VGA 132x25 2 NI NI 33 NI ? VGA 132x25 16 NI NI 34 NI ? VGA 132x43 2 NI NI 35 NI ? VGA 132x43 16 NI NI 36 NI ? ATT 640x400 16 24 24 34 NI ? HGC 720x348 2 NI NI NI 224 ? Note: I checked ISC 2.2, and found no additional modes, not even an 800x600 super VGA mode like AT&T. Sigh. Note: A,E,I provide the 'S' ioctl under name O_MODESWITCH and O_SW* for modes 0-23. A and E allow mode 24 this way except that the meaning is different than with S. I allows modes 24-32 and 34 this way, but S only has equivalent modes 24-28. Opinion: A one hour teleconference between A, I, and S could have unified the mode numbering scheme. And S could have aliased the 'x' ioctl to 'S'. KDMAPDISP A E I S V4 Upper ioctl byte 'K' 'K' 'K' 'K' ? Lower ioctl byte 2 2 2 2 ? A Proper operation verified E Proper operation verified I Proper operation verified S Causes kernel panic (type E) on 3.2.0. V4 ? Note: I hope V4 doesn't choose the S behavior :-) MAPCONS A E I S V4 Upper ioctl byte 'm' 'm' 'm' 'm' ? Lower ioctl byte 0 0 0 0 ? A ? E ? I Returns new pointer each time called (grows process). First call maps in a portion of display only; amount mapped is *timing dependent*. Output on rest of screen silently disappears (no core dump). Second call works successfully, but allocates additional virtual memory. S Proper operation verified. Multiple calls return same virtual memory address (OK). Undocumented feature: amount of memory mapped depends upon current display mode; use only after final display mode has been set. V4 ? Note: This call seems to be obsoleted by the more general KDMAPDISP, except it is the only one that works on S. VT_SETMODE A E I S V4 Upper ioctl byte 'v' 'v' 'v' 'v' ? Lower ioctl byte 2 2 2 2 ? A Proper operation verified. E Proper operation verified. I Proper operation verified. S Proper operation verified. V4 ? VT_GETMODE A E I S V4 Upper ioctl byte 'v' 'v' 'v' 'v' ? Lower ioctl byte 3 3 3 3 ? A Proper operation verified. E Proper operation verified. I Proper operation verified. S Proper operation verified. V4 ? VT_RELDISP A E I S V4 Upper ioctl byte 'v' 'v' 'v' 'v' ? Lower ioctl byte 4 4 4 4 ? A Proper operation verified. E Proper operation verified. I Proper operation verified. S Proper operation verified. V4 ? ------------------------------------------------------------ -- Rick Richardson | Looking for FAX software for UNIX/386 ??? Ask About: |Mention PC Research,Inc.| FaxiX - UNIX Facsimile System (tm) |FAX# for uunet!pcrat!rick| FaxJet - HP LJ PCL to FAX (Send WP,Word,Pagemaker...)|Sample (201) 389-8963 | JetRoff - troff postprocessor for HP LaserJet and FAX|Output