History log of /freebsd-current/sys/dev/syscons/scterm-sc.c
Revision Date Author Comments
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

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

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


# 76a0183e 01-Mar-2023 Mateusz Guzik <mjg@FreeBSD.org>

syscons: whack __mips__ leftovers

Sponsored by: Rubicon Communications, LLC ("Netgate")


# d6373808 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

syscons: clean up empty lines in .c and .h files


# 58aa35d4 03-Feb-2020 Warner Losh <imp@FreeBSD.org>

Remove sparc64 kernel support

Remove all sparc64 specific files
Remove all sparc64 ifdefs
Removee indireeect sparc64 ifdefs


# 7d90a522 03-Dec-2019 Ed Maste <emaste@FreeBSD.org>

scterm-sc.c: convert source file to UTF-8 encoding

Most source files are already ASCII or UTF-8 but this one was not previously
converted.


# 9e018513 26-Feb-2019 Bruce Evans <bde@FreeBSD.org>

Attempt to fix build breakage in r344458.

Non-x86 arches use an inconsistently named header for the file containing
"pc" attributes, and the ifdef messes to include the right header were out
of date in the 2 files that I added to the MI files list.

Only amd64, arm, i386, mips, powerpc and sparc64 are supposed to support
syscons. Only arm and mips were out of date in the ifdef. Test
coverage for of syscons in arm is broken (turned off) in NOTES, but
syscons is in some other arm config files which universe detects as broken.
arm64 and riscv remain broken due to the opposite bug of not turning off
sc in NOTES, the same as before r344458 (see r344443).

The header is MD to contain possibly-non-"pc" encodings of attributes, but
since the attributes are essentially virtual in graphics mode and non-x86
arches only support graphics mode, the header has always been the same on
all arches except for different style bugs, so there should be only 1 MI
copy of it for syscons' use. It was used in pcvt and still gives an an
API and an ABI, so it should be public and MI near or in sys/consio.h.


# 19dcee25 21-Feb-2019 Bruce Evans <bde@FreeBSD.org>

Fix the dumb and sc terminal emulators to compile and work.

First remove ifdefs of the unsupported option SC_DUMB_TERMINAL which
prevented building using both in the same kernel and broke regression
tests. This option will be replaced by per-emulator supported options.

The dumb emulator rotted with KSE in r83366, but usually compiled since
it is ifdefed to nothing unless SC_DUMB_TERMINAL is defined. The type
of an unused function parameter changed.

Both emulators rotted when 2 new methods were added while the emulators
were removed. Only null methods are needed, but null function pointers
give panics instead.

The wildcard in the default for the unsupported option SC_DFLT_TERM
never really worked. It tends to prefer the dumb emulator when multiple
emulators are configured. Change it to prefer scteken for compatibility.


# 38a227be 21-Feb-2019 Bruce Evans <bde@FreeBSD.org>

Restore syscons' terminal emulators. The trivial fixes to make them compile
will be committed later.

The "sc" emulator has the advantages of full support for cons25 and running
about 8 times faster than teken (for writing to the frame buffer).

The "dumb" emulator has the advantage of being simple.

Runtime choice of the emulator is good, but compile time choice is bad.


# b4b1c516 01-Jan-2009 Ed Schouten <ed@FreeBSD.org>

Replace syscons terminal renderer by a new renderer that uses libteken.

Some time ago I started working on a library called libteken, which is
terminal emulator. It does not buffer any screen contents, but only
keeps terminal state, such as cursor position, attributes, etc. It
should implement all escape sequences that are implemented by the
cons25 terminal emulator, but also a fair amount of sequences that are
present in VT100 and xterm.

A lot of random notes, which could be of interest to users/developers:

- Even though I'm leaving the terminal type set to `cons25', users can
do experiments with placing `xterm-color' in /etc/ttys. Because we
only implement a subset of features of xterm, this may cause
artifacts. We should consider extending libteken, because in my
opinion xterm is the way to go. Some missing features:

- Keypad application mode (DECKPAM)
- Character sets (SCS)

- libteken is filled with a fair amount of assertions, but unfortunately
we cannot go into the debugger anymore if we fail them. I've done
development of this library almost entirely in userspace. In
sys/dev/syscons/teken there are two applications that can be helpful
when debugging the code:

- teken_demo: a terminal emulator that can be started from a regular
xterm that emulates a terminal using libteken. This application can
be very useful to debug any rendering issues.

- teken_stress: a stress testing application that emulates random
terminal output. libteken has literally survived multiple terabytes
of random input.

- libteken also includes support for UTF-8, but unfortunately our input
layer and font renderer don't support this. If users want to
experiment with UTF-8 support, they can enable `TEKEN_UTF8' in
teken.h. If you recompile your kernel or the teken_demo application,
you can hold some nice experiments.

- I've left PC98 the way it is right now. The PC98 platform has a custom
syscons renderer, which supports some form of localised input. Maybe
we should port PC98 to libteken by the time syscons supports UTF-8?

- I've removed the `dumb' terminal emulator. It has been broken for
years. It hasn't survived the `struct proc' -> `struct thread'
conversion.

- To prevent confusion among people that want to hack on libteken:
unlike syscons, the state machines that parse the escape sequences are
machine generated. This means that if you want to add new escape
sequences, you have to add an entry to the `sequences' file. This will
cause new entries to be added to `teken_state.h'.

- Any rendering artifacts that didn't occur prior to this commit are by
accident. They should be reported to me, so I can fix them.

Discussed on: current@, hackers@
Discussed with: philip (at 25C3)


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# bc093719 20-Aug-2008 Ed Schouten <ed@FreeBSD.org>

Integrate the new MPSAFE TTY layer to the FreeBSD operating system.

The last half year I've been working on a replacement TTY layer for the
FreeBSD kernel. The new TTY layer was designed to improve the following:

- Improved driver model:

The old TTY layer has a driver model that is not abstract enough to
make it friendly to use. A good example is the output path, where the
device drivers directly access the output buffers. This means that an
in-kernel PPP implementation must always convert network buffers into
TTY buffers.

If a PPP implementation would be built on top of the new TTY layer
(still needs a hooks layer, though), it would allow the PPP
implementation to directly hand the data to the TTY driver.

- Improved hotplugging:

With the old TTY layer, it isn't entirely safe to destroy TTY's from
the system. This implementation has a two-step destructing design,
where the driver first abandons the TTY. After all threads have left
the TTY, the TTY layer calls a routine in the driver, which can be
used to free resources (unit numbers, etc).

The pts(4) driver also implements this feature, which means
posix_openpt() will now return PTY's that are created on the fly.

- Improved performance:

One of the major improvements is the per-TTY mutex, which is expected
to improve scalability when compared to the old Giant locking.
Another change is the unbuffered copying to userspace, which is both
used on TTY device nodes and PTY masters.

Upgrading should be quite straightforward. Unlike previous versions,
existing kernel configuration files do not need to be changed, except
when they reference device drivers that are listed in UPDATING.

Obtained from: //depot/projects/mpsafetty/...
Approved by: philip (ex-mentor)
Discussed: on the lists, at BSDCan, at the DevSummit
Sponsored by: Snow B.V., the Netherlands
dcons(4) fixed by: kan


# 73dbd3da 11-May-2006 John Baldwin <jhb@FreeBSD.org>

Remove various bits of conditional Alpha code and fixup a few comments.


# f4e98881 03-Dec-2005 Ruslan Ermilov <ru@FreeBSD.org>

Fix -Wundef.


# fe12f24b 30-May-2004 Poul-Henning Kamp <phk@FreeBSD.org>

Add missing <sys/module.h> includes


# a2dce78a 20-Jan-2004 Peter Grehan <grehan@FreeBSD.org>

__powerpc__ conditional code for the syscons OpenFirmware/PPC framebuffer.
Took the opportunity to reduce

__i386__ || __ia64__ || __amd64__ || __sparc64__ || __powerpc__

to

!__alpha__

reviewed by: gallatin


# 42af95a3 24-Aug-2003 David E. O'Brien <obrien@FreeBSD.org>

Use __FBSDID().
Also some minor style cleanups.


# 8b9698b7 23-Aug-2003 Jake Burkholder <jake@FreeBSD.org>

Add sparc64 ifdefs.


# b40ce416 12-Sep-2001 Julian Elischer <julian@FreeBSD.org>

KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after: ha ha ha ha


# 4866e276 02-Aug-2001 Kazutaka YOKOTA <yokota@FreeBSD.org>

Refine cursor type/shape control escape sequences and
ioctls. We can now add ve, vi and vs capabilities to
cons25 in termcap.

Discussed with and tested by: ache


# 266aa942 28-May-2001 Poul-Henning Kamp <phk@FreeBSD.org>

Make the beep duration independent of HZ.

PR: 25201
Submitted by: Akio Morita amorita@meadow.scphys.kyoto-u.ac.jp
MFC after: 1 week


# cf0a305e 06-Mar-2001 John Baldwin <jhb@FreeBSD.org>

Indent the comment about the Alpha palette evilness correctly.

Noticed by: bde


# 32929202 05-Mar-2001 John Baldwin <jhb@FreeBSD.org>

The SRM console gets the red and blue attributes backwards in the VGA
palette. As a result, the colors on the video console can look rather
weird. For example, sysinstall on the alpha has a read background. We
can work around this partially by remapping the colors used by syscons for
the ANSI color escape sequences. Note that screen savers and anything that
sets the colors explicitly will still get incorrect colors, but programs
such as sysinstall will now use the correct colors. A more correct fix
would be to actually fix the VGA palette on boot by either swapping all
the red and blue attributes or by hardcoding a standard palette and
overwriting the entire palette.

Requested by: gallatin
Obtained from: NetBSD


# 6e424f2e 21-Jul-2000 Andrey A. Chernov <ache@FreeBSD.org>

Make Reset (ESC c) reset attributes too, not only clear screen


# 91de5914 20-Jul-2000 Andrey A. Chernov <ache@FreeBSD.org>

Implement SGR 22,24,25,27 from ECMA-48


# 598cad91 20-Jul-2000 Andrey A. Chernov <ache@FreeBSD.org>

Accorfing to ECMA-48 SGR 39 and 49 are just another colors and must not reset
other attrs, so reset only bold on 39


# 40b37694 15-Jul-2000 Andrey A. Chernov <ache@FreeBSD.org>

Shorten 49m attr resetting expression


# 7e1eea48 15-Jul-2000 Andrey A. Chernov <ache@FreeBSD.org>

Reset corresponding color attributes on 39m and 49m
Unify comments related to color


# 4d9a01eb 05-Jun-2000 Andrey A. Chernov <ache@FreeBSD.org>

Cosmetique: fix comments - don't use 'ansi' word for non-ansi (adapter) colors


# f9641ac4 05-Jun-2000 Andrey A. Chernov <ache@FreeBSD.org>

Implement ANSI E[39m and E[49m to set fg and bg to initial (not to default!)
values. E[x is bad because set them to default values and should be used only
in reset sequence.


# 2886c994 20-Mar-2000 Kazutaka YOKOTA <yokota@FreeBSD.org>

White-space-only change. The file originally had screwed indentation.


# 40de16e3 10-Feb-2000 Kazutaka YOKOTA <yokota@FreeBSD.org>

- Don't reset text colors when changing the video mode.

Approved by: jkh


# ade23072 10-Feb-2000 Kazutaka YOKOTA <yokota@FreeBSD.org>

- Fix text cursor logic so that multiple instances of the "normal" cursor
won't appear on the screen, and "blinking" and "destructive" cursor
won't appear in the vty for which the text cursor is currently hidden.

Approved by: jkh


# 8f8e5879 29-Jan-2000 Peter Wemm <peter@FreeBSD.org>

Use config's conditional compilation rather than using #ifdefs that make
modular compilation harder. I'm doing this because people seem to like
cut/pasting examples of bad practices in existing code.


# 2b944ee2 15-Jan-2000 Kazutaka YOKOTA <yokota@FreeBSD.org>

This is the 3rd stage of syscons code reorganization.

- Split terminal emulation code from the main part of the driver so
that we can have alternative terminal emulator modules if we like in
the future. (We are not quite there yet, though.)

- Put sysmouse related code in a separate file, thus, simplifying the
main part of the driver.

As some files are added to the source tree, you need to run config(8)
before you compile a new kernel next time.

You shouldn't see any functional change by this commit; this is only
internal code reorganization.