Commit Graph

19 Commits

Author SHA1 Message Date
Hans Petter Selasky
3da1cf1e88 Extend the meaning of the CTLFLAG_TUN flag to automatically check if
there is an environment variable which shall initialize the SYSCTL
during early boot. This works for all SYSCTL types both statically and
dynamically created ones, except for the SYSCTL NODE type and SYSCTLs
which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to
be used in the case a tunable sysctl has a custom initialisation
function allowing the sysctl to still be marked as a tunable. The
kernel SYSCTL API is mostly the same, with a few exceptions for some
special operations like iterating childrens of a static/extern SYSCTL
node. This operation should probably be made into a factored out
common macro, hence some device drivers use this. The reason for
changing the SYSCTL API was the need for a SYSCTL parent OID pointer
and not only the SYSCTL parent OID list pointer in order to quickly
generate the sysctl path. The motivation behind this patch is to avoid
parameter loading cludges inside the OFED driver subsystem. Instead of
adding special code to the OFED driver subsystem to post-load tunables
into dynamically created sysctls, we generalize this in the kernel.

Other changes:
- Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask"
to "hw.pcic.intr_mask".
- Removed redundant TUNABLE statements throughout the kernel.
- Some minor code rewrites in connection to removing not needed
TUNABLE statements.
- Added a missing SYSCTL_DECL().
- Wrapped two very long lines.
- Avoid malloc()/free() inside sysctl string handling, in case it is
called to initialize a sysctl from a tunable, hence malloc()/free() is
not ready when sysctls from the sysctl dataset are registered.
- Bumped FreeBSD version to indicate SYSCTL API change.

MFC after:	2 weeks
Sponsored by:	Mellanox Technologies
2014-06-27 16:33:43 +00:00
Aleksandr Rybalko
c358638038 syscons(4) and vt(4) can be built together now.
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2014-06-18 22:18:58 +00:00
Aleksandr Rybalko
bfc00339de Fix case when vt(4) started w/o driver assigned.
o Always init locks and cv ASAP.
o Initialize driver-independent parts even if driver probing fail.
o Allow to call vt_upgrade anytime, for later loaded drivers.
o New window flag VWF_READY, to track if window already initialized.
Other updates:
o Pass vd as a cookie for kbd_allocate.
o Do not blank window on driver replacement.

Tested by:	hselasky (RPi), emaste(VGA, EFIFB, KMS), me

MFC after:	7 days
Sponsored by:	The FreeBSD Foundation
2014-06-03 13:33:43 +00:00
Aleksandr Rybalko
16aa1f0950 Hide debug messages under VT_DEBUG.
Sponsored by:	The FreeBSD Foundation
2014-05-08 22:52:05 +00:00
Aleksandr Rybalko
90fdc1c6c2 Create dataset for vt(4) drivers.
Sponsored by:	The FreeBSD Foundation
2014-05-05 21:31:00 +00:00
Aleksandr Rybalko
f06a81663f Define a new method for probing vt(4) driver before attach it at early stage.
Sponsored by:	The FreeBSD Foundation
2014-05-05 21:29:56 +00:00
Nathan Whitehorn
b2d52f78cf 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
Aleksandr Rybalko
1da9f0d73a 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
Aleksandr Rybalko
9e497e7b04 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
Aleksandr Rybalko
650c134f19 Use statndard (syscons) way to disable bell.
Testesd by:	markj

Sponsored by:	The FreeBSD Foundation
2013-12-25 19:07:14 +00:00
Aleksandr Rybalko
7a1a32c4ef 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
Ed Maste
41fb066511 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
Aleksandr Rybalko
d454a052df Set mouse level per window, instead of global.
Sponsored by:	The FreeBSD Foundation
2013-12-20 15:37:57 +00:00
Aleksandr Rybalko
0a036e525d Enable mouse support for terminal clients (like dialog(1)).
Sponsored by:	The FreeBSD Foundation
2013-12-19 15:31:20 +00:00
Aleksandr Rybalko
00f4f023f1 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
Aleksandr Rybalko
c323f8035b 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
Aleksandr Rybalko
0f49db6e47 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
Aleksandr Rybalko
37fd54ff81 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
Aleksandr Rybalko
27cf7d04ef Merge VT(9) project (a.k.a. newcons).
Reviewed by:	nwhitehorn
MFC_to_10_after:	re approval

Sponsored by:	The FreeBSD Foundation
2013-12-05 22:38:53 +00:00