Skip to content

Commit 78e2971

Browse files
committed
sys/dev/pci: New bochsfb driver
Signed-off-by: Jiaxun Yang <[email protected]>
1 parent 33371e6 commit 78e2971

File tree

8 files changed

+865
-1
lines changed

8 files changed

+865
-1
lines changed

share/man/man4/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
1111
auacer.4 audio.4 audiocs.4 auich.4 \
1212
auixp.4 autri.4 auvia.4 awi.4 \
1313
battery_pmu.4 bba.4 bce.4 bcsp.4 be.4 bge.4 bnx.4 bha.4 \
14-
bio.4 bktr.4 bluetooth.4 bmx280thp.4 bmtphy.4 bpf.4 bpfjit.4 \
14+
bio.4 bktr.4 bochsfb.4 bluetooth.4 bmx280thp.4 bmtphy.4 bpf.4 bpfjit.4 \
1515
brgphy.4 bridge.4 bthidev.4 bthub.4 btkbd.4 \
1616
btmagic.4 btms.4 btsco.4 btuart.4 \
1717
bwfm.4 bwi.4 \

share/man/man4/bochsfb.4

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
.\" $NetBSD$
2+
.\"
3+
.\" Copyright (c) 2025
4+
.\" The NetBSD Foundation, Inc. All rights reserved.
5+
.\"
6+
.\" This code is derived from software contributed to The NetBSD Foundation
7+
.\" by Jiaxun Yang.
8+
.\"
9+
.\" Redistribution and use in source and binary forms, with or without
10+
.\" modification, are permitted provided that the following conditions
11+
.\" are met:
12+
.\" 1. Redistributions of source code must retain the above copyright
13+
.\" notice, this list of conditions and the following disclaimer.
14+
.\" 2. Redistributions in binary form must reproduce the above copyright
15+
.\" notice, this list of conditions and the following disclaimer in the
16+
.\" documentation and/or other materials provided with the distribution.
17+
.\"
18+
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19+
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20+
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21+
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22+
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23+
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24+
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25+
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26+
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27+
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28+
.\" POSSIBILITY OF SUCH DAMAGE.
29+
.\"
30+
.Dd March 2, 2025
31+
.Dt BOCHSFB 4
32+
.Os
33+
.Sh NAME
34+
.Nm bochsfb
35+
.Nd Bochs Display Interface framebuffer
36+
.Sh SYNOPSIS
37+
.Cd "bochsfb* at pci?"
38+
.Cd "wsdisplay* at bochsfb?"
39+
.Sh DESCRIPTION
40+
The
41+
.Nm
42+
driver provides support for graphics devices implementing the Bochs VBE
43+
DISPI interface, including the Bochs reference VGA implementation, the QEMU
44+
StdVGA device, and the VGA-compatible
45+
.Xr virtio 4
46+
GPUs.
47+
It programs the linear framebuffer through the DISPI registers and makes it
48+
available through
49+
.Xr wsdisplay 4
50+
as a console or
51+
.Xr wsfb 4
52+
-compatible framebuffer.
53+
.Pp
54+
When a memory-mapped DISPI bar with an EDID block is present,
55+
.Nm
56+
uses the preferred mode reported by the display.
57+
Devices without EDID support (such as virtio-vga) fall back to a 1024x768
58+
32-bit mode.
59+
If no MMIO bar is available, the driver accesses the DISPI registers via the
60+
legacy VGA I/O ports.
61+
.Sh SEE ALSO
62+
.Xr intro 4 ,
63+
.Xr pci 4 ,
64+
.Xr vga 4 ,
65+
.Xr wscons 4 ,
66+
.Xr wsdisplay 4
67+
.Sh HISTORY
68+
The
69+
.Nm
70+
driver first appeared in
71+
.Nx 11 .
72+
.Sh AUTHORS
73+
.An -nosplit
74+
The
75+
.Nm
76+
driver was written by
77+
.An Jiaxun Yang Aq Mt [email protected] .

sys/arch/evbarm/conf/GENERIC

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ hdmicec* at hdmicecbus?
522522
#tegradrm* at fdt? # NVIDIA Tegra Display
523523
#tegrafb* at tegrafbbus?
524524
dwhdmi* at fdt? # Designware HDMI TX
525+
bochsfb* at pci? dev ? function ? # Bochs framebuffer (QEMU)
525526
genfb* at fdt? # Simple Framebuffer
526527
mesonfb* at fdt? # Amlogic Meson Framebuffer
527528
omapfb* at fdt? # TI OMAP3 Framebuffer

sys/arch/evbarm/conf/GENERIC64

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ sunxilcdc* at fdt? # Allwinner DE2 timing controller
508508
sunximixer* at fdt? # Allwinner DE2 mixer
509509
#tegradrm* at fdt? # NVIDIA Tegra Display
510510
#tegrafb* at tegrafbbus?
511+
bochsfb* at pci? dev ? function ? # Bochs framebuffer (QEMU)
511512
genfb* at fdt? # Simple Framebuffer
512513
wsdisplay* at wsemuldisplaydev?
513514
options VCONS_DRAW_INTR

0 commit comments

Comments
 (0)