svn commit: r316642 - head/sys/dev/syscons

Bruce Evans brde at optusnet.com.au
Sun Apr 9 10:32:45 UTC 2017


On Sun, 9 Apr 2017, Andrey Chernov wrote:

> On 09.04.2017 9:46, Bruce Evans wrote:
>>> Please don't forget that this 5 cells range (0xd0-0xd4, last one becomes
>>> SC_CURSOR_CHAR) can be redefined with "vidcontrol -M", it is needed for
>>> the case they overlap valid characters region for some code tables.
>>
>> I didn't forget it, but these cells are only used in text mode and there
>> are only 4 of them AFAIK (-M goes up to 252, which leaves space for only
>> 4 cells 252-255).  Text mode is is one case that has no renderer support
>> for the mouse cursor.
>
> Here is 5th one (depends of SC_MOUSE_CHAR which can be set in the kernel
> config):
>
> #if SC_MOUSE_CHAR <= SC_CURSOR_CHAR && SC_CURSOR_CHAR < (SC_MOUSE_CHAR + 4)
> #undef SC_CURSOR_CHAR
> #define SC_CURSOR_CHAR  (SC_MOUSE_CHAR + 4)
> #endif
>
>> NOTES gives the example of setting it to 0x3.  Then if the configured
>> SC_CURSOR_CHAR is inside the 4-char range for the mouse cursor, then
>
> AFAIK SC_CURSOR_CHAR kernel config or vidcontrol is not supported.
>
>> There is no way to reconfigure the cursor char AFAIK.  In fact, it
>> doesn't even seem to be configured -- SC_CURSOR_CHAR is never used,
>
> I remember times it was used but not remember how, log history needs to
> be browsed.

The initializations are well hidden in MD code: {arm,mips,powerpc,sparc64}
/.../sc_machdep.c and isa/syscons_isa.c.  This is sort of backwards.  The
MI initializations of sc->cursor_char are in MD files, while the more MD
default value of SC_CURSOR_CHAR is in an MI file.  Then sc->cursor_char
is only used by the vga renderer for text mode.  This is closely associated
with isa, so the initializations are mostly irrelevant since their result
is not used.

How do you initialize actual use of sc->cursor_char?  It is only used
when SC_NO_FONT_LOADING is not defined.  Configuring SC_PIXEL_MODE
forces SC_NO_FONT_LOADING to be undefined.  Except to test sc->cursor_char,
I removed the #undef for this.  Next, sc->cursor_char is only used if
scp->curs.attr_flags & CONS_CHAR_CURSOR.  vidcontrol only supports this
with blinking too, and I know I don't want that.  Anyway, font loading
is almost always defined.  Apparently the char cursor is turned off with
loadable fonts since it would mess up special fonts more than the default
font.  But not as much as the mouse cursor.

Bruce


More information about the svn-src-all mailing list