<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/vt, branch stable/14</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>vt: Avoid integer overflow in CONS_HISTORY ioctl</title>
<updated>2026-06-07T17:12:28+00:00</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2026-05-26T16:19:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b5a4f4bfbc95d5d5361da708728f7f4a6db2ee60'/>
<id>b5a4f4bfbc95d5d5361da708728f7f4a6db2ee60</id>
<content type='text'>
Reviewed by:	markj, vexeduxr
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57250

(cherry picked from commit 0ae946e7223df5ef3f7980af1d774d7f593f6421)
(cherry picked from commit deaaddf1d3c4283649945553ad7e3208c8424308)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by:	markj, vexeduxr
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57250

(cherry picked from commit 0ae946e7223df5ef3f7980af1d774d7f593f6421)
(cherry picked from commit deaaddf1d3c4283649945553ad7e3208c8424308)
</pre>
</div>
</content>
</entry>
<entry>
<title>vt(4): allow up to _SIG_MAXSIG (128) for VT_SETMODE</title>
<updated>2026-04-12T13:43:41+00:00</updated>
<author>
<name>Quentin Thébault</name>
<email>quentin.thebault@defenso.fr</email>
</author>
<published>2026-01-14T00:14:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3f4d641f7e6973e6d544c10ac9c0203333b36ecd'/>
<id>3f4d641f7e6973e6d544c10ac9c0203333b36ecd</id>
<content type='text'>
VT_SETMODE ioctl currently checks the provided signal numbers with its
own ISSIGVALID macro that uses NSIG (32) as a maximum, although the code
that will actually send the signal in sys/kern/kern_sig.c uses
_SIG_VALID which allows up to _SIG_MAXSIG (128).

This change aligns the vt code with the kernel internals and enables the
use of higher signal numbers so that applications are not limited to
SIGUSR1 and SIGUSR2 for vt release and acquire signals.

Signed-off-by:	Quentin Thébault &lt;quentin.thebault@defenso.fr&gt;
Reviewed by:	emaste, imp, kevans

(cherry picked from commit 5e1c7867e1b9a8abe7307d01087cddc057e39859)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
VT_SETMODE ioctl currently checks the provided signal numbers with its
own ISSIGVALID macro that uses NSIG (32) as a maximum, although the code
that will actually send the signal in sys/kern/kern_sig.c uses
_SIG_VALID which allows up to _SIG_MAXSIG (128).

This change aligns the vt code with the kernel internals and enables the
use of higher signal numbers so that applications are not limited to
SIGUSR1 and SIGUSR2 for vt release and acquire signals.

Signed-off-by:	Quentin Thébault &lt;quentin.thebault@defenso.fr&gt;
Reviewed by:	emaste, imp, kevans

(cherry picked from commit 5e1c7867e1b9a8abe7307d01087cddc057e39859)
</pre>
</div>
</content>
</entry>
<entry>
<title>vt: Fix handling of backtab</title>
<updated>2026-03-09T13:25:55+00:00</updated>
<author>
<name>Nathaniel Braun</name>
<email>nathaniel.braun@gmail.com</email>
</author>
<published>2026-01-17T17:14:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1fd1b699bda2ec32be3e0c7afa894c615113afc2'/>
<id>1fd1b699bda2ec32be3e0c7afa894c615113afc2</id>
<content type='text'>
PR: 292463
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2002

(cherry picked from commit 5fec99caff3ac4f476bb88078ebf85fbecf6afb3)
(cherry picked from commit 3ca02a70f7f94f7479ffcd3ed7ca6d83ec58af10)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR: 292463
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2002

(cherry picked from commit 5fec99caff3ac4f476bb88078ebf85fbecf6afb3)
(cherry picked from commit 3ca02a70f7f94f7479ffcd3ed7ca6d83ec58af10)
</pre>
</div>
</content>
</entry>
<entry>
<title>vt: Allow VT_SETMODE with frsig=0</title>
<updated>2025-12-12T18:13:13+00:00</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2025-09-30T19:39:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e1c985ccc335beb37bb34b368c5c019cc5f80f9c'/>
<id>e1c985ccc335beb37bb34b368c5c019cc5f80f9c</id>
<content type='text'>
Linux does not check that any of the signals in vt_mode VT_SETMODE ioctl
(relsig, acqsig, frsig) are valid, but FreeBSD required that all three
are valid.  frsig is unusued in both Linux and FreeBSD, and software
typically leaves it unset.  To improve portability, allow frsig to be
set to zero.

PR:		289812
Reported by:	Dušan Gvozdenović
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52835

(cherry picked from commit 5198c32210039d8dc92554647384eee75688848c)
(cherry picked from commit 224d65015465d085f2e07edccef1f23a8c217b88)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Linux does not check that any of the signals in vt_mode VT_SETMODE ioctl
(relsig, acqsig, frsig) are valid, but FreeBSD required that all three
are valid.  frsig is unusued in both Linux and FreeBSD, and software
typically leaves it unset.  To improve portability, allow frsig to be
set to zero.

PR:		289812
Reported by:	Dušan Gvozdenović
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52835

(cherry picked from commit 5198c32210039d8dc92554647384eee75688848c)
(cherry picked from commit 224d65015465d085f2e07edccef1f23a8c217b88)
</pre>
</div>
</content>
</entry>
<entry>
<title>vt: add comments for KDMKTONE ioctl implementation</title>
<updated>2024-11-04T13:54:10+00:00</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2024-11-01T16:29:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=752c25c01c171811bab622b558e97d611c228c7d'/>
<id>752c25c01c171811bab622b558e97d611c228c7d</id>
<content type='text'>
The KDMKTONE ioctl, introduced in commit 916347f77e6c, is used to beep
the PC speaker.  For historical reasons the frequency is specified as an
8254 PIT divisor for a 1.19MHz clock.  Linux provides this same ioctl.
Add a comment to vtterm_beep to avoid someone wanting to "fix" this in
the future.

Also add an XXX comment that the period unit is supposed to be "timer
ticks."  Note that nothing in the base system uses this ioctl.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47395

(cherry picked from commit adba3c74209eb5d2197b9092002cc9d7505fd3c6)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The KDMKTONE ioctl, introduced in commit 916347f77e6c, is used to beep
the PC speaker.  For historical reasons the frequency is specified as an
8254 PIT divisor for a 1.19MHz clock.  Linux provides this same ioctl.
Add a comment to vtterm_beep to avoid someone wanting to "fix" this in
the future.

Also add an XXX comment that the period unit is supposed to be "timer
ticks."  Note that nothing in the base system uses this ioctl.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47395

(cherry picked from commit adba3c74209eb5d2197b9092002cc9d7505fd3c6)
</pre>
</div>
</content>
</entry>
<entry>
<title>vt: Fix frequency calcuation for bell</title>
<updated>2024-11-03T16:57:19+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2021-11-03T21:55:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1c9f1cb4f0a71bef37796a8ba139b86cc716ee88'/>
<id>1c9f1cb4f0a71bef37796a8ba139b86cc716ee88</id>
<content type='text'>
386BSD provided a MD function sysbeep. This took two arguments (pitch
and period). Pitch was jammed into the PIT's divisor directly (which
means the argument was expected to sound a tone at '1193182 / pitch'
Hz). FreeBSD inherited this interface.

In commit e46598588587 (svn 177642, Mar 26 2008), phk changed this
function to take a tone to sound in hz. He converted all in-tree
instances of 1193182 / hz to just hz (and kept the few misguided folks
that passed hz directly unchanged -- this was part of what motivated the
change). He converted the places where we pre-computed the 8254 divisor
from being pitch to 1193182 / pitch (since that converts the divisor to
the frequency and the interfaces that were exposed to userland exposed
it in these units in places, continuing the tradition inherited from SCO
System V/386 Unix in spots).

In 2009, Ed Shouten was contracted by the FreeBSD Foundation to write /
finish newcons. This work was done in perforce and was imported into
subversion in user/ed/newcons in revision 199072
(https://svnweb.freebsd.org/base?view=revision&amp;revision=199072) which
was later imported into FreeBSD by ray@ (Aleksandr Rybalko).

From that earliest import into svn import to this date, we ring the bell
with:
      sysbeep(1193182 / VT_BELLPITCH, VT_BELLDURATION);
where VT_BELLPITCH was defined to be 800. This results in a bell
frequency of 1491Hz, more or less today. This is similar to the
frequency that syscons and pcvt used (1493Hz and 1500Hz respectively).
This in turn was inherited from 386BSD, it seems, which used the hard
coded value 0x31b which is 795 -&gt; 1500Hz.

This '800' was intended to be the bell tone (eg 800Hz) and this
interface was one that wasn't converted. The most common terminal prior
to the rise of PCs was the VT100, which had an approximately 800Hz
bell. Ed Shouten has confirmed that the original intent was 800Hz and
changing this was overlooked after the change to -current was made.
This restors that original intent and makes the bell less obnoxious in
the process.

Reviewed by:		des, adrian
Differential Revision:	https://reviews.freebsd.org/D32594
Sponsored by:		Netflix

(cherry picked from commit ba48d52ca6c867559156dd916631f9ac47abe80f)

This change was accidentally reverted in 80f21bb039ce.

(cherry picked from commit 2416be588ea113cc06b924ed85861ed3bc391fe0)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
386BSD provided a MD function sysbeep. This took two arguments (pitch
and period). Pitch was jammed into the PIT's divisor directly (which
means the argument was expected to sound a tone at '1193182 / pitch'
Hz). FreeBSD inherited this interface.

In commit e46598588587 (svn 177642, Mar 26 2008), phk changed this
function to take a tone to sound in hz. He converted all in-tree
instances of 1193182 / hz to just hz (and kept the few misguided folks
that passed hz directly unchanged -- this was part of what motivated the
change). He converted the places where we pre-computed the 8254 divisor
from being pitch to 1193182 / pitch (since that converts the divisor to
the frequency and the interfaces that were exposed to userland exposed
it in these units in places, continuing the tradition inherited from SCO
System V/386 Unix in spots).

In 2009, Ed Shouten was contracted by the FreeBSD Foundation to write /
finish newcons. This work was done in perforce and was imported into
subversion in user/ed/newcons in revision 199072
(https://svnweb.freebsd.org/base?view=revision&amp;revision=199072) which
was later imported into FreeBSD by ray@ (Aleksandr Rybalko).

From that earliest import into svn import to this date, we ring the bell
with:
      sysbeep(1193182 / VT_BELLPITCH, VT_BELLDURATION);
where VT_BELLPITCH was defined to be 800. This results in a bell
frequency of 1491Hz, more or less today. This is similar to the
frequency that syscons and pcvt used (1493Hz and 1500Hz respectively).
This in turn was inherited from 386BSD, it seems, which used the hard
coded value 0x31b which is 795 -&gt; 1500Hz.

This '800' was intended to be the bell tone (eg 800Hz) and this
interface was one that wasn't converted. The most common terminal prior
to the rise of PCs was the VT100, which had an approximately 800Hz
bell. Ed Shouten has confirmed that the original intent was 800Hz and
changing this was overlooked after the change to -current was made.
This restors that original intent and makes the bell less obnoxious in
the process.

Reviewed by:		des, adrian
Differential Revision:	https://reviews.freebsd.org/D32594
Sponsored by:		Netflix

(cherry picked from commit ba48d52ca6c867559156dd916631f9ac47abe80f)

This change was accidentally reverted in 80f21bb039ce.

(cherry picked from commit 2416be588ea113cc06b924ed85861ed3bc391fe0)
</pre>
</div>
</content>
</entry>
<entry>
<title>vt: splash: Use splash screen passed from loader</title>
<updated>2024-07-29T16:37:44+00:00</updated>
<author>
<name>Emmanuel Vadot</name>
<email>manu@FreeBSD.org</email>
</author>
<published>2024-07-09T12:38:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=82829e49e627c17041c7c0dddde58f1f3481e982'/>
<id>82829e49e627c17041c7c0dddde58f1f3481e982</id>
<content type='text'>
If loader(8) gives use a splash screen to use using the MODINFOMD_SPLASH
type, use it if RB_MUTE is set to "YES".
By design only argb data will be displayed.

Differential Revision:	https://reviews.freebsd.org/D45931
Reviewed by:		imp, tsoome
Sponsored by:		Beckhoff Automation GmbH &amp; Co. KG

(cherry picked from commit f6e8b0e85081681100bf9cd74423be02233204bc)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If loader(8) gives use a splash screen to use using the MODINFOMD_SPLASH
type, use it if RB_MUTE is set to "YES".
By design only argb data will be displayed.

Differential Revision:	https://reviews.freebsd.org/D45931
Reviewed by:		imp, tsoome
Sponsored by:		Beckhoff Automation GmbH &amp; Co. KG

(cherry picked from commit f6e8b0e85081681100bf9cd74423be02233204bc)
</pre>
</div>
</content>
</entry>
<entry>
<title>vt: Add vd_bitblt_argb</title>
<updated>2024-07-29T16:37:12+00:00</updated>
<author>
<name>Emmanuel Vadot</name>
<email>manu@FreeBSD.org</email>
</author>
<published>2024-07-09T12:35:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=01215ffec65ae607a0583c564158097b5d56e531'/>
<id>01215ffec65ae607a0583c564158097b5d56e531</id>
<content type='text'>
This blit an ARGB image on the dedicated vd.
This also adds vt_fb_bitblt_argb which will works for most of the vt backends

Differential Revision:	https://reviews.freebsd.org/D45929
Reviewed by:		tsoome
Sponsored by:		Beckhoff Automation GmbH &amp; Co. KG

(cherry picked from commit b93028d8cd3aafc883b5f0ecec65a8a2a30af7f3)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This blit an ARGB image on the dedicated vd.
This also adds vt_fb_bitblt_argb which will works for most of the vt backends

Differential Revision:	https://reviews.freebsd.org/D45929
Reviewed by:		tsoome
Sponsored by:		Beckhoff Automation GmbH &amp; Co. KG

(cherry picked from commit b93028d8cd3aafc883b5f0ecec65a8a2a30af7f3)
</pre>
</div>
</content>
</entry>
<entry>
<title>vt(4): Call post-switch callback after replacing the backend</title>
<updated>2024-02-17T20:58:35+00:00</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2023-11-29T18:34:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a06b366322fe22b211c16c2b0977fac313dce4e7'/>
<id>a06b366322fe22b211c16c2b0977fac313dce4e7</id>
<content type='text'>
[Why]
For instance, it gives a chance to the new backend to refresh the
screen. This is needed by the vt_drmfb backend and `drm_fb_helper`.

This change was lost when I posted changes to reviews.freebsd.org and it
broken the amdgpu driver... Thanks to manu@ for reporting the problem
and wulf@ to find out the missing change!

Tested by:	manu
Reviewed by:	manu
Approved by:	manu
Differential Revision:	https://reviews.freebsd.org/D42834

(cherry picked from commit 40c20fc29cad4d38d9a565e9c7ba78612097308e)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Why]
For instance, it gives a chance to the new backend to refresh the
screen. This is needed by the vt_drmfb backend and `drm_fb_helper`.

This change was lost when I posted changes to reviews.freebsd.org and it
broken the amdgpu driver... Thanks to manu@ for reporting the problem
and wulf@ to find out the missing change!

Tested by:	manu
Reviewed by:	manu
Approved by:	manu
Differential Revision:	https://reviews.freebsd.org/D42834

(cherry picked from commit 40c20fc29cad4d38d9a565e9c7ba78612097308e)
</pre>
</div>
</content>
</entry>
<entry>
<title>vt(4): Always call vt_window_switch() in vtterm_cnungrab()</title>
<updated>2024-02-17T20:58:34+00:00</updated>
<author>
<name>Jean-Sébastien Pédron</name>
<email>dumbbell@FreeBSD.org</email>
</author>
<published>2023-11-24T17:30:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fc00c037797457c4bf7e06c207297bf06cc92f33'/>
<id>fc00c037797457c4bf7e06c207297bf06cc92f33</id>
<content type='text'>
[Why]
This ensures that vtterm_cnungrab() is the mirror of vtterm_cngrab().
And the latter always call vt_window_switch() and thus the backend's
vd_postswitch().

This makes sure that whatever the backend did during vtterm_cngrab(), it
can undo it during vtterm_cnungrab().

Reviewed by:	manu
Approved by:	manu
Differential Revision:	https://reviews.freebsd.org/D42752

(cherry picked from commit f18b3ce0b7be0b24a743ec59077ca8e7929a353c)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Why]
This ensures that vtterm_cnungrab() is the mirror of vtterm_cngrab().
And the latter always call vt_window_switch() and thus the backend's
vd_postswitch().

This makes sure that whatever the backend did during vtterm_cngrab(), it
can undo it during vtterm_cnungrab().

Reviewed by:	manu
Approved by:	manu
Differential Revision:	https://reviews.freebsd.org/D42752

(cherry picked from commit f18b3ce0b7be0b24a743ec59077ca8e7929a353c)
</pre>
</div>
</content>
</entry>
</feed>
