History log of /src/sys/dev/vt/vt_core.c (Results 1 – 25 of 833)
Revision Date Author Comments
# 5fec99ca 17-Jan-2026 Nathaniel Braun <nathaniel.braun@gmail.com>

vt: Fix handling of backtab

PR: 292463
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2002


# d35e369d 05-Feb-2026 Aymeric Wibo <obiwac@FreeBSD.org>

sys/power.h: enum power_sstate_transition

Turn POWER_SLEEP_STATE_* defines into enum power_sstate_transition.

Reviewed by: markj
Approved by: markj
Sponsored by: The FreeBSD Foundation
Differential

sys/power.h: enum power_sstate_transition

Turn POWER_SLEEP_STATE_* defines into enum power_sstate_transition.

Reviewed by: markj
Approved by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52497

show more ...


# 5e1c7867 14-Jan-2026 Quentin Thébault <quentin.thebault@defenso.fr>

vt(4): allow up to _SIG_MAXSIG (128) for VT_SETMODE

VT_SETMODE ioctl currently checks the provided signal numbers with its
own ISSIGVALID macro that uses NSIG (32) as a maximum, although the code
th

vt(4): allow up to _SIG_MAXSIG (128) for VT_SETMODE

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 <quentin.thebault@defenso.fr>
Reviewed by: emaste, imp, kevans
Differential Revision: https://reviews.freebsd.org/D53615

show more ...


# 5198c322 30-Sep-2025 Ed Maste <emaste@FreeBSD.org>

vt: Allow VT_SETMODE with frsig=0

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

vt: Allow VT_SETMODE with frsig=0

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

show more ...


# d6f10a5d 28-Oct-2025 David E. O'Brien <obrien@FreeBSD.org>

random: allow disabling of entropy harvesting from keyboard & mice

Reviewed by: jmg
Sponsored by: Juniper Networks
Differential Revision: https://reviews.freebsd.org/D53390


# fc2ed9d9 06-Oct-2025 Aymeric Wibo <obiwac@FreeBSD.org>

power: Add stype parameter in power_suspend/resume eventhandlers

Add enum sleep_type stype parameter in power_suspend/resume event
handlers, as with the introduction of s2idle there are more than on

power: Add stype parameter in power_suspend/resume eventhandlers

Add enum sleep_type stype parameter in power_suspend/resume event
handlers, as with the introduction of s2idle there are more than one
type of suspend.

Reviewed by: bz
Approved by: bz
Sponsored by: The FreeBSD Foundation

show more ...


# 7cd7b849 22-Jul-2025 Matteo Riondato <matteo@FreeBSD.org>

vt: refer to correct man section.

Signed-off-by: Matteo Riondato <matteo@FreeBSD.org>
Reviewed by: imp,emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/1781


# b72ae900 22-Aug-2024 Ahmad Khalifa <ahmadkhalifa570@gmail.com>

sys: make the kernel metadata pointer global

The way we got the kernel metadata pointer was by calling
preload_search_by_type with one of the following three: "elf kernel",
"elf32 kernel" and "elf64

sys: make the kernel metadata pointer global

The way we got the kernel metadata pointer was by calling
preload_search_by_type with one of the following three: "elf kernel",
"elf32 kernel" and "elf64 kernel". Which one(s) we used wasn't
consistent though. Sometimes we would only try "elf kernel", and other
times we would try one of the latter two if the first failed. However,
the loader only ever sets "elf kernel" as the kernel type.

Now, the kmdp is a global, preload_kmdp, and it's initialized using
preload_initkmdp in machdep.c (or machdep_boot.c on arm/64).
preload_initkmdp takes a single boolean argument that tells us whether
not finding the kmdp is fatal or not.

Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1394

show more ...


# 7749de24 23-Nov-2024 Poul-Henning Kamp <phk@FreeBSD.org>

Add new kern.vt.slow_down tunable.

On a laptop with no other console devices than the screen, things
scroll of the screen faster than eye or camera can capture it.

This tunable slows the console do

Add new kern.vt.slow_down tunable.

On a laptop with no other console devices than the screen, things
scroll of the screen faster than eye or camera can capture it.

This tunable slows the console down and makes it update synchronously,
so console output continues when timers or interrupts do not.

Differential Revision: https://reviews.freebsd.org/D47710

show more ...


# adba3c74 01-Nov-2024 Ed Maste <emaste@FreeBSD.org>

vt: add comments for KDMKTONE ioctl implementation

The KDMKTONE ioctl, introduced in commit 916347f77e6c, is used to beep
the PC speaker. For historical reasons the frequency is specified as an
825

vt: add comments for KDMKTONE ioctl implementation

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

show more ...


# 2416be58 03-Nov-2021 Warner Losh <imp@FreeBSD.org>

vt: Fix frequency calcuation for bell

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 wa

vt: Fix frequency calcuation for bell

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&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 -> 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.

show more ...


# c875e976 14-Oct-2024 Emmanuel Vadot <manu@FreeBSD.org>

vt_splash: Remove debug print

Sponsored by: Beckhoff Automation GmbH & Co. KG


# f6e8b0e8 09-Jul-2024 Emmanuel Vadot <manu@FreeBSD.org>

vt: splash: Use splash screen passed from loader

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 di

vt: splash: Use splash screen passed from loader

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 & Co. KG

show more ...


# 40c20fc2 29-Nov-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

vt(4): Call post-switch callback after replacing the backend

[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

vt(4): Call post-switch callback after replacing the backend

[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

show more ...


# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remov

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix

show more ...


# f18b3ce0 24-Nov-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

vt(4): Always call vt_window_switch() in vtterm_cnungrab()

[Why]
This ensures that vtterm_cnungrab() is the mirror of vtterm_cngrab().
And the latter always call vt_window_switch() and thus the back

vt(4): Always call vt_window_switch() in vtterm_cnungrab()

[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

show more ...


# 16b13bd3 24-Nov-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

vt(4): Call vd_postswitch callback regardless of the current window

[Why]
We want the same behavior at the backend level, regardless if we need to
switch the current window or not.

Reviewed by: man

vt(4): Call vd_postswitch callback regardless of the current window

[Why]
We want the same behavior at the backend level, regardless if we need to
switch the current window or not.

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

show more ...


# 162a2b85 24-Nov-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

vt(4): New bitblt_text variant making a copy before unlocking vt_buf

[Why]
In the DRM drivers and the integration with vt(4), we need to execute
DRM code outside of the vtbuf_lock. The reason is tha

vt(4): New bitblt_text variant making a copy before unlocking vt_buf

[Why]
In the DRM drivers and the integration with vt(4), we need to execute
DRM code outside of the vtbuf_lock. The reason is that this DRM code
acquires locks which can't be acquired when vtbuf_lock, an MTX_SPIN
mutex, is already held.

[How]
A vt(4) backend can now set the `vd_bitblt_after_vtbuf_unlock` flag to
true if it wants to be called outside of vt_buf_lock.

In this case, vt(4) uses an internal version of bitblt_text that uses
the `vd_drawn` arrays, plus a new `vd_pos_to_flush` array, to track
characters to draw/refresh. This internal version then uses the
backend's bitblt_bmp callback to draw the characters after vt_buf has
been unlocked.

Drawing borders and CPU logos is also deferred after the vt_buf lock is
released for the same reason.

We introduce another lock (a default mutex), only used when the
`vd_bitblt_after_vtbuf_unlock` flag is set, to replace part the role of
the vt_buf lock and manage concurrent calls to vt_flush().

The `SC_NO_CONSDRAWN` define is dropped because we now always need the
`vd_drawn` arrays.

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

show more ...


# 24d6f256 24-Nov-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

vt(4): Skip vt_window_switch() for nested panics

[Why]
The same protection was added to vt_flush() in the previous commit. We
want the same one in vt_window_switch(): if e.g. the DRM driver panics
w

vt(4): Skip vt_window_switch() for nested panics

[Why]
The same protection was added to vt_flush() in the previous commit. We
want the same one in vt_window_switch(): if e.g. the DRM driver panics
while handling a call to vt_window_switch(), we don't want to
recursively call vt_window_switch() again and trigger another panic.

Reviewed by: imp, manu
Approved by: imp, manu
Differential Revision: https://reviews.freebsd.org/D42750

show more ...


# 049e3fba 24-Nov-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

vt(4): Skip vt_flush() for nested panics

[Why]
If there is a problem with DRM drivers or in their integration with
vt(4) and displaying something on the console triggers a panic, there is
a high cha

vt(4): Skip vt_flush() for nested panics

[Why]
If there is a problem with DRM drivers or in their integration with
vt(4) and displaying something on the console triggers a panic, there is
a high chance that displaying that panic will trigger another one,
recursively.

[How]
If vt_flush() is called and it detects is is called resursively from
another panic, it return immediately, doing nothing, to avoid the risk
of triggering another panic.

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

show more ...


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


# f2005895 14-Feb-2023 Stefan Eßer <se@FreeBSD.org>

sys/kbio.h: make pre-unicode keymap support optional

FreeBSD-9 had introduced support for the full set of Unicode
characters to the parsing and processing of keymap character tables.

This support h

sys/kbio.h: make pre-unicode keymap support optional

FreeBSD-9 had introduced support for the full set of Unicode
characters to the parsing and processing of keymap character tables.

This support has been extended to cover the table for accented
characters that are reached via dead key combinations in FreeBSD-13.2.

New ioctls have been introduced to support both the pre-Unicode and
the Unicode formats and keyboard drivers have been extended to support
those ioctls.

This commit makes the ABI compatibility functions in the kernel
optional and dependent on COMPAT_FREEBSD13 in -CURRENT.

The kbdcontrol command in -CURRENT and 13-STABLE (before 13.2) has
been made ABI compatible with old kernels to allow a new world to be
run on an old kernel (that does not have full Unicode support for
keymaps).

This commit is not to merged back to 12-STABLE or 13-STABLE. It is
part of review D38465, which has been split into 3 separate commits
due to different MFC and life-time requirements of either commit.

Approved by: imp
Differential Revision: https://reviews.freebsd.org/D38465

show more ...


# 4972fb92 06-Feb-2023 Stefan Eßer <se@FreeBSD.org>

Support Unicode characters in keymap dead key tables

Support for Unicode characters had been added to the keyboard code,
but there are keymaps that have accented characters accessed via dead
key com

Support Unicode characters in keymap dead key tables

Support for Unicode characters had been added to the keyboard code,
but there are keymaps that have accented characters accessed via dead
key combinations, and those were still restricted to 8 bit codes.

This update to kbd.c adds support for Unicode characters and
compatibility code that allows a kbdcontrol command built from kbio.h
without these patches to work on a new kernel.

Compatibility code that allows a new kbdcontrol binary running on an
old kernel to load and display the dead key map will be committed in a
separate commit.

Reviewed by: imp, brooks
Approved by: brooks
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D38381

show more ...


# 29ab1945 14-Jan-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

vt(4): Return errors from `vt_{,de}allocate()`

This is useful to the DRM drivers to let them know if a device is
effectively used by the console.

Reviewed by: manu
Approved by: manu
Differential Re

vt(4): Return errors from `vt_{,de}allocate()`

This is useful to the DRM drivers to let them know if a device is
effectively used by the console.

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

show more ...


12345678910>>...34