Home | History | Annotate | Download | only in ic
History log of /src/sys/dev/ic/pcdisplay_subr.c
RevisionDateAuthorComments
 1.36  25-Mar-2022  uwe pcdisplay_getwschar: on error return error code, not -1.

This value ends up being returned from vga_ioctl to sys_ioctl which
expects an errno and spams kernel log otherwise.

Ditto for pcdisplay_putwschar.
 1.35  19-Oct-2010  jmcneill When disabling the hardware cursor, use the 'cursor disable' bit in the
cursor start register. I think this only accidentally worked for the past
11 years because the start and end scanlines were both set to 0x10.

See also http://www.osdever.net/FreeVGA/vga/crtcreg.htm#0A
 1.34  19-Oct-2007  ad branches: 1.34.40; 1.34.42;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.33  28-Jul-2007  mjf branches: 1.33.4; 1.33.6; 1.33.10; 1.33.12;
Implement bounds checking in some places in display driver code to avoid
the possibility of a local user panic.
 1.32  15-Apr-2006  jmmv branches: 1.32.12; 1.32.18; 1.32.26; 1.32.28;
Remove the getwschar and putwschar accessops from wsdisplay drivers as
requested by uwe@. These were wrong because they were receiving an
emulcookie yet they were accessops (thus having to receive an accesscookie).
Instead, just handle the WSDISPLAYIO_{GET,PUT}WSCHAR ioctls from the
driver's ioctl accessop.

As this reduces the amount of code needed to handle these operations to
two small functions in each driver, remove the WSDISPLAY_CHARFUNCS kernel
option.

Reviewed by, at least, uwe@ and macallan@. No objections in tech-kern@.
 1.31  12-Apr-2006  jmmv Get rid of the memt and memh local variables in the pcdisplay_{get,put}wschar
functions.
 1.30  12-Apr-2006  jmmv Convert to ANSI prototypes.
 1.29  11-Dec-2005  christos branches: 1.29.4; 1.29.6; 1.29.8; 1.29.10; 1.29.12;
merge ktrace-lwp.
 1.28  27-Feb-2005  perry branches: 1.28.2; 1.28.4; 1.28.12; 1.28.14;
nuke trailing whitespace
 1.27  28-Jul-2004  jmmv branches: 1.27.4; 1.27.6;
Implement support to dynamically change wscons console and kernel colors.

Two new ioctls are added to the wsdisplay device, named WSDISPLAY_GMSGATTRS
and WSDISPLAY_SMSGATTRS, used to retrieve the actual values and set them,
respectively (the name, if you are wondering, comes from "message attributes").

A new emulop is added to the underlying display driver (only vga, for now)
which sets the new attribute for the whole screen, without having to clear
it. This is optional, which means that this also works with other drivers
that don't have this new operation.

Five new kernel options have been added, although only documented in
i386 kernels (for now):
- WSDISPLAY_CUSTOM_OUTPUT, which enables the ioctls described above to
change the colors dynamically from userland. This is enabled by default
in the GENERIC kernel (as well as others) but disabled on all INSTALL*
kernels (as this feature is useless there).
- WS_DEFAULT_COLATTR, WS_DEFAULT_MONOATTR, WS_DEFAULT_BG and WS_DEFAULT_FG,
which specify the default colors for the console at boot time. These have
the same meaning as the (already existing) WS_KERNEL_* variables.

wsconsctl is modified to add msg.default.{attrs,bg,fg} and
msg.kernel.{attrs,bg,fg} to the display part, so that colors can be changed
after boot.

Tested on NetBSD/i386 with vga (and vga in mono mode), and on NetBSD/mac68k.
No objections in tech-kern@.
 1.26  28-May-2004  christos PR/19925: David Ferlier: Add scrolling support to wscons.
 1.25  25-Aug-2002  thorpej branches: 1.25.6; 1.25.8;
Fix some signed/unsigned comparison warnings from GCC 3.3.
 1.24  07-Jul-2002  tron Fix a typo in last commit which caused build failures if
"PCDISPLAY_SOFTCURSOR" is not defined.
 1.23  07-Jul-2002  junyoung Rename vc_ccol and vc_crow in struct pcdisplayscreen to cursorcol
and cursorrow, respectively, to be consistent with other members
in the structure.
 1.22  01-Jul-2002  christos more cleanups from Julio Merino.
 1.21  26-Jun-2002  christos PR/17402: Add wsmoused support by providing get/set char and events.
 1.20  13-Nov-2001  lukem branches: 1.20.8;
add/cleanup RCSID
 1.19  04-Sep-2001  drochner -update a comment wrt the "active screen" flag
-apply the patch from PR kern/13117 (Onno van der Linden) to make the
hardware cursor disappear more thoroughly
-deal with PR kern/13573: hardware cursor too big, but differently:
we have to obey the font size actually used. At this point, fix the
problem that the cursor got messed up by the initialization of
unrelated screens.
 1.18  07-Jul-2001  thorpej branches: 1.18.2;
bcopy -> memcpy
 1.17  05-Jul-2001  thorpej If using the hardware cursor, make sure the cursor shape is initialized,
otherwise we won't be able to see anything if the system firmware has
either not initialized it, or initialized it to "invlisible".
 1.16  08-Jun-2000  cgd branches: 1.16.4;
don't include ISA headers. these have been properly abstracted so that
the ISA headers are unnecessary, and they're used by PCI VGA. There may
not be any ISA at all.
 1.15  26-Jan-2000  ad branches: 1.15.2;
Argh - add initialization that got lost during editing of previous addition.
 1.14  25-Jan-2000  ad Finish with fixing the SOFTCURSOR stuff.
 1.13  12-Jan-2000  ad Make PCDISPLAY_SOFTCURSOR work as it should.
 1.12  05-Jan-2000  ad Add and use pcdisplay_cursor_init(). Still a couple of nits with this, I
will resolve when I can test properly.
 1.11  05-Jan-2000  ad Back out previous. A proper fix will follow.
 1.10  06-Dec-1999  ad If the vga driver isn't present in the kernel and PCDISPLAY_SOFTCURSOR
is set, then pcdisplay_cursor() should disable the hardware cursor first
time it is called.
 1.9  29-Sep-1999  ad branches: 1.9.2; 1.9.8;
PCDISPLAY_SOFTCURSOR: invert foreground too.
 1.8  19-Sep-1999  ad When moving the software cursor on an inactive screen, save character and
attribute from backing store, not display adapter.
 1.7  19-Sep-1999  ad - mc6845's cursor is disabled by punching bit 6 of cursor start register.
- Add new option (PCDISPLAY_SOFTCURSOR) that provides a large, non-blinking
cursor in software.
 1.6  24-Jul-1998  drochner allow the displayed area to start anywhere in display memory,
add a "dispoffset" variable to control this
 1.5  26-Jun-1998  drochner do the charcter mapping in a separate function
 1.4  20-Jun-1998  drochner adapt to wscons changes, treat incoming characters always as ISO
(ie, convert to IBM)
 1.3  17-Jun-1998  drochner do the former at one more place
 1.2  17-Jun-1998  drochner avoid sign extension if a character >=128 is passed
 1.1  28-May-1998  drochner Put definitions and subroutines needed for all PC display adapters
(MGA/GCA and compatibles) into global headers / source files.
Let the VGA driver use them.
 1.9.8.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.15.2.1  22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.16.4.5  27-Aug-2002  nathanw Catch up to -current.
 1.16.4.4  01-Aug-2002  nathanw Catch up to -current.
 1.16.4.3  14-Nov-2001  nathanw Catch up to -current.
 1.16.4.2  21-Sep-2001  nathanw Catch up to -current.
 1.16.4.1  24-Aug-2001  nathanw Catch up with -current.
 1.18.2.3  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.18.2.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.18.2.1  13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.20.8.2  29-Aug-2002  gehenna catch up with -current.
 1.20.8.1  15-Jul-2002  gehenna catch up with -current.
 1.25.8.2  12-Aug-2007  bouyer Pull up following revision(s) (requested by mjf in ticket #11348):
Pull up following revision(s) (requested by mjf in ticket #11348):
sys/dev/ic/pcdisplay_subr.c: revision 1.33 via patch
sys/dev/ic/vga_raster.c: revision 1.29 via patch
sys/dev/ic/vga.c: revision 1.95 via patch
sys/dev/rasops/rasops.c: revision 1.56 via patch
sys/dev/isa/ega.c: revision 1.23 via patch
Implement bounds checking in some places in display driver code to avoid
the possibility of a local user panic.
Set the 'ri' pointer before use.
 1.25.8.1  07-Jun-2004  tron branches: 1.25.8.1.2; 1.25.8.1.4;
Pull up revision 1.26 (requested by recht in ticket #451):
PR/19925: David Ferlier: Add scrolling support to wscons.
 1.25.8.1.4.1  12-Aug-2007  bouyer Pull up following revision(s) (requested by mjf in ticket #11348):
Pull up following revision(s) (requested by mjf in ticket #11348):
sys/dev/ic/pcdisplay_subr.c: revision 1.33 via patch
sys/dev/ic/vga_raster.c: revision 1.29 via patch
sys/dev/ic/vga.c: revision 1.95 via patch
sys/dev/rasops/rasops.c: revision 1.56 via patch
sys/dev/isa/ega.c: revision 1.23 via patch
Implement bounds checking in some places in display driver code to avoid
the possibility of a local user panic.
Set the 'ri' pointer before use.
 1.25.8.1.2.1  11-Aug-2007  bouyer Pull up following revision(s) (requested by mjf in ticket #11348):
sys/dev/ic/pcdisplay_subr.c: revision 1.33 via patch
sys/dev/ic/vga_raster.c: revision 1.29 via patch
sys/dev/ic/vga.c: revision 1.95 via patch
sys/dev/rasops/rasops.c: revision 1.56 via patch
sys/dev/isa/ega.c: revision 1.23 via patch
Implement bounds checking in some places in display driver code to avoid
the possibility of a local user panic.
Set the 'ri' pointer before use.
 1.25.6.4  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.25.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.25.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.25.6.1  03-Aug-2004  skrll Sync with HEAD
 1.27.6.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.27.4.1  29-Apr-2005  kent sync with -current
 1.28.14.1  06-Aug-2007  ghen Pull up following revision(s) (requested by mjf in ticket #1815):
sys/dev/ic/pcdisplay_subr.c: revision 1.33 via patch
sys/dev/ic/vga_raster.c: revision 1.29 via patch
sys/dev/ic/vga.c: revision 1.95 via patch
sys/dev/rasops/rasops.c: revision 1.56 via patch
sys/dev/isa/ega.c: revision 1.23 via patch
Implement bounds checking in some places in display driver code to avoid
the possibility of a local user panic.
Set the 'ri' pointer before use.
 1.28.12.1  06-Aug-2007  ghen Pull up following revision(s) (requested by mjf in ticket #1815):
sys/dev/ic/pcdisplay_subr.c: revision 1.33 via patch
sys/dev/ic/vga_raster.c: revision 1.29 via patch
sys/dev/ic/vga.c: revision 1.95 via patch
sys/dev/rasops/rasops.c: revision 1.56 via patch
sys/dev/isa/ega.c: revision 1.23 via patch
Implement bounds checking in some places in display driver code to avoid
the possibility of a local user panic.
Set the 'ri' pointer before use.
 1.28.4.3  27-Oct-2007  yamt sync with head.
 1.28.4.2  03-Sep-2007  yamt sync with head.
 1.28.4.1  21-Jun-2006  yamt sync with head.
 1.28.2.1  06-Aug-2007  ghen Pull up following revision(s) (requested by mjf in ticket #1815):
sys/dev/ic/pcdisplay_subr.c: revision 1.33 via patch
sys/dev/ic/vga_raster.c: revision 1.29 via patch
sys/dev/ic/vga.c: revision 1.95 via patch
sys/dev/rasops/rasops.c: revision 1.56 via patch
sys/dev/isa/ega.c: revision 1.23 via patch
Implement bounds checking in some places in display driver code to avoid
the possibility of a local user panic.
Set the 'ri' pointer before use.
 1.29.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.29.10.1  19-Apr-2006  elad sync with head.
 1.29.8.1  24-May-2006  yamt sync with head.
 1.29.6.1  22-Apr-2006  simonb Sync with head.
 1.29.4.1  09-Sep-2006  rpaulo sync with head
 1.32.28.1  15-Aug-2007  skrll Sync with HEAD.
 1.32.26.1  03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.32.18.2  23-Oct-2007  ad Sync with head.
 1.32.18.1  20-Aug-2007  ad Sync with HEAD.
 1.32.12.1  30-Jul-2007  liamjfoy Pull up following revision(s) (requested by mjf in ticket #799):
sys/dev/ic/pcdisplay_subr.c: revision 1.33
sys/dev/wscons/wsdisplay_vcons.c: revision 1.12
sys/dev/wscons/wsdisplay_vcons.c: revision 1.13
sys/dev/ic/vga_raster.c: revision 1.29
sys/dev/pci/chipsfb.c: revision 1.10
sys/dev/ic/vga.c: revision 1.95
sys/dev/rasops/rasops.c: revision 1.56
sys/dev/isa/ega.c: revision 1.23
Implement bounds checking in some places in display driver code to avoid
the possibility of a local user panic.
Set the 'ri' pointer before use.
 1.33.12.2  28-Jul-2007  mjf Implement bounds checking in some places in display driver code to avoid
the possibility of a local user panic.
 1.33.12.1  28-Jul-2007  mjf file pcdisplay_subr.c was added on branch matt-mips64 on 2007-07-28 20:28:57 +0000
 1.33.10.1  25-Oct-2007  bouyer Sync with HEAD.
 1.33.6.1  06-Nov-2007  matt sync with HEAD
 1.33.4.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.34.42.1  05-Mar-2011  rmind sync with head
 1.34.40.1  22-Oct-2010  uebayasi Sync with HEAD (-D20101022).

RSS XML Feed