Commit Graph

123 Commits

Author SHA1 Message Date
nwhitehorn
6e141e7c5b No EFI on i386. This unbreaks the i386 VT kernel build. 2014-04-27 20:36:19 +00:00
nwhitehorn
a1630fad26 Increase the maximum framebuffer size to more reasonable values reflecting
the high-resolution boot consoles present on Open Firmware and EFI systems.
2014-04-27 02:20:51 +00:00
nwhitehorn
9f4d9da1e7 Disable vga if EFI framebuffer present. vt(9) should handle this internally
based on efifb's higher priority, but it doesn't, and this at least lets
us build a kernel that boots on both BIOS and EFI systems for now.
2014-04-27 02:19:53 +00:00
ray
aceeb16d13 Update to fix at r264244.
o Unmute terminal when done with driver replacement.
o Move init fonts to early point.
o Minor cleanup.

MFC after:	6 days
X-MFC-with:	r264244 r264242
Sponsored by:	The FreeBSD Foundation
2014-04-08 14:18:39 +00:00
ray
d42cbcb075 Fix cursor color in reverse video mode.
PR:		kern/188196
Submitted by:	Claude Buisson <clbuisson@orange.fr> (original version)
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2014-04-08 14:14:25 +00:00
ray
a024a44936 Fix panic on load new driver while vt(4) is in VGA textmode.
o Mute terminal while vt(4) driver change in progress.
o Reset VDF_TEXTMODE before init new driver.
o Assign default font, if new driver is not in TEXTMODE.
o Do not update screen while driver changing.

Resolved by:	adrian
Reported by:	tyler
MFC after:	7 days
Sponsored by:	The FreeBSD Foundation
2014-04-07 22:49:41 +00:00
rpaulo
bde4329af1 Need to include machine/fdt.h. 2014-04-05 23:20:49 +00:00
ray
e6a9754cb8 o Add new vd_driver method to do bitblt with mask, named vd_maskbitbltchr.
o Move vd_bitbltchr vga's driver method to vd_maskbitbltchr.
o Implement new vd_bitbltchr method for vga driver. (It do single write for 8
	pixels, have to be a bit faster).

MFC after:	7 days
Sponsored by:	The FreeBSD Foundation
2014-03-28 22:04:27 +00:00
emaste
d2c99117cd Update EFI framebuffer handoff from loader
Sponsored by:	The FreeBSD Foundation
2014-03-27 19:43:38 +00:00
ray
e057a3ab30 Revert r263321.
vt(9) crash on resume fixed, but Xorg still have damaged screen on resume (at
least with i915kms), so better to switch to VT0 before suspend and back on
resume.

Sponsored by:	The FreeBSD Foundation
2014-03-27 14:07:36 +00:00
ray
0e7786c185 Fix crash on resume in vt(9).
Statically allocated terminal window have not initialized callout handler, so we
have to initialize it even for existing window if it is console window.

Reported by:	gjb and many
Tested by:	gjb
MFC after:	7 days
Sponsored by:	The FreeBSD Foundation
2014-03-27 09:24:09 +00:00
ray
773200d00a Switch kern.vt.suspendswitch to 0 by default (disabled).
kern.vt.suspendswitch - sysctl/tunable which enable switch to VT0 before going
to suspend and switch back after resume.

MFC after:	7 days
2014-03-18 22:22:47 +00:00
emaste
653eb62793 Use the existence of module metadata to indicate framebuffer presence 2014-03-14 19:37:37 +00:00
ray
9727f28ccf Add efifb driver. Driver uses the data passed by UEFI compatible loader/BIOS and
enable to use framebuffer created by those loader.
2014-03-05 14:37:45 +00:00
ray
5136f041de Implement vd_drawrect and vd_setpixel for vt(9)'s VGA driver.
Sponsored by:	The FreeBSD Foundation
2014-02-07 12:39:58 +00:00
ray
8c8b9327e8 Add vt_set_border function to help to change border color.
Use vt_set_border to reset color after font changed (different font size may
change border sizes)

Sponsored by:	The FreeBSD Foundation
2014-02-06 15:16:38 +00:00
ray
d10ea36fa3 Add two new vt(9) driver methods: vd_drawrect and vd_setpixel.
Implement vd_drawrect and vd_setpixel for vt_fb driver.

Sponsored by:	The FreeBSD Foundation
2014-02-06 15:12:44 +00:00
jhibbits
773a89d478 Micro-optimize 8-bit blanking. This is the same as in ofw_syscons.
Reviewed by:	ray
MFC after:	1 week
2014-01-29 15:50:01 +00:00
ray
ff1baa3a0a Style(9) fix.
No functional changes.

Sponsored by:	The FreeBSD Foundation
2014-01-20 23:36:16 +00:00
ray
10e896d479 Update xboxfb driver to actual state.
NOTE: Not tested.

Sponsored by:	The FreeBSD Foundation
2014-01-15 12:35:28 +00:00
ray
c23c0c9f00 Restore VGA mode on vt switch. It fix VESA mode left by Xorg on exit.
Sponsored by:	The FreeBSD Foundation
2014-01-08 14:42:26 +00:00
rmh
cf5ac2bc67 Fix build of vt_xboxfb. 2014-01-08 14:36:35 +00:00
emaste
597158b535 Increase vt(9) max glyph data to 1MB for CJK fonts with many glyphs
Sponsored by:	The FreeBSD Foundation
2014-01-01 19:38:15 +00:00
ray
44f33e00e6 Fix AltGr, we should not only skip RAlt key release if enable_altgr is set, but
also process RAlt key press same way.

Sponsored by:	The FreeBSD Foundation
2013-12-26 14:25:37 +00:00
ray
33f5bc114d Use statndard (syscons) way to disable bell.
Testesd by:	markj

Sponsored by:	The FreeBSD Foundation
2013-12-25 19:07:14 +00:00
ray
4cd7151fa0 o Add virtual terminal mmap request handler.
o Forward termianl framebuffer ioctl to fbd.
o Forward terminal mmap request to fbd.
o Move inclusion of sys/conf.h to vt.h.

Sponsored by:	The FreeBSD Foundation
2013-12-23 18:09:10 +00:00
emaste
6ed839c35a Update whitespace to match mkkfont output
Sponsored by:	The FreeBSD Foundation
2013-12-23 17:49:12 +00:00
ray
4f65c6f4ae Update names from newcons to vt(9).
Sponsored by:	The FreeBSD Foundation
2013-12-22 15:33:15 +00:00
emaste
46ad59c614 Support double-width characters in vt(9)
Normal and bold fonts each have a glyph map for single or left half-
glyphs, and right half glyphs.  The flag TF_CJK_RIGHT in term_char_t
requests the right half-glyph.

Reviewed by:	ed@
Sponsored by:	The FreeBSD Foundation
2013-12-21 13:58:55 +00:00
ed
4d1897863f Extend libteken to support CJK fullwidth characters.
Introduce a new formatting bit (TF_CJK_RIGHT) that is set when putting a
cell that is the right part of a CJK fullwidth character. This will
allow drivers like vt(9) to support fullwidth characters properly.

emaste@ has a patch to extend vt(9)'s font handling to increase the
number of Unicode -> glyph maps from 2 ({normal,bold)} to 4
({normal,bold} x {left,right}). This will need to use this formatting
bit to determine whether to draw the left or right glyph.

Reviewed by:	emaste
2013-12-20 21:31:50 +00:00
ray
73daf98b85 Enable AltGr key by default.
Asked by:	many
Sponsored by:	The FreeBSD Foundation
2013-12-20 15:45:22 +00:00
ray
2a283aa894 Set mouse level per window, instead of global.
Sponsored by:	The FreeBSD Foundation
2013-12-20 15:37:57 +00:00
ray
1e2fa9f695 Enable mouse support for terminal clients (like dialog(1)).
Sponsored by:	The FreeBSD Foundation
2013-12-19 15:31:20 +00:00
ray
2d61a75a7f Skip processing of R.Alt as a second Alt key, if sysctl kern.vt.enable_altgr is
not zero.

Submitted by:	andreast
Sponsored by:	The FreeBSD Foundation
2013-12-18 00:14:58 +00:00
gnn
8141067e7f Fix a panic when booting with kernels that have FREEBBSD_COMPAT
4, 5, 6 or 43 by only thunking the data parameter for old ioctls
compatability ioctls instead of doing it for all of them.

Submitted by:	jhb@
2013-12-11 17:18:10 +00:00
kib
b1868df609 The opt_*.h headers must be included before any system header, except
sys/cdefs.h.  In particular, in case of COMPAT_43, param.h includes
sys/types.h, which includes sys/select.h, which includes
sys/_sigset.h.  The _sigset.h customizes the provided definions based
on COMPAT_43, eliminating osigset_t if symbol is not defined.  The
sys/proc.h is included after opt_compat.h and needs osigset_t.

Move opt_compat.h inclusion into the right place.

Sponsored by:	The FreeBSD Foundation
2013-12-10 22:33:02 +00:00
ray
ed0d5c9f43 Break build with error in case when both syscons and newcons are enabled.
Sponsored by:	The FreeBSD Foundation
2013-12-10 15:36:29 +00:00
ray
cf8df0ba08 o Compat options have to be defined before sys/ioccom.h included, so move
inclusion of right after sys/param.h.
o Only vt_core module use compat options, move it from common header to module.

Reported by:	Larry Rosenman ler at lerctr dot org

Sponsored by:	The FreeBSD Foundation
2013-12-09 15:28:34 +00:00
ray
97d6ba6169 Respect SC_NO_CUTPASTE option. It disable mouse cursor and cut/paste support
for vt(9). Note: /dev/sysmouse not affected.

Sponsored by:	The FreeBSD Foundation
2013-12-09 15:01:34 +00:00
ray
72549c538b o Build syscons(9)'s splash support if both sc and splash are enabled.
o Include opt_splash.h for vt(9) to know when splash device is enabled.
o Build logo_freebsd.c only if splash and vt are enabled.
o Include opt_compat.h to know when we have to respect compatibility.

Sponsored by:	The FreeBSD Foundation
2013-12-08 22:49:12 +00:00
ray
8866f80cfa Fix td_frame flags for i386.
Submitted by:	jilles

Sponsored by:	The FreeBSD Foundation
2013-12-06 23:12:21 +00:00
ray
40d47a9dd8 o Implement more standard ioctls.
o Translate old ioctls to new ones for compat with FREEBSD6/FREEBSD5/FREEBSD4.
o Fix style(9) on "return"s.
o Remove some extra debug.

Sponsored by:	The FreeBSD Foundation
2013-12-05 00:12:52 +00:00
nwhitehorn
31e401ca81 Fix build. 2013-11-30 22:49:26 +00:00
nwhitehorn
9cdeadcae2 Work around false positive errors from GCC. 2013-11-30 22:46:43 +00:00
ray
ac5298a605 Swap HOME/END for ScrollLocked mode. This fix confusion when End key move
history to begin point.

Sponsored by:	The FreeBSD Foundation
2013-11-24 00:15:57 +00:00
ray
03d23c19bd Remove atomic_(set|clear)_int from mouse control too. Same as in r258408.
Sponsored by:	The FreeBSD Foundation
2013-11-20 23:02:09 +00:00
ray
bdf8dee7bd Revert r258324. There mutexes should be used instead of atomics.
Pointed by:	kib, nwhitehorn

Sponsored by:	The FreeBSD Foundation
2013-11-20 22:54:09 +00:00
ray
06bcd76255 Notify terminal about process on current terminal start to use mouse on a
different "mouse level".

Sponsored by:	The FreeBSD Foundation
2013-11-18 22:55:50 +00:00
ray
c66056b21d Switch to use atomic ops for VT window flags, because some modifications can
come from another thread.

Sponsored by:	The FreeBSD Foundation
2013-11-18 22:39:34 +00:00
ray
50e1498142 Remove accidental line break.
Sponsored by:	The FreeBSD Foundation
2013-11-15 11:35:31 +00:00