summaryrefslogtreecommitdiffstats
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* - Use unsigned version of min() when handling arguments of SETFKEY ioctl.glebius2016-05-171-1/+1
| | | | | | | | | | | | - Validate that user supplied control message length in sendmsg(2) is not negative. Security: SA-16:18 Security: CVE-2016-1886 Security: SA-16:19 Security: CVE-2016-1887 Submitted by: C Turt <cturt hardenedbsd.org> Approved by: so
* o Fix OpenSSH xauth(1) command injection. [SA-16:14]glebius2016-03-161-1/+10
| | | | | | | | | | o Fix incorrect argument validation in sysarch(2). [SA-16:15] o Fix Hyper-V KVP (Key-Value Pair) daemon indefinite sleep. [EN-16:04] Errata: FreeBSD-EN-16:04.hyperv Security: FreeBSD-SA-16:14.openssh-xauth, CVE-2016-3115 Security: FreeBSD-SA-16:15.sysarch, CVE-2016-1885 Approved by: so
* Fix integer overflow in IGMP protocol. [SA-15:04]delphij2015-02-251-5/+8
| | | | | | | | | | Fix vt(4) crash with improper ioctl parameters. [EN-15:01] Updated base system OpenSSL to 1.0.1l. [EN-15:02] Fix freebsd-update libraries update ordering issue. [EN-15:03] Approved by: so
* Update the Intel ixl/ixlv drivers to fix a panic in the boot/installjfv2014-11-1110-11342/+1292
| | | | | | | | | | | | | | kernel if the system has a fiber-based Intel XL710 adapter installed. In addition ixl version 1.2.8 and ixlv version 1.1.18 give: - Improved VF stability (thanks to Ryan Stone for this) - RSS fixes - link detection in the ixlv driver - new sysctl's added - corrected media reporting Submitted by: jfv Approved by: re
* MFS r273580: MFC r273577:delphij2014-10-244-5/+5
| | | | | | | Return BUS_PROBE_DEFAULT instead of BUS_PROBE_VENDOR or 0 for in-tree driver. This change was verified by Microsoft. Approved by: re (kib)
* MFstable10 r273429:gjb2014-10-211-2/+1
| | | | | | | | | | | MFC r273402: Fix an issue where a FreeBSD virtual machine provisioned in the Microsoft Azure service does not recognize the second attached disk on the system. PR: 194376 Approved by: re (delphij) Sponsored by: The FreeBSD Foundation
* MFS10 r273296 (r273219 in HEAD):emaste2014-10-201-0/+2
| | | | | | | | | | Do nothing in vt_upgrade if there is no vt driver Previously, if no drivers attached at boot we would panic with "vtbuf_fill_locked begin.tp_row 0 must be < screen height 0". PR: 192248 Approved by: re
* vt(4): Don't recalculate buffer size if we don't know screen sizedumbbell2014-10-141-1/+2
| | | | | | | | | | | | | | | MF10: r273037 MFC: r272537 When the screen size is unknown, it's set to 0x0. We can't use that as the buffer size, otherwise, functions such as vtbuf_fill() will fail. This fixes a panic on RaspberryPi, where there's no vt(4) backend configured early in boot. PR: 193981 Tested by: danilo@ Approved by: re (marius)
* vt(4): Save/restore keyboard mode & LED states when switching windowdumbbell2014-10-142-36/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MF10: r273036 MFC: r272416 Add new functions to manipulate these mode & state, instead of calling kbdd_ioctl() everyhere. This fixes at least two bugs: 1. The state of the Scroll Lock LED and the state of scroll mode could be out-of-sync. For instance, if one enables scroll mode on window #1 and switches to window #2, the LED would remain on, but the window wouldn't be in scroll mode. Similarily, when switching between a console and an X.Org session, the LED states could be inconsistent with the real state. 2. When exiting from an X.Org session, the user could be unable to type anything. The workaround was to switch to another console window and come back. Differential Revision: https://reviews.freebsd.org/D821 Reviewed by: ray@ Approved by: re (marius), ray@ Tested by: kwm@
* MFS r272892 (r272713 in head):bz2014-10-121-1/+1
| | | | | | | | | | | | Since introducing the extra mapping in r250103 (head) for architectural performance events we have actually counted 'Branch Instruction Retired' when people asked for 'Unhalted core cycles' using the 'unhalted-core-cycles' event mask mnemonic. Reviewed by: jimharris Discussed with: gnn, rwatson Sponsored by: DARPA/AFRL Approved by: re (gjb)
* MFC r272308: Fix old iSCSI initiator to work with new CAM locking.mav2014-10-061-19/+14
| | | | | | | | | | This switches code to using xpt_rescan() routine, irrelevant to locking. Using xpt_action() directly requires knowledge about higher level locks, that SIM does not need to have. This code is obsolete, but that is not a reason to crash. Approved by: re (marius)
* MFC r272480:hselasky2014-10-061-9/+12
| | | | | | | When we fail to get a USB reference we should just return, because there are no more references held. Approved by: re, marius
* MFC r272349, r272422 and r272479:hselasky2014-10-062-8/+16
| | | | | | | | | | | | - Fix XHCI driver for devices which have more than 15 physical root HUB ports. The current bitmap array was too small to hold more than 16 bits and would at some point toggle the context size, which then would trigger an enumeration fault and cause a fallback to the EHCI companion controller, if any. - Make sure we always set the maximum number of valid contexts. - Set default cycle state in case of early interrupts. Approved by: re, marius
* MFC r272254:hselasky2014-10-022-22/+45
| | | | | | | | Instead of creating the full range of possible ports, try to figure out the actual number of so-called "embedded jacks" which are present when a USB MIDI device is attaching. Approved by: re, gjb
* MFC r271493,271688-271689,271696,271854,272139-272143:delphij2014-09-305-102/+1319
| | | | | | | | | | | | Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft, many thanks for their continued support of FreeBSD. While I'm there, also implement a new build knob, WITHOUT_HYPERV to disable building and installing of the HyperV utilities when necessary. The HyperV utilities are only built for i386 and amd64 targets. Approved by: re (gjb)
* MFC 271745,271834,271899,271900,271913,272022,272023:bz2014-09-307-54/+65
| | | | | | | | | | | | | | | | Revert changes to shared code of the ixl and ixlv drivers to allow for easier long-term maintainability. Restrict the drivers to building on amd64 for now as it is only tested on that 64bit architecture. Just depend on PCI and neither INET nor INET6; also make sure we can build individual drivers and they do not depend on each other anymore. Reviewed by: gnn, eric.joyner intel.com PR: 193824 Approved by: re (gjb)
* MFC r271874:hselasky2014-09-272-0/+4
| | | | | | | Add new USB IDs. PR: 193775 Approved by: re, gjb
* Properly revert r272128.gjb2014-09-265-1319/+102
| | | | | Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
* Revert r272149, which introduces obscure vestiges from thegjb2014-09-265-104/+1319
| | | | | | | r272128 reversal. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
* Revert r272128:gjb2014-09-265-1319/+104
| | | | | | | | | | | Though this passes the buildworld test, this fails during installworld with: make[3]: "/releng/scripts-release/chroots/10/i386/release/etc/devd/Makefile" line 13: Malformed conditional (${MK_HYPERV} != "no") Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
* MFC r271493,271688,271689,271696,271854:delphij2014-09-255-102/+1319
| | | | | | | | | | | | Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft, many thanks for their continued support of FreeBSD. While I'm there, also implement a new build knob, WITHOUT_HYPERV to disable building and installing of the HyperV utilities when necessary. The HyperV utilities are only built for i386 and amd64 targets. Approved by: re (gjb)
* MFC r268981ray2014-09-251-31/+0
| | | | | | | | | Remove #ifdef-s to reduce difference to upstream. Pointed by: kib Approved by: re (glebius) Sponsored by: The FreeBSD Foundation
* MFC r271953:hselasky2014-09-251-1/+8
| | | | | | | Some XHCI hardware requires dropping the endpoint context before adding it again. Approved by: re, glebius
* MFC r271728davidcs2014-09-221-3/+12
| | | | | | For ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() check bxe_debug flag before printing error message. Approved by: re(gjb)
* vt(4): Merge several bug fixes and improvementsdumbbell2014-09-223-139/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SVN revisions in this MFC: 271756 271758 271868 271871 271872 271899 Detailed commit list: r271756: vt(4): Fix out-of-bounds array access in VT_ACTIVATE ioctl handling CID: 1229964 r271758 vt(4): Use strncpy() to copy into a fixed-size buffer CID: 1230007 r271868: vt(4): Remove vt_buf->vb_dirtymask This structure and the associated functions were unused since the implementation of vd_bitblt_text_t callbacks. r271871: vt(4): Rewrite history scrolling It's now possible to scroll up the 500 hard-coded lines of history, not just a fraction of them. For instance, one can reach the top of the boot process. Sometimes, when scrolling or when changing the screen size (by changing the font or loading a KMS driver for instance), one could see the history cycling (old content appeared below latest lines). This is fixed. Now, when the resolution changes are more lines can be shown, the displayed area is adjusted so that, if the screen was filled with content before, it's filled with content after as well: more history is visible, instead of having blank lines below the previously visible content. r271872: vt(4): Remove superfluous word in comment Submitted by: brueffer@ r271899: Make gcc happy by initialising the variable only set in a couple of case statements without a default. Approved by: re (marius)
* MFC r271679:bz2014-09-222-71/+183
| | | | | | | | | | Merge atse(4) interrupt handling and race condition fixes from cheribsd. Obtained from: cheribsd Submitted by: rwatson, emaste Sponsored by: DARPA/AFRL Approved by: re (delphij)
* MFC r271450:np2014-09-221-0/+79
| | | | | | cxgbe(4): knobs to enable/disable PAUSE frame based flow control. Approved by: re (glebius)
* MFC 271381-271382,271385,271463-271466,271485,271506ray2014-09-226-53/+145
| | | | | | | | | | | | | | | o Add sysctls to enable/disable potentially dengerous key combinations, like reboot/halt/debug. o Add support for most key combinations supported by syscons(4). o Some spelling fixes o Remove stray whitespaces. o Switch vt(4) to traditional behaviour with copy-paste same as syscons(4) do. o Fix stray char on paste. o Fix 'function declaration isn't a prototype' warning. o vt(4): Enclose vt_mouse_paste() prototype inside #ifndef SC_NO_CUTPASTE/#endif Approved by: re (gjb) Sponsored by: The FreeBSD Foundation
* MFC r271492:hselasky2014-09-201-3/+14
| | | | | | | | | | | | Workaround for receiving Voice Calls using the E1750 dongle from Huawei. It might appear as if the firmware is allocating memory blocks according to the USB transfer size and if there is initially a lot of data, like at the answering machine prompt, it simply dies without any apparent reason. The simple workaround for this is to force a zero length packet at hardware level after every 512 bytes of data. This will force the other side to use smaller memory blocks aswell. Approved by: re, gjb
* drm/i915: Add HW context supportdumbbell2014-09-1814-29/+761
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature is required by Mesa 9.2+. Without this, a GL application crashes with the following message: # glxinfo name of display: :0.0 Gen6+ requires Kernel 3.6 or later. Assertion failed: (ctx->Version > 0), function handle_first_current, file ../../src/mesa/main/context.c, line 1498. Abort (core dumped) Now, Mesa 10.2.4 and 10.3-rc3 works fine: # glxinfo name of display: :0 display: :0 screen: 0 direct rendering: Yes ... OpenGL renderer string: Mesa DRI Intel(R) 965GM OpenGL version string: 2.1 Mesa 10.2.4 ... The code was imported from Linux 3.8.13. This an MFC of r271705. Approved by: re (glebius) Reviewed by: kib@ Tested by: kwm@, danfe@, Henry Hu, Lundberg, Johannes <johannes@brilliantservice.co.jp>, Johannes Dieterich <dieterich.joh@gmail.com>, Lutz Bichler <lutz.bichler@gmail.com>, Relnotes: yes
* MFC nmdm driver changes, r259550 and r271350grehan2014-09-181-33/+110
| | | | | | | | | | | | | | | | | | | | | | | | | r259550 (glebius): Make nmdm(4) destroy devices when both sides of a pair are disconnected. This makes it possible to kldunload nmdm.ko when there are no users of it. r271350: Fix issue with nmdm and leading zeros in device name. The nmdm code enforces a number between the 'nmdm' and 'A|B' portions of the device name. This is then used as a unit number, and sprintf'd back into the tty name. If leading zeros were used in the name, the created device name is different than the string used for the clone-open (e.g. /dev/nmdm0001A will result in /dev/nmdm1A). Since unit numbers are no longer required with the updated tty code, there seems to be no reason to force the string to be a number. The fix is to allow an arbitrary string between 'nmdm' and 'A|B', within the constraints of devfs names. This allows all existing user of numeric strings to continue to work, and also allows more meaningful names to be used, such as bhyve VM names. PR: 192281 Approved by: re (glebius)
* vt(4): Merge several bug fixes and improvementsdumbbell2014-09-189-33/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SVN revisions in this MFC: 269779 270705 270706 271180 271250 271253 271682 271684 Detailed commit list: r269779: fbd: Fix a bug where vt_fb_attach() success would be considered a failure vt_fb_attach() currently always returns 0, but it could return a code defined in errno.h. However, it doesn't return a CN_* code. So checking its return value against CN_DEAD (which is 0) is incorrect, and in this case, a success becomes a failure. The consequence was unimportant, because the caller (drm_fb_helper.c) would only log an error message in this case. The console would still work. Approved by: nwhitehorn r270705: vt(4): Add cngrab() and cnungrab() callbacks They are used when a panic occurs or when entering a DDB session for instance. cngrab() forces a vt-switch to the console window, no matter if the original window is another terminal or an X session. However, cnungrab() doesn't vt-switch back to the original window currently. r270706: drm: Don't "taskqueue" vt-switch if under DDB/panic situation If DDB is active, we can't use a taskqueue thread to switch away from the X window, because this thread can't run. Reviewed by: ray@ Approved by: ray@ r271180: vt_vga: vd_setpixel_t and vd_drawrect_t are noop in text mode r271250: vt(4): Change the terminal and buffer sizes, even without a font This fixes a bug where scroll lock would not work for tty #0 when using vt_vga's textmode. The reason was that this window is created with a static 256x100 buffer, larger than the real size of 80x25. Now, in vt_change_font() and vt_compute_drawable_area(), we still perform operations even of the window has no font loaded (this is the case in textmode here vw->vw_font == NULL). One of these operation resizes the buffer accordingly. In vt_compute_drawable_area(), we take the terminal size as is (ie. 80x25) for the drawable area. The font argument to vt_set_border() is removed (it was never used) and the code now uses the computed drawable area instead of re-doing its own calculation. Reported by: Harald Schmalzbauer <h.schmalzbauer_omnilan.de> Tested by: Harald Schmalzbauer <h.schmalzbauer_omnilan.de> r271253: pause_sbt(): Take the cold path (ie. use DELAY()) if KDB is active This fixes a panic in the i915 driver when one uses debug.kdb.enter=1 under vt(4). PR: 193269 Reported by: emaste@ Submitted by: avg@ r271682: vt(4): Fix a LOR which occurs during a call to vt_upgrade() Reported by: kib@ Review: https://reviews.freebsd.org/D785 Reviewed by: ray@ Approved by: ray@ r271684: vt(4): Use vt_fb_drawrect() and vt_fb_setpixel() in all vt_fb-derivative Review: https://reviews.freebsd.org/D789 Reviewed by: nwhitehorn Approved by: nwhitehorn Approved by: re (gjb)
* MFC r268854davidcs2014-09-175-1/+35
| | | | | | | | Initiate error recovery stats fail to update after 3 retries. Change bxe_panic() ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() to panic only if ECORE_STOP_ON_ERROR is defined. Approved by: re(gjb)
* MFC 270830:jhb2014-09-171-8/+11
| | | | | | | | | | When anouncing link state changes on an 802.11 interface with a vap, announce the change on the vap's ifnet instead of the main ifnet. This matches the behavior of other wireless drivers in the tree and allows the default devd configuration to correctly start dhclient automatically after an ndis wireless device associates. Approved by: re (marius for 10)
* MFC r271403: Add PCI ID for Promise TX8660 8-port 3Gbps HBA.mav2014-09-171-0/+1
| | | | | | | This device reports RAID subclass, but appears to be AHCI compatible. Submitted by: Yuri Perejilin <yuri@rivera.ru> Approved by: re (gjb)
* MFC: r271286brueffer2014-09-152-2/+2
| | | | | | | | Use the right constants in comparisons. This is currently a nop, as MIN_RXD == MIN_TXD and MAX_RXD == MAX_TXD. Reviewed by: Eric Joyner @ Intel Approved by: re (kib)
* MFC r271099: revert r269814: blkfront: add support for unmapped IOroyger2014-09-151-7/+5
| | | | | | | | | Current busdma code for unmapped bios will not properly align the segment size, causing corruption on blkfront devices. Revert the commit until busdma code is fixed. Reported by: mav Approved by: re
* MFC r271163, 271196:mav2014-09-131-31/+36
| | | | | | | | | | Invert AHCI_Q_NOBSYRES quirk meaning, waiting for readiness by default. I gave up to update list of Marvell chips that require this quirk. The final nail was growing number of PCIe/M.2 SSDs where Marvell chips have PCI IDs of different vendors. Approved by: re (delphij)
* MFC r271218:hselasky2014-09-101-2/+2
| | | | | | Update mixer description for FastTrackPro. Approved by: re, marius
* MFC r271017 and r271018:hselasky2014-09-102-0/+3
| | | | | | | Add new quirk. PR: 193279 Approved by: re, marius
* MFC r270992:hselasky2014-09-101-1/+1
| | | | | | Fix logical error. Approved by: re, glebius
* MFC r270973kadesai2014-09-082-8/+5
| | | | | | | | | | | | | | | r270973 Fix for WITNESS warning while doing xpt_rescan. This happen when converting any JBOD to RAID or creating any new RAID from Unconfigured Drives. Without this fix, user may see call trace if WITNESS is enabled. System may panic when reconfiguring the RAID. Reviewed by: ambrisko Approved by: re (gleb) ---
* MFC r269228:mav2014-09-061-0/+13
| | | | | | | Add support for SOUND_MIXER_INFO IOCTL, used by gstreamer. Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> Approved by: re (marius)
* MFC vt(4) improvements / sync with HEADemaste2014-09-0411-410/+1206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are largely dumbbell@'s changes. Most significantly they address the extreme performance degradation with VGA hardware. SVN revisions in this MFC: 269471 270290 270293 270322 270324 270329 270331 270336 270338 270340 270341 270342 270343 270388 270390 270404 270411 270412 270413 270431 270446 270448 270485 270587 270589 270613 270618 270620 270667 270702 270707 270708 270720 270721 270785 270786 Detailed commit list: r270290: Test if the cursor is shown only once Later, we just see if the "struct mouse_cursor" pointer is set. This avoids the need to mess with all the conditions several times; this has been error prone. While here, rename the variable "m" to a more meaningful "cursor", like it's done elsewhere in the code. r270293: Rename the "mouse_cursor" structure to "vt_mouse_cursor" At the same time, "w" and "h" members are now called "width" and "height". The goal is to have a more "public" structure, because it will soon be passed as argument to a new callback, replacing vd_bitbltchr_t. r269471 (ray): Fix vt_vga driver to draw not-8-bit-aligned fonts correctly. Still one bug here: mouse left some gaps on track when moving left. r270322: Add new vd_bitblt_text_t callback, and implement it for vt_vga Compared to the deprecated vd_bitbltchr_t callback, vd_bitblt_text_t receives: o the whole text buffer o the dirty area o the mouse cursor (map, position, colors) This allows the backend to perform optimization on how to draw things. The goal is to remove vd_bitbltchr_t and vd_putchar_t, once all driver are converted (only vt_vga is included in this commit). In vt_vga, this allows to draw the text and the cursor in one pass, without ever reading from video memory (because it has all the context). The main benefit is the speed improvement: no more slideshow during boot! Other bugs fixed in vt_vga are: o left-most characters are drawn properly (the left-most pixels were missing with bold characters and some wide letters such as 'm') o no more black square around the cursor o no cursor flickering when the text is scrolling There are still many problems to fix: the known issues are marked with "FIXME" inside the code. r270411: vt_fb: Implement vd_bitblt_text_t for vt_fb and derivatives r270412: creator_fb: Implement vd_bitblt_text_t r270413: ofwfb: Implement vd_bitblt_text_t r270324: vt_vga: Clip the draw area to never draw offscreen This fixes a bug when two windows use different fonts, but a longer- term solution is required. The dirty area should be stored as pixels, not character cells, because such coordinates don't have the same meaning in all windows, when using different fonts. r270329: Mark new mouse position as dirty only when it's actually displayed r270331: Store cursor bitmap & colors in struct vt_device This removes the need to specify them to each call to vd_bitblt_text_t and, therefore, simplifies the API. r270336: Give the window to vd_bitblt_text_t callback ... instead of both the buffer and the font. Again, this simplifies the API. r270338: The offset to center the text area is per-window now The previous global offset, based on the last loaded font, had no meaning for other windows. This caused a shifted text area, often partly out-of-screen. r270341: vt_vga: Remove a "FIXME" comment; the issue was solved in r270338 r270340: Don't run vt_set_border() and vt_flush() concurrently In the case of vt_vga, the two concurrent calls were writing to the same VGA registers, causing incorrect refresh of the screen. r270342: Use the actual size of the mouse when marking its position as dirty This fixes a bug where part of the cursor was not erased. r270343: Remove "FIXME" about multiple locking of vt_buf in vt_flush() After some testing, it appears that acquiring the lock once and keeping it longer is slower than taking it multiple times. While here, fix a typo in another comment. r270388: vt_vga: Give only the character part of term_char_t to vga_get_cp437() This fixes a bug where vga_get_cp437() was called with an invalid argument. The screen was then filled with '?' instead of the actual character. r270390: Fix a crash in vt_mark_mouse_position_as_dirty() when in textmode In textmode, no font is loaded, thus the page fault in vt_mark_mouse_position_as_dirty() when it wants the font width/height. For now, create a fake area for the textmode. This needs to be modified if vt_vga gains mouse support in textmode. While here, fix a build failure when SC_NO_CUTPASTE is defined: vt_mark_mouse_position_as_dirty() must not be included in this case. r270404: Fix cursor handling in vt_flush() There were situations where the cursor was not erased/redrawn or its position was marked as dirty even though it's not displayed. The code is now more straightforward. At the same, add a function to determine if the cursor covers a given area. This is used by backends to know if they need to draw the cursor. This new function should be paired with a new state in struct vt_device, called vd_mshown, which indicates if the cursor should be displayed. This again simplifies vd_bitblt_text_t callback's API. r270431: vt(4): Add vd_bitblt_bmp_t callback The code was already there in all backends, we just expose it. This is used to display the splash screen. r270446: Remove vd_bitbltchr_t It's replaced by vd_bitblt_text_t, which gives more context to the backend and allows it to perform more efficiently when redrawing a given area. r270448: Fix order of arguments (x <-> y) when showing the splash screen r270485: vt_vga: Fix the display of the splash screen r270587: Take font offset into account in vt_is_cursor_in_area() This fixes a "General protection fault" in vt_vga, where vt_is_cursor_in_area() erroneously reported that the cursor was over the text. This led to negative integers stored in "unsigned int" and chaos. r270589: The cursor coordinates are relative to the drawn area ... not the whole screen. Don't use font offsets in vt_mark_mouse_position_as_dirty(). This fixes a bug where the mouse position wasn't marked as dirty when approaching the borders of the drawn area. r270613: Store a rectangle for the drawable area, not just the top-left corner This allows backends to verify they do not draw outside of this area. This fixes a bug in vt_vga where the text was happily drawn over the right and bottom margins, when using the Gallant font. r270618: Intialize drawable area rectangle each time a font is loaded This also fixes a problem where early in boot, the area was zero, leading to nothing displayed for a few seconds. r270620: vt_vga: Use Write Mode 0 to draw group of 8 pixels using 3 or more colors This replaces the method based on Write Mode 3, which required reads from the video memory to load the latches. r270667: When creating a window buffer, fill it entirely ... not just the visible part. This fixes a bug where, when switching from eg. vt_vga to vt_fb (ie. the resolution goes up), the originally hidden, uninitialized area of the buffer is displayed on the screen. This leads to a missing text cursor when it's over an unitialized area. This was also visible when selecting text: the uninitialized area was not highlighted. Internally, this area was zeroed: characters were all 0x00000000, meaning the foreground and background color was black. Now, everything is filled with a space with a gray foreground color, like the visible area. While here, remove the check for the mute flag and always use TERMINAL_NORM_ATTR as the character attribute (ie. gray foreground, black background). r270702: Implement basic support for KDSETMODE ioctl With the current implementation, this allows an X11 server to tell the console it switches a particular window in "graphics mode". This information is used by the mouse handling code to ignore sysmouse events in the window taken by the X server: only him should receive those events. r270707: Pause the vt_flush() timer when the screen is up-to-date The timer is restarted whenever a window buffer is marked as dirty or the mouse cursor moves. There's still room for improvement. For instance, we should not mark a window buffer as dirty when this window isn't displayed. r270708: vt(4): Recompute the drawable area when the resolution changes This was only done when the font changed. r270720: vt(4): Fix mouse cursor handling in vt_fb/creator_vt/ofwfb There were two issues: 1. The area given to vt_is_cursor_in_area() was adding the drawable area offset, something already handled by this function. 2. The cursor was shifted on the screen by the offset of this area and thus was misplaced or not erased. Furthermore, when reaching the bottom or right borders, the cursor was either totally removed or not erased correctly. r270721: vt(4): If the terminal shrinks, make sure the mouse is inside the new area r270785: vt(4): Change vb_history_size from "int" to "unsigned int" CID: 1230002, 1230003 r270786: Indicate that KDSETRAD case falls through the next case CID: 1229953 Relnotes: Yes
* MFC r270710 and r270821:hselasky2014-09-043-4/+0
| | | | | | | | | | | | | | | - Update the OFED Linux Emulation layer as a preparation for a hardware driver update from Mellanox Technologies. - Remove empty files from the OFED Linux Emulation layer. - Fix compile warnings related to printf() and the "%lld" and "%llx" format specifiers. - Add some missing 2-clause BSD copyrights. - Add "Mellanox Technologies, Ltd." to list of copyright holders. - Add some new compatibility files. - Fix order of uninit in the mlx4ib module to avoid crash at unload using the new module_exit_order() function. Sponsored by: Mellanox Technologies
* MFC r270299 (dumbbell): vt_vga: When clearing video memory, don't read from itemaste2014-09-041-1/+0
| | | | | | | | | | The goal is to clear the video memory, in case an application drew to it. So the content shouldn't be loaded in the latches, it can't be trusted anyway. This improves a bit the window switch speed. Sponsored by: The FreeBSD Foundation
* MFC r269685 (nwhitehorn): Retire vd_maskbitbltchr.emaste2014-09-048-78/+1
| | | | | | | | The same functionality can be obtained by testing for mask != NULL in vd_bitbltchr, which all implementations of vd_bitbltchr() were doing anyway. Sponsored by: The FreeBSD Foundation
* MFC r269636 by nwhitehorn:emaste2014-09-041-5/+3
| | | | | | | | | Set fb_pbase properly on PowerPC in the case where we have to guess at the right register bank for the framebuffer. Disable the assigned- addresses path on SPARC since it is just a hack for IBM PPC systems and was neither relevant for nor worked on SPARC anyway. Sponsored by: The FreeBSD Foundation
* MFC fbd(4) and vt_fb disentanglement:emaste2014-09-046-135/+70
| | | | | | | | | | | | | | | | r268472 (ray): Should check fb_read method presence instead of double check for fb_write. r269620 (nwhitehorn): Retire various intertwined bits of fbd(4) and vt_fb, in particular the pixel modification indirection. No actual drivers use it and those that might (e.g. creatorfb) use custom implementations of vd_bitbltchr(). Relnotes: No Sponsored by: The FreeBSD Foundation
* MFC r269278 (nwhitehorn):emaste2014-09-041-78/+49
| | | | | | | | | | | | Make mmap() of the console device when using ofwfb work like other supported framebuffer drivers. This lets ofwfb work with xf86-video-scfb and makes the driver much more generic and less PCI-centric. This changes some user-visible behavior and will require updates to the xorg-server port on PowerPC when using ATI graphics cards. Relnotes: Yes Sponsored by: The FreeBSD Foundation
OpenPOWER on IntegriCloud