aboutsummaryrefslogtreecommitdiff
path: root/sys/isa/syscons_isa.c
Commit message (Collapse)AuthorAgeFilesLines
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | 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
* isa: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-061-3/+1
|
* sc: Use devclass_find to lookup the sc devclass.John Baldwin2022-04-211-4/+7
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D35007
* sc(4) md bits: stop setting sc->kbd entirelyKyle Evans2019-12-301-1/+0
| | | | | | | | The machdep parts no longer need to touch keyboard parts after r356043; sc->kbd will be 0-initialized and this works as expected. Notes: svn path=/head/; revision=356196
* syscons: drop keyboard index from softcKyle Evans2019-12-231-1/+1
| | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=356043
* sys: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326272
* Remove i386 XBOX support.Konstantin Belousov2017-11-161-19/+0
| | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=325892
* Use better hard-coded defaults for the cursor shape, and remove nearbyBruce Evans2017-08-191-6/+0
| | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=322705
* Move VT switching hack for suspend/resume from bus drivers to syscons.cJung-uk Kim2011-05-091-127/+0
| | | | | | | | | using event handlers. A different version was Submitted by: Taku YAMAMOTO (taku at tackymt dot homeip dot net) Notes: svn path=/head/; revision=221708
* When we are not switching VTs, just mark all buffer to be updated.Jung-uk Kim2010-07-151-1/+7
| | | | Notes: svn path=/head/; revision=210149
* Do not attempt to switch to the same VTs between suspend and resume.Jung-uk Kim2010-05-261-9/+11
| | | | Notes: svn path=/head/; revision=208567
* Let the first device suspend and the last device resume syscons(4).Jung-uk Kim2010-05-261-10/+5
| | | | Notes: svn path=/head/; revision=208564
* Fix more style(9) nits that I missed in the previous commit.Jung-uk Kim2010-05-221-5/+4
| | | | Notes: svn path=/head/; revision=208413
* Fix style(9) nits.Jung-uk Kim2010-05-221-36/+39
| | | | Notes: svn path=/head/; revision=208412
* Suspend screen updates when the video controller is powered down.Jung-uk Kim2010-05-221-15/+86
| | | | Notes: svn path=/head/; revision=208411
* Allow syscons to work on amd64 and i386 without any hints:John Baldwin2009-03-051-3/+7
| | | | | | | | | | | - 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 Notes: svn path=/head/; revision=189421
* Further cleanup of sound generation in syscons:Poul-Henning Kamp2008-03-261-9/+1
| | | | | | | | | | | The timer_spkr_*() functions take care of the enabling/disabling of the speaker. Test on the existence of timer_spkr_*() functions, rather than architectures. Notes: svn path=/head/; revision=177650
* The "free-lance" timer in the i8254 is only used for the speakerPoul-Henning Kamp2008-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]. Notes: svn path=/head/; revision=177642
* Rename timer0_max_count to i8254_max_count.Poul-Henning Kamp2008-03-261-1/+1
| | | | | | | | 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. Notes: svn path=/head/; revision=177631
* Use pause() rather than tsleep() on explicit global dummy variables.John Baldwin2007-02-271-2/+1
| | | | Notes: svn path=/head/; revision=167085
* Committed the xbox syscons(8)-able console driver.Rink Springer2006-03-031-0/+19
| | | | | | | | Reviewed by: arch@ (no comments) Approved by: imp (mentor) Notes: svn path=/head/; revision=156243
* - Move timerreg.h to <arch>/include and split i8253 specific defines intoYoshihiro Takahashi2005-05-141-12/+7
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=146211
* Converge towards i386. I originally resisted creating <machine/pc/bios.h>Peter Wemm2004-09-241-8/+7
| | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=135690
* Remove atdevbase and replace it's remaining uses with direct references toJohn Baldwin2004-06-101-0/+1
| | | | | | | KERNBASE instead. Notes: svn path=/head/; revision=130312
* Fix a panic that occurs when resuming. For some reason, sc->cur_scp isNate Lawson2003-10-291-0/+4
| | | | | | | | | NULL. Submitted by: Andrew Thompson <andy@fud.org.nz> Notes: svn path=/head/; revision=121704
* - Use the new resource_disabled() helper function to see if devices areJohn Baldwin2003-07-021-3/+1
| | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=117167
* Use __FBSDID().David E. O'Brien2003-06-111-2/+3
| | | | Notes: svn path=/head/; revision=116181
* Make the SC_NO_SUSPEND_VTYSWITCH kernel option available as a loaderMatthew N. Dodd2003-01-151-9/+19
| | | | | | | tunable and sysctl (hw.syscons.sc_no_suspend_vtswitch). Notes: svn path=/head/; revision=109279
* Fix compile with options SC_NO_SUSPEND_VTYSWITCH.John Baldwin2002-10-171-0/+2
| | | | Notes: svn path=/head/; revision=105333
* Add new syscons option SC_NO_SUSPEND_VTYSWITCH.Mitsuru IWASAKI2002-10-171-0/+4
| | | | | | | This disables vty switch during suspend/resume. Notes: svn path=/head/; revision=105312
* Add suspend/resume method to syscons. This switch the modeMitsuru IWASAKI2002-08-251-0/+35
| | | | | | | | (text <-> graphics) by changing current vty during ACPI sleep/wakeup (maybe APM also). Notes: svn path=/head/; revision=102418
* Remove the resume method. It is not necessary any more, becauseKazutaka YOKOTA2001-06-301-7/+0
| | | | | | | | keyboard drivers have it now... MFC after: 4 weeks Notes: svn path=/head/; revision=79023
* Fix warning:Peter Wemm2001-06-151-1/+1
| | | | | | | 163: passing arg 4 of `resource_string_value' from incompatible pointer type Notes: svn path=/head/; revision=78262
* Initiate deorbit burn sequence for <machine/console.h>.Poul-Henning Kamp2000-10-081-1/+2
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=66834
* Add device_identify methods so that we do not need thePeter Wemm2000-06-281-17/+20
| | | | | | | | hint.sc.0.at=isa and hint.vga.0.at=isa hints in order for these to probe/attach. Notes: svn path=/head/; revision=62225
* This is a temporary bandaid to get vidconsole working again withoutPeter Wemm2000-06-151-4/+5
| | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=61704
* - Fix SC_ALT_MOUSE_IMAGE; don't blink the mouse cursor.Kazutaka YOKOTA2000-03-311-0/+1
| | | | | | | - Fix non-destructive, underline text cursor. Notes: svn path=/head/; revision=58872
* Use config's conditional compilation rather than using #ifdefs that makePeter Wemm2000-01-291-6/+3
| | | | | | | | modular compilation harder. I'm doing this because people seem to like cut/pasting examples of bad practices in existing code. Notes: svn path=/head/; revision=56836
* Make the mouse cursor char code configurable via the CONS_MOUSECTLKazutaka YOKOTA2000-01-121-9/+9
| | | | | | | | | ioctl. By popular demand. Notes: svn path=/head/; revision=55849
* Change isa_get/set_flags() to device_get/set_flags().Doug Rabson1999-09-071-2/+2
| | | | Notes: svn path=/head/; revision=51052
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Merge the cons.c and cons.h to the best of my ability. alpha may orPoul-Henning Kamp1999-08-091-2/+2
| | | | | | | may not compile, I can't test it. Notes: svn path=/head/; revision=49558
* Declare the correct size of softc and fix sc_get_softc().Kazutaka YOKOTA1999-06-241-4/+4
| | | | Notes: svn path=/head/; revision=48183
* The second phase of syscons reorganization.Kazutaka YOKOTA1999-06-221-5/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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. Notes: svn path=/head/; revision=48104
* No support for pnp yet.Doug Rabson1999-05-301-1/+5
| | | | Notes: svn path=/head/; revision=47618
* Move the declaration of the interrupt type from the driver structureDoug Rabson1999-05-081-2/+1
| | | | | | | to the BUS_SETUP_INTR call. Notes: svn path=/head/; revision=46743
* Bring the 'new-bus' to the i386. This extensively changes the way thePeter Wemm1999-04-161-1/+4
| | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=45720
* Update the alpha port to use the new syscons.Doug Rabson1999-01-231-0/+80
Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> (partly) Notes: svn path=/head/; revision=43105