History log of /freebsd-current/sys/isa/syscons_isa.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/


# 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 BSD-2-Clause.

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


# be275086 06-May-2022 John Baldwin <jhb@FreeBSD.org>

isa: Remove unused devclass arguments to DRIVER_MODULE.


# 6b06f746 21-Apr-2022 John Baldwin <jhb@FreeBSD.org>

sc: Use devclass_find to lookup the sc devclass.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D35007


# 06b367b2 29-Dec-2019 Kyle Evans <kevans@FreeBSD.org>

sc(4) md bits: stop setting sc->kbd entirely

The machdep parts no longer need to touch keyboard parts after r356043;
sc->kbd will be 0-initialized and this works as expected.


# 3322036e 23-Dec-2019 Kyle Evans <kevans@FreeBSD.org>

syscons: drop keyboard index from softc

Analysis seems to reveal that sc->keyboard >= 0 implies sc->kbd != NULL and
there's no such scenario where sc->kbd is set (and theoretically used to
rebuild sc->keyboard) with the keyboard unavailable.

Drop the index softc. The index is only explicitly needed in few places, in
which case we can just as easily grab it from sc->kbd. There's no need for
keeping sc->kbd and sc->keyboard in sync when it can be readily accomplished
with just the former.


# fe267a55 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.


# 4e421792 16-Nov-2017 Konstantin Belousov <kib@FreeBSD.org>

Remove i386 XBOX support.

It is for console presented at 2001 and featuring Pentium III
processor. Even if any of them are still alive and run FreeBSD, we do
not have any sign of life from their users. While removing another
dozens of #ifdefs from the i386 sources reduces the aversion from
looking at the code and improves the platform vitality.

Reviewed by: cem, pfg, rink (XBOX support author)
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D13016


# 7692d200 19-Aug-2017 Bruce Evans <bde@FreeBSD.org>

Use better hard-coded defaults for the cursor shape, and remove nearby
redundant initializations.

Hard-code base = 0, height = (approx. 1/8 of the boot-time font height)
in all cases, and remove the BIOS/MD support for setting these values.
This asks for an underline cursor sized for the boot-time font instead
of various less hard-coded but worse values. I used that think that
the x86 BIOS always gave the same values as the above hard-coding, but
on 1 of my systems it gives the wrong value of base = 1.

The remaining BIOS fields are shift_state and bell_pitch. These are now
consistently not explicitly reinitialized to 0. All sc_get_bios_value()
functions except x86's are now empty, and the only useful thing that x86
returns is shift_state. This really belongs in atkbdc, but heavier
use of the BIOS to read the more useful typematic rate has been removed
there. fb still makes much heavier use of the BIOS.


# b10c3d1c 09-May-2011 Jung-uk Kim <jkim@FreeBSD.org>

Move VT switching hack for suspend/resume from bus drivers to syscons.c
using event handlers. A different version was

Submitted by: Taku YAMAMOTO (taku at tackymt dot homeip dot net)


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 6b0dfd28 15-Jul-2010 Jung-uk Kim <jkim@FreeBSD.org>

When we are not switching VTs, just mark all buffer to be updated.


# 55e1b133 26-May-2010 Jung-uk Kim <jkim@FreeBSD.org>

Do not attempt to switch to the same VTs between suspend and resume.


# cb881f8f 26-May-2010 Jung-uk Kim <jkim@FreeBSD.org>

Let the first device suspend and the last device resume syscons(4).


# fa091a48 22-May-2010 Jung-uk Kim <jkim@FreeBSD.org>

Fix more style(9) nits that I missed in the previous commit.


# b4f9625a 22-May-2010 Jung-uk Kim <jkim@FreeBSD.org>

Fix style(9) nits.


# dd962f5b 22-May-2010 Jung-uk Kim <jkim@FreeBSD.org>

Suspend screen updates when the video controller is powered down.


# b5b361cb 05-Mar-2009 John Baldwin <jhb@FreeBSD.org>

Allow syscons to work on amd64 and i386 without any hints:
- Enable keyboard autodetection by default for ISA syscons attachments.
- If there are no syscons hints at all, assume there is a single sc0 device
anyway. The console probe will still fail unless a VGA adapter is found.

MFC after: 2 weeks


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

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


# 1d73a9dc 26-Mar-2008 Poul-Henning Kamp <phk@FreeBSD.org>

Further cleanup of sound generation in syscons:

The timer_spkr_*() functions take care of the enabling/disabling
of the speaker.

Test on the existence of timer_spkr_*() functions, rather than
architectures.


# e4659858 26-Mar-2008 Poul-Henning Kamp <phk@FreeBSD.org>

The "free-lance" timer in the i8254 is only used for the speaker
these days, so de-generalize the acquire_timer/release_timer api
to just deal with speakers.

The new (optional) MD functions are:
timer_spkr_acquire()
timer_spkr_release()
and
timer_spkr_setfreq()

the last of which configures the timer to generate a tone of a given
frequency, in Hz instead of 1/1193182th of seconds.

Drop entirely timer2 on pc98, it is not used anywhere at all.

Move sysbeep() to kern/tty_cons.c and use the timer_spkr*() if
they exist, and do nothing otherwise.

Remove prototypes and empty acquire-/release-timer() and sysbeep()
functions from the non-beeping archs.

This eliminate the need for the speaker driver to know about
i8254frequency at all. In theory this makes the speaker driver MI,
contingent on the timer_spkr_*() functions existing but the driver
does not know this yet and still attaches to the ISA bus.

Syscons is more tricky, in one function, sc_tone(), it knows the hz
and things are just fine.

In the other function, sc_bell() it seems to get the period from
the KDMKTONE ioctl in terms if 1/1193182th second, so we hardcode
the 1193182 and leave it at that. It's probably not important.

Change a few other sysbeep() uses which obviously knew that the
argument was in terms of i8254 frequency, and leave alone those
that look like people thought sysbeep() took frequency in hertz.

This eliminates the knowledge of i8254_freq from all but the actual
clock.c code and the prof_machdep.c on amd64 and i386, where I think
it would be smart to ask for help from the timecounters anyway [TBD].


# ebfbcd61 26-Mar-2008 Poul-Henning Kamp <phk@FreeBSD.org>

Rename timer0_max_count to i8254_max_count.
Rename timer0_real_max_count to i8254_real_max_count and make it static.
Rename timer_freq to i8254_freq and make it a loader tunable.


# 84d37a46 27-Feb-2007 John Baldwin <jhb@FreeBSD.org>

Use pause() rather than tsleep() on explicit global dummy variables.


# 5fa7c51f 03-Mar-2006 Rink Springer <rink@FreeBSD.org>

Committed the xbox syscons(8)-able console driver.

Reviewed by: arch@ (no comments)
Approved by: imp (mentor)


# 24072ca3 14-May-2005 Yoshihiro Takahashi <nyan@FreeBSD.org>

- Move timerreg.h to <arch>/include and split i8253 specific defines into
i8253reg.h, and add some defines to control a speaker.
- Move PPI related defines from i386/isa/spkr.c into ppireg.h and use them.
- Move IO_{PPI,TIMER} defines into ppireg.h and timerreg.h respectively.
- Use isa/isareg.h rather than <arch>/isa/isa.h.

Tested on: i386, pc98


# 21691935 23-Sep-2004 Peter Wemm <peter@FreeBSD.org>

Converge towards i386. I originally resisted creating <machine/pc/bios.h>
because it was mostly irrelevant - except for the silly BIOS_PADDRTOVADDR
etc macros. Along the way of working around this, I missed a few things.

* Make syscons properly inherit the bios capslock/shiftlock/etc state like
i386 does. Note that we cannot inherit the bios key repeat rate because
that requires a bios call (which is impossible for us).
* Give syscons the ability to beep on amd64. Oops.

While here, make bios.c compile and add it to files.amd64.


# 092a5c45 10-Jun-2004 John Baldwin <jhb@FreeBSD.org>

Remove atdevbase and replace it's remaining uses with direct references to
KERNBASE instead.


# e8c321c9 29-Oct-2003 Nate Lawson <njl@FreeBSD.org>

Fix a panic that occurs when resuming. For some reason, sc->cur_scp is
NULL.

Submitted by: Andrew Thompson <andy@fud.org.nz>


# 8a9bc9c0 02-Jul-2003 John Baldwin <jhb@FreeBSD.org>

- Use the new resource_disabled() helper function to see if devices are
disabled.
- Change the apm driver to match the acpi driver's behavior by checking to
see if the device is disabled in the identify routine instead of in the
probe routine. This way if the device is disabled it is never created.

Note that a few places (ips(4), Alpha SMP) used "disable" instead of
"disabled" for their hint names, and these hints must be changed to
"disabled". If this is a big problem, resource_disabled() can always be
changed to honor both names.


# 8c9bbf48 10-Jun-2003 David E. O'Brien <obrien@FreeBSD.org>

Use __FBSDID().


# dcb65c59 14-Jan-2003 Matthew N. Dodd <mdodd@FreeBSD.org>

Make the SC_NO_SUSPEND_VTYSWITCH kernel option available as a loader
tunable and sysctl (hw.syscons.sc_no_suspend_vtswitch).


# fbfed1cf 17-Oct-2002 John Baldwin <jhb@FreeBSD.org>

Fix compile with options SC_NO_SUSPEND_VTYSWITCH.


# c42946c4 17-Oct-2002 Mitsuru IWASAKI <iwasaki@FreeBSD.org>

Add new syscons option SC_NO_SUSPEND_VTYSWITCH.
This disables vty switch during suspend/resume.


# 9c4d34df 25-Aug-2002 Mitsuru IWASAKI <iwasaki@FreeBSD.org>

Add suspend/resume method to syscons. This switch the mode
(text <-> graphics) by changing current vty during ACPI
sleep/wakeup (maybe APM also).


# fa783074 30-Jun-2001 Kazutaka YOKOTA <yokota@FreeBSD.org>

Remove the resume method. It is not necessary any more, because
keyboard drivers have it now...
MFC after: 4 weeks


# c864c67b 15-Jun-2001 Peter Wemm <peter@FreeBSD.org>

Fix warning:
163: passing arg 4 of `resource_string_value' from incompatible pointer type


# 00d25f51 08-Oct-2000 Poul-Henning Kamp <phk@FreeBSD.org>

Initiate deorbit burn sequence for <machine/console.h>.

Replace all in-tree uses with necessary subset of <sys/{fb,kb,cons}io.h>.
This is also the appropriate fix for exo-tree sources.

Put warnings in <machine/console.h> to discourage use.
November 15th 2000 the warnings will be converted to errors.
January 15th 2001 the <machine/console.h> files will be removed.


# c20ac811 28-Jun-2000 Peter Wemm <peter@FreeBSD.org>

Add device_identify methods so that we do not need the
hint.sc.0.at=isa and hint.vga.0.at=isa hints in order for these to
probe/attach.


# 81e3fd99 15-Jun-2000 Peter Wemm <peter@FreeBSD.org>

This is a temporary bandaid to get vidconsole working again without
options USERCONFIG being present. Due to the lack of early boot hints
neither sio or sc would succeed the console probe. If USERCONFIG was
active, there was a second cninit() after userconfig had run and that
happened to make the console selection work. If you left out USERCONFIG,
you would end up with no console at all. :-(

This needs a proper fix, especially when sc looses the "at isa" hint.
But for now, this works.


# 09132359 31-Mar-2000 Kazutaka YOKOTA <yokota@FreeBSD.org>

- Fix SC_ALT_MOUSE_IMAGE; don't blink the mouse cursor.
- Fix non-destructive, underline text cursor.


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


# e2f29c6e 11-Jan-2000 Kazutaka YOKOTA <yokota@FreeBSD.org>

Make the mouse cursor char code configurable via the CONS_MOUSECTL
ioctl.

By popular demand.


# 062acdb7 07-Sep-1999 Doug Rabson <dfr@FreeBSD.org>

Change isa_get/set_flags() to device_get/set_flags().


# c3aac50f 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# ce9edcf5 09-Aug-1999 Poul-Henning Kamp <phk@FreeBSD.org>

Merge the cons.c and cons.h to the best of my ability. alpha may or
may not compile, I can't test it.


# ffc1d9bd 24-Jun-1999 Kazutaka YOKOTA <yokota@FreeBSD.org>

Declare the correct size of softc and fix sc_get_softc().


# 6e8394b8 22-Jun-1999 Kazutaka YOKOTA <yokota@FreeBSD.org>

The second phase of syscons reorganization.

- Split syscons source code into manageable chunks and reorganize
some of complicated functions.

- Many static variables are moved to the softc structure.

- Added a new key function, PREV. When this key is pressed, the vty
immediately before the current vty will become foreground. Analogue
to PREV, which is usually assigned to the PrntScrn key.
PR: kern/10113
Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>

- Modified the kernel console input function sccngetc() so that it
handles function keys properly.

- Reorganized the screen update routine.

- VT switching code is reorganized. It now should be slightly more
robust than before.

- Added the DEVICE_RESUME function so that syscons no longer hooks the
APM resume event directly.

- New kernel configuration options: SC_NO_CUTPASTE, SC_NO_FONT_LOADING,
SC_NO_HISTORY and SC_NO_SYSMOUSE.
Various parts of syscons can be omitted so that the kernel size is
reduced.

SC_PIXEL_MODE
Made the VESA 800x600 mode an option, rather than a standard part of
syscons.

SC_DISABLE_DDBKEY
Disables the `debug' key combination.

SC_ALT_MOUSE_IMAGE
Inverse the character cell at the mouse cursor position in the text
console, rather than drawing an arrow on the screen.
Submitted by: Nick Hibma (n_hibma@FreeBSD.ORG)

SC_DFLT_FONT
makeoptions "SC_DFLT_FONT=_font_name_"
Include the named font as the default font of syscons. 16-line,
14-line and 8-line font data will be compiled in. This option replaces
the existing STD8X16FONT option, which loads 16-line font data only.

- The VGA driver is split into /sys/dev/fb/vga.c and /sys/isa/vga_isa.c.

- The video driver provides a set of ioctl commands to manipulate the
frame buffer.

- New kernel configuration option: VGA_WIDTH90
Enables 90 column modes: 90x25, 90x30, 90x43, 90x50, 90x60. These
modes are mot always supported by the video card.
PR: i386/7510
Submitted by: kbyanc@freedomnet.com and alexv@sui.gda.itesm.mx.

- The header file machine/console.h is reorganized; its contents is now
split into sys/fbio.h, sys/kbio.h (a new file) and sys/consio.h
(another new file). machine/console.h is still maintained for
compatibility reasons.

- Kernel console selection/installation routines are fixed and
slightly rebumped so that it should now be possible to switch between
the interanl kernel console (sc or vt) and a remote kernel console
(sio) again, as it was in 2.x, 3.0 and 3.1.

- Screen savers and splash screen decoders
Because of the header file reorganization described above, screen
savers and splash screen decoders are slightly modified. After this
update, /sys/modules/syscons/saver.h is no longer necessary and is
removed.


# f7f2df54 30-May-1999 Doug Rabson <dfr@FreeBSD.org>

No support for pnp yet.


# 566643e3 08-May-1999 Doug Rabson <dfr@FreeBSD.org>

Move the declaration of the interrupt type from the driver structure
to the BUS_SETUP_INTR call.


# 6182fdbd 16-Apr-1999 Peter Wemm <peter@FreeBSD.org>

Bring the 'new-bus' to the i386. This extensively changes the way the
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition. eisa, isapnp and pccard* are
not yet using the new resource manager. Once fully converted, all drivers
will be loadable, including PCI and ISA.

(Some other changes appear to have snuck in, including a port of Soren's
ATA driver to the Alpha. Soren, back this out if you need to.)

This is a checkpoint of work-in-progress, but is quite functional.

The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.

Approved by: core


# 8a997770 23-Jan-1999 Doug Rabson <dfr@FreeBSD.org>

Update the alpha port to use the new syscons.

Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> (partly)