Compare commits

...
Author SHA1 Message Date
Colin Percival c8918d6c74 Update in preparation for 14.2-RELEASE
- Bump BRANCH to RELEASE
- Add the anticipated RELEASE announcement date
- Set a static __FreeBSD_version

Approved by:	re (implicit)
Sponsored by:	Amazon
2024-11-29 00:00:00 +00:00
Colin Percival 5395ddd7aa 14.2: Update to RC1
Approved by:	re (implicit)
Sponsored by:	Amazon
2024-11-21 15:48:17 -08:00
Doug Rabson af96dc44e1 release: Add missing dependencies in the minimal OCI image
The pkg-bootstrap binary depends on fetch.

Approved by:	re
Reviewed by:	cperciva, emaste, bapt
Differential Revision:	https://reviews.freebsd.org/D47661
MFC after:	1 day

(cherry picked from commit ca1f1d2c94)
(cherry picked from commit 4a768794b8)
2024-11-21 15:42:53 -08:00
Colin Percival 42d33f9299 release: Don't break if firmware install fails
On some platforms (e.g. powerpc) we don't have packages, so we can't
install them onto the ISOs.  Proceed with building the images anyway.

Reported by:	Weekly snapshot builds
Fixes:	7e2996c1f5 ("release: install wireless firmware onto disc1 and dvd")
Approved by:	re (cperciva)

(cherry picked from commit e8263ace39)
(cherry picked from commit 9431091ee0)
2024-11-21 23:24:58 +00:00
Bjoern A. Zeeb c5b8ed13c9 release: install wireless firmware onto disc1 and dvd
Wireless driver firmware is no longer added to the src tree.
In order to have wireless support in the installer for the new drivers
we install the firmware packages onto disc1 (and memstick) and dvd
if built on FreeBSD and NOPKG is not defined (to not break cross-builds
from Linux or OSX and to allow people to opt-out).

Sponsored by:	The FreeBSD Foundation
Submitted by:	cperciva (the orig. commands and where to place them)
Reviewed by:	jrtc27
Approved by:	re (cperciva)
Differential Revision: https://reviews.freebsd.org/D47407

(cherry picked from commit 7e2996c1f5)
(cherry picked from commit b62012538e)
2024-11-21 23:24:53 +00:00
Bjoern A. Zeeb cce4df8b3c bsdinstall: wlanconfig: fix interface UP on (re-)starting wpa_supplicant
Make sure an interface is back up before (re-)starting wpa_supplicant
in wlanconfig not relying on wpa to UP the interface (though we fixed
that).

Sponsored by:	The FreeBSD Foundation
Reviewed by:	emaste (in D47491)
Approved by:	re (cperciva)
Differential Revision: https://reviews.freebsd.org/D47491

(cherry picked from commit 5399052c63)
(cherry picked from commit 7d0c12e1f9)
2024-11-21 23:24:47 +00:00
Bjoern A. Zeeb 03c07bdc8b bsdinstall: add menu to install firmware
Add a menu to the installer to run fwget(8) inside the newly installed
system to install firmware known to be needed.
This requires working netowrking.

This is needed at least for wireless currently for when we entirely
stop shipping new firmware in src.git to have working networking on
the installed system (we already do need this for at least rtw89).

Sponsored by:	The FreeBSD Foundation
Tested with:	4 different iwlwifi chipsets in a system (earlier version)
Suggested improvments by: jrtc27
Approved by:	re (cperciva)
Differential Revision: https://reviews.freebsd.org/D47491

(cherry picked from commit bbe2a1da2d)
(cherry picked from commit 15f6edf20e)
2024-11-21 23:24:41 +00:00
Dag-Erling Smørgrav 80b9b4dacd gpiospi: Fix module dependencies.
Approved by:	re (cperciva)
MFC after:	3 days
Reviewed by:	ray
Differential Revision:	https://reviews.freebsd.org/D47570

(cherry picked from commit 79af8f72b3)
(cherry picked from commit 3bcbd391dd)
2024-11-19 18:53:16 +01:00
Alexander Ziaee 5252ae96ad man4: wifi manuals: revise .Sh HARDWARE + polish some
The Release Hardware Notes are generated from hardware sections in the
manual pages. Create or organize these sections in Wi-Fi driver manuals
for information flow, and perform minor maintenance on them while here.

After some testing, we have determined that a compact column list is
the best for a single column listing in the hardware release notes.
This makes very clean subsections and is for some reason denser than
using a tagged list.

This adds the long requested conversion from netmask to cidr examples.
These examples probably shouldn't even be here, but that is a discussion
for another day.

Reported by: bz (relnotes generation, cidr, test-net-1 ip4addr)
Reported by: grahamperrin (HARDWARE order mentioned in fdp-primer)
Reported by: Graham Percival <[email protected]> (don't prompt)
Reviewed by: bz (anything wrong likely is my polishing fault; incl. iwm.4)
Approved by: re (cperciva)
Differential Revision: https://reviews.freebsd.org/D47508

(cherry picked from commit 8f1a2d507e)
(cherry picked from commit 93b30f1b6c)
(cherry picked from commit 6c140ba126)
2024-11-19 00:36:55 +00:00
Bjoern A. Zeeb dc647e4df9 fwget: add -q for quiet output
Introduce -q to quieten other output (unless -v is also given).

pkg-install(8) currently has no option to allow skipping unavail
packages but it will just fail.
We would realy want to try to install as much firmware found as
possible from the installer.
Work around this by doing one firmware package at a time.
For that it is highly helpful to be able to query (or possibly re-query)
all outstanding fimrware packages.
-q together with -n only shows each package to be installed one by line.

Once https://github.com/freebsd/pkg/issues/2195 will be implemented
we could undo this part of the change and future changes to the installer
and use the new option for pkg-install(8) there.

While here switch to getopts so -qn works and not just -q -n.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	manu
Approved by:    re (cperciva)
Differential Revision: https://reviews.freebsd.org/D47445

(cherry picked from commit 1eb3f15c14)
(cherry picked from commit 814a49d65a)
2024-11-19 00:36:49 +00:00
Bjoern A. Zeeb 8c6df7ead1 release: add wifi-firmware-kmod@release to ship as package
Add the flavored port for all the
supported wireless drivers we recently added support for.

Sponsored by:	The FreeBSD Foundation
Pointed out by:	cperciva (as part of the set of changes)
Reviewed by:	cperciva (#releng)
Approved by:    re (cperciva)
Differential Revision: https://reviews.freebsd.org/D47406

(cherry picked from commit 2483a2d368)
(cherry picked from commit f21cb43c91)
2024-11-19 00:36:40 +00:00
Bjoern A. Zeeb de5496958c LinuxKPI: lockdep fix #includes
Add sys/sytm.h for __diagused which unbreaks compilation of
drm-kmod 5.10-lts on main.

Sponsored by:	The FreeBSD Foundation
Reported by:	Evgenii Khramtsov
PR:		282479
Fixes:		5c92f84bb6
Approved by:	re (cperciva)

(cherry picked from commit 9b2705121b)
(cherry picked from commit 06733ceca6)
2024-11-19 00:36:04 +00:00
Colin Percival 8b0dcdec41 14.2: Switch from "quarterly" to "release" pkgs
Approved by:	re (implicit)
Sponsored by:	Amazon
2024-11-18 11:20:41 -08:00
Colin Percival bcd5f95735 14.2: Update to BETA3
Approved by:	re (implicit)
Sponsored by:	Amazon
2024-11-15 15:23:22 -08:00
Kirk McKusick c16d0924db Revert commit 8733bc277a
Author: Mateusz Guzik <[email protected]>
Date:   Thu Sep 14 16:13:01 2023 +0000

    vfs: don't provoke recycling non-free vnodes without a good reason

    If the total number of free vnodes is at or above target, there is no
    point creating more of them.

This commit was done as a performance optimization but ends up
causing slowdowns when doing operations on many files.

Approved by:	re (cperciva)
Requested by:   re (cperciva)

(cherry picked from commit ab05a1cf32)
(cherry picked from commit 2ca9c96dc0)
2024-11-15 15:23:13 -08:00
Colin Percival f0bfc02cba release: Don't copy container images into /ftp/
These are installed into /ociimages/ and stage onto the download site
at /OCI-IMAGES/; they don't belong in the same directory as the
"distribution" .txz files.

Approved by:	re (cperciva)
Fixes:		d03c82c28d ("release: add optional OCI images")
MFC after:	1 minute
Sponsored by:	Amazon

(cherry picked from commit 976e1d36be)
(cherry picked from commit a8bdbdbdba)
2024-11-15 15:23:09 -08:00
Colin Percival 0aeaf495ba release: Exclude container images from globs
We use a *.txz glob to get all of the "distributions" which comprise
the FreeBSD release, but we now (optionally) also build container
images which are .txz files.  Grep those out from the distribution
lists.

A better long-term fix would probably be to generate an explicit list
of the .txz files we want rather than using an overbroad glob and
filtering out the files we *don't* want.

Approved by:	re (cperciva)
Fixes:		d03c82c28d ("release: add optional OCI images")
MFC after:	1 minute
Sponsored by:	Amazon

(cherry picked from commit 47866cdcc7)
(cherry picked from commit 012bb7fdaf)
2024-11-15 15:23:06 -08:00
Jessica Clarke 9513b68501 bsd.subdir.mk: Drop broken optimisation for realinstall parallelisation
Not all of the tree is happy for realinstall to be done in parallel. In
particular, Makefile.inc1 uses .WAIT to force etc to be installed after
earlier subdirectories, since etc calls into share/man's makedb to run
makewhatis on the tree and needs all manpages to have been installed.
Also, libexec/Makefile doesn't set SUBDIR_PARALLEL, and the link from
ld-elf32.1 to ld-elf.1 relies on rtld-elf having been installed before
rtld-elf32, otherwise creating the link will fail.

In general, core behavioural differences like this between NO_ROOT and
"normal" builds are also dangerous and confusing.

If this optimisation is deemed important, it should be reintroduced in a
more limited and robust manner that doesn't break the above situations.
Until then value correctness over slight efficiency gains on high core
count machines, the same machines where you're more likely to encounter
issues from this optimisation.

This reverts commits cd19ecdbdc ("Similar to r296013 for NO_ROOT,
force SUBDIR_PARALLEL for buildworld WORLDTMP staging.") and
b9c6f31681 ("Add more STANDALONE_SUBDIR_TARGETS.").

Approved by:	re (cperciva)
Found by:	CheriBSD Jenkins
Reviewed by:	bdrewery, brooks
Fixes:		cd19ecdbdc ("Similar to r296013 for NO_ROOT, force SUBDIR_PARALLEL for buildworld WORLDTMP staging.")
Fixes:		b9c6f31681 ("Add more STANDALONE_SUBDIR_TARGETS.")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D43705

(cherry picked from commit fbae308319)
(cherry picked from commit 125ce840bc)
2024-11-15 15:23:02 -08:00
Colin Percival 2594b7675a release: Publish OCI images on "ftp" mirrors
If WITH_OCIIMAGES is set, "make ftp-stage" will now publish those bits
into a directory under /OCI-IMAGES/, similar to how we publish CI and
VM images.

Approved by:	re (cperciva)
MFC after:	1 minute

(cherry picked from commit e95e3e6eb7)
(cherry picked from commit e8c5d6f6b8)
2024-11-15 15:22:58 -08:00
Doug Rabson 8a688fcc24 release: add optional OCI images
This adds three OCI archive format files to the release containing
FreeBSD base images suitable for static linked, dynamic linked and shell
workloads. The shell image also contains pkg-bootstrap and can be easily
extended by installing packages (including pkgbase packages).

Approved by:	re (cperciva)
Reviewed by: dch, cpersiva, jlduran, zlei
Differential Revision: https://reviews.freebsd.org/D46759
MFC after: 2 days

(cherry picked from commit d03c82c28d)
(cherry picked from commit 6686056ca3)
2024-11-15 15:22:37 -08:00
Konstantin Belousov 19d23cb8ac vm_object: do not assume that un_pager.devp.dev is cdev
PR:	282533
Approved by:	re (cperciva)

(cherry picked from commit 580340dbda)
(cherry picked from commit 92a9501b6b)
2024-11-13 20:06:36 +02:00
Konstantin Belousov 300d034b3c device_pager: rename the un_pager.devp.dev field to handle
(cherry picked from commit f0c07fe3d0)
(cherry picked from commit c57dc755fa)

Approved by:	re (cperciva)
2024-11-13 20:06:28 +02:00
Austin Shafer 56f0fc0011 ig4(4): Add Meteor Lake PCI IDs
Approved by:	re (cperciva)
PR:		282389
MFC after:	3 days

(cherry picked from commit bab5e3d468)
(cherry picked from commit 5cc7196a81)
2024-11-13 02:27:46 +03:00
Vladimir Kondratyev b8276743e4 iichid(4): Do not power down opened device in attach handler
Some iichid(4) child devices, currently hkbd(4) only, opens parent
device in their attach handlers. That breaks internal iichid(4) state
leading to rejecting any incoming data on software and hardware levels.

Fix it with adding of extra state check in iichid(4) attach handler.

Approved by:	re (cperciva)
Reported by:	many
Submitted by:	trasz (initial version)
PR:		280290
MFC after:	3 days

(cherry picked from commit 018cb11cb7)
(cherry picked from commit c53ec86f0e)
2024-11-13 02:27:30 +03:00
Mark Johnston d86dcfc648 if_bridge: Mask MEXTPG if some members don't support it
Similar to how the network stack needs to use mb_unmapped_to_ext() to
convert mbufs before passing them to an unsupported driver, if_bridge
needs to avoid passing M_EXTPG mbufs to interfaces that don't support
them.  Thus, clear IFCAP_MEXTPG on the bridge if any member interfaces
don't handle unmapped mbufs.

Approved by:	re (kib)
PR:		278245
Reviewed by:	jhb, gallatin
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D47294

(cherry picked from commit 2bbfbf80d3)
(cherry picked from commit 01a3c17d18)
2024-11-11 18:46:06 +00:00
Dimitry Andric 57921ae825 Merge commit d0b9c2c56476 from llvm git (by David CARLIER):
[compiler-rt] Remove SHA2 interceptions for NetBSD/FreeBSD. (#110246)

  To Fix #110215

  Interceptors introduced with 18a7ebda99044473fdbce6376993714ff54e6690

This fixes undesirable runtime failures when using -fsanitize=-address
in combination with -lcrypto.

Direct commit to stable/14, because main already got this change as part
of the llvm-19 import.

Approved by:	re (cperciva)
Reported by:    Theo Buehler <[email protected]>
PR:             281685

(cherry picked from commit 4f1754bcce)
2024-11-09 16:49:52 +00:00
Colin Percival 0ff73c7796 14.2: Update to BETA2
Approved by:	re (implicit)
Sponsored by:	Amazon
2024-11-07 16:00:01 -08:00
Zhenlei Huang a30127914a ndp: Bring back the -A option for the netlink implementation
This was lost during the conversion to netlink.

Reviewed by:	kp
Approved by:	re (cperciva)
Fixes:		91fbe0819b ndp: convert ndp(8) to netlink
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D47234

(cherry picked from commit b6d4e3bee3)
(cherry picked from commit 0de672a594)
2024-11-08 07:26:09 +08:00
Zhenlei Huang 0be04cb5cb ndp: Move the global variable repeat into struct ndp_opts
An upcoming fix for the netlink based implementation requires this
refactoring.

No functional change intended.

Reviewed by:	kp
Approved by:	re (cperciva)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D47233

(cherry picked from commit 12c04071cf)
(cherry picked from commit 54514cfa5a)
2024-11-08 07:26:09 +08:00
Michael Tuexen 35874d28c8 sctp: fix debug message
(cherry picked from commit 518a1163d0)
(cherry picked from commit 0e8faabc27)

Approved by:	re (cperviva)
2024-11-07 01:03:09 +01:00
Michael Tuexen a0bc4ec08b sctp: improve handling of address changes
Identify interfaces consistenly by the pair of the ifn pointer
and the index.
This avoids a use after free when the ifn and or index was reused.

Reported by:	bz, pho, and others

(cherry picked from commit 523913c943)
(cherry picked from commit 331db93815)

Approved by:	re (cperviva)
2024-11-07 01:02:52 +01:00
Michael Tuexen 2a6bd6e37b sctp: garbage collect two unused functions
(cherry picked from commit 470a63cde4)
(cherry picked from commit e3f26ce52b)

Approved by:	re (cperviva)
2024-11-07 01:02:33 +01:00
Michael Tuexen bb6af83fe4 sctp: don't consider the interface name when removing an address
Checking the interface name can not be done consistently, so
don't do it.

(cherry picked from commit bf11fdaf0d)
(cherry picked from commit 66628552a3)

Approved by:	re (cperviva)
2024-11-07 01:02:12 +01:00
Michael Tuexen 33197f22b5 sctp: editorial cleanup
Improve consistency, no functional change intended.

(cherry picked from commit d839cf2fbb)
(cherry picked from commit 107704217b)

Approved by: 	re (cperviva)
2024-11-07 01:01:23 +01:00
Baptiste Daroussin ea310d18b2 nuageinit: add support for OpenStack network config
Add naive support for openstack network config.
if no config driver have been found, try to detect that we are running a
VM on openstack via the smbios information, use the first iface
available and temporary activate dhcp on it, to be able to fetch the
necessary informations for cloudinit.

While here make the rc script execute after devmatch, some ethernet
device might be attached via devmatch and may be needed for cloudinit.

Tested on OVHCloud Public Cloud.

Approved by: 	re (cperviva)
MFC after:	3 weeks
Sponsored by:	OVHCloud

(cherry picked from commit 2775b9b0bc)
(cherry picked from commit 6c682f5c38)
2024-11-07 09:09:54 +01:00
Colin Percival b658d3ea49 release: Remove useless ls
Replace "$((ls *.txz))" with "*.txz"

Approved by:	re (implicit, release build fixes)
Reported by:	jrtc27
Sponsored by:	Amazon

(cherry picked from commit e166fea685)
(cherry picked from commit ce988aa3e8)
2024-11-06 18:53:59 -08:00
Colin Percival c5fc8587ab release: Include -dbg files in dvd image
In 2016, commit 8834318685 reworked the code for excluding -dbg
files from install media, and in the process accidentally broke it
for dvd images ('grep -v' should have been 'grep -vE').

FreeBSD Update builds later began to depend on this, and in any case
since DVD images are intended as "include everything" images there's
no point excluding those; so remove the (broken) filtering from DVD
image builds.

Approved by:	re (implicit, release build fixes)
Sponsored by:	Amazon
MFC after:	2 days

(cherry picked from commit cdfd0600dc)
(cherry picked from commit ba7844e4c9)
2024-11-06 18:53:58 -08:00
Warner Losh 0d2b7892cd loader: Fix boot menu on BIOS
Only the gfx-enabled boot loader supports unicode. Otherwise, we have to
use the old cons25 / ibmpc upper code page drawing characters. Check to
see if we have the gfx.term_drawbox function. If we do, we support the
unicode drawing characters. If we don't, then we have an older loader
that doesn't support it *OR* we have the reduced function, text-only
boot loader. In either of those cases, we need to use the old graphics
characters. Abstract all those details into core.hasUnicode function.

PR: 282465
MFC After: 2 day
Sponsored by: Netflix
Differential Revision:	https://reviews.freebsd.org/D47403

(cherry picked from commit c2ba66d4d0)
(cherry picked from commit f2103edaf5)

Approved-by: re (cperciva)
2024-11-06 16:13:14 -07:00
Dimitry Andric a4c23ad430 bsd.sys.mk: for clang >= 19, similar to gcc >= 8.1, turn off -Werror for
-Wcast-function-type-mismatch.

PR:		280562
Approved by:	re (kib)
MFC after:	1 month

(cherry picked from commit d575077527)
(cherry picked from commit de45d36ffb)
2024-11-06 22:51:39 +01:00
Mark Johnston f675d2bb34 makefs: Remove the warning printed when makefs -t zfs is used
We haven't seen bug reports relating to this feature for a while, so
stop printing a warning.

Approved by:	re (kib)
Reviewed by:	cperciva
MFC after:	2 weeks

(cherry picked from commit d9fe718287)
(cherry picked from commit ef89eefaa8)
2024-11-05 16:19:13 +00:00
Mark Johnston a231e29907 rpc: Fix the definition of xdr_void()
xdr_void() should have type xdrproc_t, make it so.

Approved by:	re (kib)
PR:		280514
Reviewed by:	brooks, dim
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D47340

(cherry picked from commit a5d1cf5e36)
(cherry picked from commit b698c825f3)
2024-11-05 16:17:03 +00:00
Ed Maste d0dcee46d9 libcxxrt: Update to upstream 6f2fdfebcd62
Interesting fixes:

3cbfe5a556fe Avoid noreturn warning on terminate()

(cherry picked from commit 2dccd21949)
(cherry picked from commit d9901a23bd)

Approved by:	re (cperciva)
2024-11-04 23:19:58 -05:00
Ed Maste bc01ae40e4 Cirrus-CI: switch to FreeBSD 13.3
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit b15889d6d2)
(cherry picked from commit a1883e20bc)

Approved by:	re (cperciva)
2024-11-04 23:19:50 -05:00
Paula Breton 58e70f39fd resolver.5: Fix example Google DNS server address
MFC after:	3 days
Signed-off-by:	Paula Breton <[email protected]>

(cherry picked from commit e7f0f4f920)
(cherry picked from commit 3e3e2c6328)

Approved by:	re (cperciva)
2024-11-04 23:19:40 -05:00
Ed Maste 2bc5b1d605 syscons: add deprecation notice
syscons(4) is not compatible with UEFI, does not support UTF-8, and is
Giant-locked.  There is no specific timeline yet for removing it, but
support for the Giant lock is expected to go away in one or two major
release cycles.  Add a deprecation notice to avoid surprises, and help
ensure that any material deficiencies in vt(4) become known.

Reviewed by:	manu, markj, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47396

(cherry picked from commit fc2a3ec6fe)
(cherry picked from commit 8c922db4f3)

Approved by:	re (cperciva)
2024-11-04 23:19:33 -05:00
Warner Losh 0015947451 vt: Fix frequency calcuation for bell
386BSD provided a MD function sysbeep. This took two arguments (pitch
and period). Pitch was jammed into the PIT's divisor directly (which
means the argument was expected to sound a tone at '1193182 / pitch'
Hz). FreeBSD inherited this interface.

In commit e465985885 (svn 177642, Mar 26 2008), phk changed this
function to take a tone to sound in hz. He converted all in-tree
instances of 1193182 / hz to just hz (and kept the few misguided folks
that passed hz directly unchanged -- this was part of what motivated the
change). He converted the places where we pre-computed the 8254 divisor
from being pitch to 1193182 / pitch (since that converts the divisor to
the frequency and the interfaces that were exposed to userland exposed
it in these units in places, continuing the tradition inherited from SCO
System V/386 Unix in spots).

In 2009, Ed Shouten was contracted by the FreeBSD Foundation to write /
finish newcons. This work was done in perforce and was imported into
subversion in user/ed/newcons in revision 199072
(https://svnweb.freebsd.org/base?view=revision&revision=199072) which
was later imported into FreeBSD by ray@ (Aleksandr Rybalko).

From that earliest import into svn import to this date, we ring the bell
with:
      sysbeep(1193182 / VT_BELLPITCH, VT_BELLDURATION);
where VT_BELLPITCH was defined to be 800. This results in a bell
frequency of 1491Hz, more or less today. This is similar to the
frequency that syscons and pcvt used (1493Hz and 1500Hz respectively).
This in turn was inherited from 386BSD, it seems, which used the hard
coded value 0x31b which is 795 -> 1500Hz.

This '800' was intended to be the bell tone (eg 800Hz) and this
interface was one that wasn't converted. The most common terminal prior
to the rise of PCs was the VT100, which had an approximately 800Hz
bell. Ed Shouten has confirmed that the original intent was 800Hz and
changing this was overlooked after the change to -current was made.
This restors that original intent and makes the bell less obnoxious in
the process.

Reviewed by:		des, adrian
Differential Revision:	https://reviews.freebsd.org/D32594
Sponsored by:		Netflix

(cherry picked from commit ba48d52ca6)

This change was accidentally reverted in 80f21bb039.

(cherry picked from commit 2416be588e)
(cherry picked from commit 1c9f1cb4f0)

Approved by:	re (cperciva)
2024-11-04 23:19:22 -05:00
Ed Maste a752de91d0 kbdcontrol: correct bell frequency for vt(4)
Do the `1193182 / pitch` hack only for sc(4).

PR:		281713
Reported by:	Rudolf Polzer
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46803

(cherry picked from commit f65c19a242)
(cherry picked from commit 2234362780)

Approved by:	re (cperciva)
2024-11-04 23:19:13 -05:00
Ravi Pokala ac2e98ed57 modules: gpioaei: Fix arm64.LINT-FDT breakage
'acpi_if.h' was accidentally omitted from the module Makefile; add it.

Approved by:	re (kib)
Fixes:	9709bda03c
(cherry picked from commit bb8b3b1741)
(cherry picked from commit 393bbd23b3)
2024-11-03 08:15:52 -08:00
Colin Percival 3166167784 modules: gpioaei only on ACPI-supporting archs
Approved by:	re (kib)
Fixes:	9709bda03c ("GPIO: Add ACPI _AEI support")
Pointy-hat to:	cperciva
Sponsored by:	Amazon

(cherry picked from commit 6540ac1184)
(cherry picked from commit 5a53843aef)
2024-11-03 08:15:45 -08:00
Colin Percival 1db6ffb2a4 GPIO: Add ACPI _AEI support
Changes to acpi_gpiobus.c handle discovering and parsing the _AEI
objects and storing necessary data in device ivars.  A new gpioaei.c
file implements the device, which simply requests an interrupt when
the pin is triggered and invokes the appropriate _Exx or _Lxx ACPI
method.

This makes the GPIO "power button" work on arm64 Graviton systems,
allowing EC2 "Stop"/"Reboot" instance calls to be handled cleanly.
(Prior to this change, those requests would time out after 4 minutes
and the instance would be forcibly killed.)

Reviewed by:	imp, andrew, Ahmad Khalifa
Approved by:	re (kib)
MFC after:	3 days
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D47253
Co-authored-by:	Andrew Turner <[email protected]>

(cherry picked from commit 9709bda03c)
(cherry picked from commit c2cd78d944)
2024-11-03 08:15:39 -08:00
Andrew Turner 4b4c7b1924 bus: Activate INTRNG interrupts in common code
[MFC note: This is not a direct cherry-pick due to API changes in HEAD
which are not present in stable/14.]

We need to call into INTRNG to activate all interrupts on platforms that
use it.  Currently, interrupts are only activated in the nexus drivers for
INTRNG platforms, but this does not handle other bus devices such as
gpiobus that manage their own IRQ space.

Reported by:	cperciva
Reviewed by:	cperciva, jhb
Approved by:	re (kib)
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D47282

(cherry picked from commit c85855a72d)
(cherry picked from commit c54bdf84d5)
2024-11-03 08:15:34 -08:00
Colin Percival aeba4bd10f acpi_gpiobus: Narrow scope of NOT_YET
GPIO interrupts work just fine and will be used shortly.  We still
do not support GPIO_INTR_SHAREABLE however, so leave that within
the NOT_YET scope.

Reviwed by:	andrew
Approved by:	re (kib)
MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D47251

(cherry picked from commit 2d4219919a)
(cherry picked from commit 1f69417607)
2024-11-03 08:15:30 -08:00
Colin Percival 193a9943ba gpiobus: Make gpiobus_read_ivar extern
This allows acpi_gpiobus to override the method and fall back to the
generic gpiobus_read_ivar function if needed.

Reviewed by:	andrew
Approved by:	re (kib)
MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D47250

(cherry picked from commit bc0d10d01c)
(cherry picked from commit fffdfe2f67)
2024-11-03 08:15:27 -08:00
Colin Percival 28b881840d ACPI: Add ACPI_Q_AEI_NOPULL quirk and use in EC2
AWS Graviton [1234] systems have a bug in their ACPI where they mark
the PL061's GPIO pins as needing to be configured in PullUp mode (in
fact the PL061 has no pullup/pulldown resistors); this flag needs to
be removed in order for _AEI objects to be handled on these systems.

Reviewed by:	Ali Saidi
Approved by:	re (kib)
MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D47239

(cherry picked from commit 2f3f867ac6)
(cherry picked from commit 5fa51c3653)
2024-11-03 08:15:22 -08:00
Colin Percival 98ed0edd1a sys: Add GPIO_INTR_EDGE_MASK define
This is the GPIO_INTR_EDGE_* flags, just as a convenience to let code
test flags for interrupt edginess.

Approved by:	re (kib)
Sponsored by:	Amazon

(cherry picked from commit f6197f2bc0)
(cherry picked from commit bebff69739)
2024-11-03 08:15:19 -08:00
Colin Percival c90ebd3fa3 ACPI: Implement power button on !x86
ACPI sleep states are only implemented on x86 systems, so having the
ACPI power button attempt to enter "S5" (or other state as configured
via the hw.acpi.power_button_state sysctl) is not useful.

On non-x86 systems, implement the power button with a call to
    shutdown_nice(RB_POWEROFF)
to shut down the system.

Reviewed by:	Andrew
Tested on:	Graviton 2
Approved by:	re (kib)
MFC after:	2 weeks
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D47094

(cherry picked from commit f41ef9d80b)
(cherry picked from commit e177e64294)
2024-11-03 08:15:12 -08:00
Colin Percival 574e7bad4a acpi_gpiobus: OR GPIO_PIN_(IN|OUT)PUT into flags
Right now flags is set to 0 before this "=" -> "|=" change, but it will
matter when the NOT_YET section above becomes effective.

Approved by:	re (kib)
MFC after:	2 weeks
Sponsored by:	Amazon

(cherry picked from commit c808132731)
(cherry picked from commit 7c8f273bfb)
2024-11-03 08:15:07 -08:00
Ahmad Khalifa ce99ca6967 gpiobus(4): Add an acpi variant of gpiobus
This currently only implements the address space handler and attempts to
configure pins with flags obtained from ACPI.

Reviewed by:	wulf
Approved by:	re (kib)
MFC after:	1 month
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1359

(cherry picked from commit 92adaa5862)
(cherry picked from commit 14887d2c86)
2024-11-03 08:14:33 -08:00
Colin Percival 603608e520 14.2: create releng/14.2 branch
Update from PRERELEASE to BETA1
Switch pkg(8) configuration to use the quarterly repository
Bump __FreeBSD_version

Approved by:	re (implicit)
Sponsored by:	Amazon
2024-10-31 17:02:35 -07:00
95 changed files with 2219 additions and 951 deletions

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ compute_engine_instance:
# gcloud compute images list --project freebsd-org-cloud-dev --no-standard-images
platform: freebsd
image_project: freebsd-org-cloud-dev
image: freebsd-13-2-release-amd64
image: freebsd-13-3-release-amd64
cpu: 8
memory: 8G
disk: 40
+3
View File
@@ -12,6 +12,9 @@ Items affecting the ports and packages system can be found in
/usr/ports/UPDATING. Please read that file before updating system packages
and/or ports.
20241203:
14.2-RELEASE.
20240419:
Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have
been upgraded to 18.1.6. It is important that you run `make delete-old`
+16 -10
View File
@@ -237,7 +237,7 @@ static_assert(offsetof(__cxa_dependent_exception, unwindHeader) ==
namespace std
{
void unexpected();
[[noreturn]] void unexpected();
class exception
{
public:
@@ -1530,28 +1530,34 @@ namespace std
if (0 != info && 0 != info->terminateHandler)
{
info->terminateHandler();
// Should not be reached - a terminate handler is not expected to
// return.
abort();
}
terminateHandler.load()();
else
{
terminateHandler.load()();
}
// Should not be reached - a terminate handler is not expected
// to return.
abort();
}
/**
* Called when an unexpected exception is encountered (i.e. an exception
* violates an exception specification). This calls abort() unless a
* custom handler has been set..
*/
void unexpected()
[[noreturn]] void unexpected()
{
static __cxa_thread_info *info = thread_info();
if (0 != info && 0 != info->unexpectedHandler)
{
info->unexpectedHandler();
// Should not be reached - a terminate handler is not expected to
// return.
abort();
}
unexpectedHandler.load()();
else
{
unexpectedHandler.load()();
}
// Should not be reached - a unexpected handler is not expected
// to return.
abort();
}
/**
* Returns whether there are any exceptions currently being thrown that
@@ -8809,83 +8809,6 @@ INTERCEPTOR(char *, RMD160Data, u8 *data, SIZE_T len, char *buf) {
#define INIT_RMD160
#endif
#if SANITIZER_INTERCEPT_MD5
INTERCEPTOR(void, MD5Init, void *context) {
void *ctx;
COMMON_INTERCEPTOR_ENTER(ctx, MD5Init, context);
REAL(MD5Init)(context);
if (context)
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, context, MD5_CTX_sz);
}
INTERCEPTOR(void, MD5Update, void *context, const unsigned char *data,
unsigned int len) {
void *ctx;
COMMON_INTERCEPTOR_ENTER(ctx, MD5Update, context, data, len);
if (data && len > 0)
COMMON_INTERCEPTOR_READ_RANGE(ctx, data, len);
if (context)
COMMON_INTERCEPTOR_READ_RANGE(ctx, context, MD5_CTX_sz);
REAL(MD5Update)(context, data, len);
if (context)
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, context, MD5_CTX_sz);
}
INTERCEPTOR(void, MD5Final, unsigned char digest[16], void *context) {
void *ctx;
COMMON_INTERCEPTOR_ENTER(ctx, MD5Final, digest, context);
if (context)
COMMON_INTERCEPTOR_READ_RANGE(ctx, context, MD5_CTX_sz);
REAL(MD5Final)(digest, context);
if (digest)
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, digest, sizeof(unsigned char) * 16);
}
INTERCEPTOR(char *, MD5End, void *context, char *buf) {
void *ctx;
COMMON_INTERCEPTOR_ENTER(ctx, MD5End, context, buf);
if (context)
COMMON_INTERCEPTOR_READ_RANGE(ctx, context, MD5_CTX_sz);
char *ret = REAL(MD5End)(context, buf);
if (ret)
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ret, MD5_return_length);
return ret;
}
INTERCEPTOR(char *, MD5File, const char *filename, char *buf) {
void *ctx;
COMMON_INTERCEPTOR_ENTER(ctx, MD5File, filename, buf);
if (filename)
COMMON_INTERCEPTOR_READ_RANGE(ctx, filename, internal_strlen(filename) + 1);
char *ret = REAL(MD5File)(filename, buf);
if (ret)
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ret, MD5_return_length);
return ret;
}
INTERCEPTOR(char *, MD5Data, const unsigned char *data, unsigned int len,
char *buf) {
void *ctx;
COMMON_INTERCEPTOR_ENTER(ctx, MD5Data, data, len, buf);
if (data && len > 0)
COMMON_INTERCEPTOR_READ_RANGE(ctx, data, len);
char *ret = REAL(MD5Data)(data, len, buf);
if (ret)
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ret, MD5_return_length);
return ret;
}
#define INIT_MD5 \
COMMON_INTERCEPT_FUNCTION(MD5Init); \
COMMON_INTERCEPT_FUNCTION(MD5Update); \
COMMON_INTERCEPT_FUNCTION(MD5Final); \
COMMON_INTERCEPT_FUNCTION(MD5End); \
COMMON_INTERCEPT_FUNCTION(MD5File); \
COMMON_INTERCEPT_FUNCTION(MD5Data)
#else
#define INIT_MD5
#endif
#if SANITIZER_INTERCEPT_FSEEK
INTERCEPTOR(int, fseek, __sanitizer_FILE *stream, long int offset, int whence) {
void *ctx;
@@ -9016,107 +8939,6 @@ INTERCEPTOR(char *, MD2Data, const unsigned char *data, unsigned int len,
#define INIT_MD2
#endif
#if SANITIZER_INTERCEPT_SHA2
#define SHA2_INTERCEPTORS(LEN, SHA2_STATE_T) \
INTERCEPTOR(void, SHA##LEN##_Init, void *context) { \
void *ctx; \
COMMON_INTERCEPTOR_ENTER(ctx, SHA##LEN##_Init, context); \
REAL(SHA##LEN##_Init)(context); \
if (context) \
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, context, SHA##LEN##_CTX_sz); \
} \
INTERCEPTOR(void, SHA##LEN##_Update, void *context, \
const u8 *data, SIZE_T len) { \
void *ctx; \
COMMON_INTERCEPTOR_ENTER(ctx, SHA##LEN##_Update, context, data, len); \
if (data && len > 0) \
COMMON_INTERCEPTOR_READ_RANGE(ctx, data, len); \
if (context) \
COMMON_INTERCEPTOR_READ_RANGE(ctx, context, SHA##LEN##_CTX_sz); \
REAL(SHA##LEN##_Update)(context, data, len); \
if (context) \
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, context, SHA##LEN##_CTX_sz); \
} \
INTERCEPTOR(void, SHA##LEN##_Final, u8 digest[LEN/8], \
void *context) { \
void *ctx; \
CHECK_EQ(SHA##LEN##_digest_length, LEN/8); \
COMMON_INTERCEPTOR_ENTER(ctx, SHA##LEN##_Final, digest, context); \
if (context) \
COMMON_INTERCEPTOR_READ_RANGE(ctx, context, SHA##LEN##_CTX_sz); \
REAL(SHA##LEN##_Final)(digest, context); \
if (digest) \
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, digest, \
sizeof(digest[0]) * \
SHA##LEN##_digest_length); \
} \
INTERCEPTOR(char *, SHA##LEN##_End, void *context, char *buf) { \
void *ctx; \
COMMON_INTERCEPTOR_ENTER(ctx, SHA##LEN##_End, context, buf); \
if (context) \
COMMON_INTERCEPTOR_READ_RANGE(ctx, context, SHA##LEN##_CTX_sz); \
char *ret = REAL(SHA##LEN##_End)(context, buf); \
if (ret) \
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ret, SHA##LEN##_return_length); \
return ret; \
} \
INTERCEPTOR(char *, SHA##LEN##_File, const char *filename, char *buf) { \
void *ctx; \
COMMON_INTERCEPTOR_ENTER(ctx, SHA##LEN##_File, filename, buf); \
if (filename) \
COMMON_INTERCEPTOR_READ_RANGE(ctx, filename, internal_strlen(filename) + 1);\
char *ret = REAL(SHA##LEN##_File)(filename, buf); \
if (ret) \
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ret, SHA##LEN##_return_length); \
return ret; \
} \
INTERCEPTOR(char *, SHA##LEN##_FileChunk, const char *filename, char *buf, \
OFF_T offset, OFF_T length) { \
void *ctx; \
COMMON_INTERCEPTOR_ENTER(ctx, SHA##LEN##_FileChunk, filename, buf, offset, \
length); \
if (filename) \
COMMON_INTERCEPTOR_READ_RANGE(ctx, filename, internal_strlen(filename) + 1);\
char *ret = REAL(SHA##LEN##_FileChunk)(filename, buf, offset, length); \
if (ret) \
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ret, SHA##LEN##_return_length); \
return ret; \
} \
INTERCEPTOR(char *, SHA##LEN##_Data, u8 *data, SIZE_T len, char *buf) { \
void *ctx; \
COMMON_INTERCEPTOR_ENTER(ctx, SHA##LEN##_Data, data, len, buf); \
if (data && len > 0) \
COMMON_INTERCEPTOR_READ_RANGE(ctx, data, len); \
char *ret = REAL(SHA##LEN##_Data)(data, len, buf); \
if (ret) \
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ret, SHA##LEN##_return_length); \
return ret; \
}
SHA2_INTERCEPTORS(224, u32)
SHA2_INTERCEPTORS(256, u32)
SHA2_INTERCEPTORS(384, u64)
SHA2_INTERCEPTORS(512, u64)
#define INIT_SHA2_INTECEPTORS(LEN) \
COMMON_INTERCEPT_FUNCTION(SHA##LEN##_Init); \
COMMON_INTERCEPT_FUNCTION(SHA##LEN##_Update); \
COMMON_INTERCEPT_FUNCTION(SHA##LEN##_Final); \
COMMON_INTERCEPT_FUNCTION(SHA##LEN##_End); \
COMMON_INTERCEPT_FUNCTION(SHA##LEN##_File); \
COMMON_INTERCEPT_FUNCTION(SHA##LEN##_FileChunk); \
COMMON_INTERCEPT_FUNCTION(SHA##LEN##_Data)
#define INIT_SHA2 \
INIT_SHA2_INTECEPTORS(224); \
INIT_SHA2_INTECEPTORS(256); \
INIT_SHA2_INTECEPTORS(384); \
INIT_SHA2_INTECEPTORS(512)
#undef SHA2_INTERCEPTORS
#else
#define INIT_SHA2
#endif
#if SANITIZER_INTERCEPT_VIS
INTERCEPTOR(char *, vis, char *dst, int c, int flag, int nextc) {
void *ctx;
@@ -10542,10 +10364,8 @@ static void InitializeCommonInterceptors() {
INIT_SHA1;
INIT_MD4;
INIT_RMD160;
INIT_MD5;
INIT_FSEEK;
INIT_MD2;
INIT_SHA2;
INIT_VIS;
INIT_CDB;
INIT_GETFSENT;
@@ -559,10 +559,8 @@
#define SANITIZER_INTERCEPT_SHA1 SI_NETBSD
#define SANITIZER_INTERCEPT_MD4 SI_NETBSD
#define SANITIZER_INTERCEPT_RMD160 SI_NETBSD
#define SANITIZER_INTERCEPT_MD5 (SI_NETBSD || SI_FREEBSD)
#define SANITIZER_INTERCEPT_FSEEK (SI_NETBSD || SI_FREEBSD)
#define SANITIZER_INTERCEPT_MD2 SI_NETBSD
#define SANITIZER_INTERCEPT_SHA2 (SI_NETBSD || SI_FREEBSD)
#define SANITIZER_INTERCEPT_CDB SI_NETBSD
#define SANITIZER_INTERCEPT_VIS (SI_NETBSD || SI_FREEBSD)
#define SANITIZER_INTERCEPT_POPEN SI_POSIX
+1 -1
View File
@@ -281,7 +281,7 @@ struct xdr_discrim {
* These are the "generic" xdr routines.
*/
__BEGIN_DECLS
extern bool_t xdr_void(void);
extern bool_t xdr_void(XDR *, void *);
extern bool_t xdr_int(XDR *, int *);
extern bool_t xdr_u_int(XDR *, u_int *);
extern bool_t xdr_long(XDR *, long *);
+1 -1
View File
@@ -43,7 +43,7 @@
.4byte NT_FREEBSD_ABI_TAG
1: .asciz NOTE_FREEBSD_VENDOR
2: .p2align 2
3: .4byte __FreeBSD_version
3: .4byte 1402000
4:
.section .note.GNU-stack,"",%progbits
+1 -3
View File
@@ -88,13 +88,11 @@ xdr_free(xdrproc_t proc, void *objp)
* XDR nothing
*/
bool_t
xdr_void(void)
xdr_void(XDR *xdrs __unused, void *ptr __unused)
{
return (TRUE);
}
/*
* XDR integers
*/
+37 -8
View File
@@ -2,7 +2,7 @@
#
# PROVIDE: nuageinit
# REQUIRE: mountcritlocal zfs
# REQUIRE: mountcritlocal zfs devmatch
# BEFORE: NETWORKING
# KEYWORD: firstboot
@@ -14,6 +14,18 @@ start_cmd="nuageinit_start"
stop_cmd=":"
rcvar="nuageinit_enable"
fetch_openstack()
{
cd /media/nuageinit/openstack/latest
for file in meta_data.json network_data.json user_data; do
fetch http://169.254.169.254/openstack/latest/$file || :
done
if [ -f user_data ]; then
chmod 755 user_data
fi
cd -
}
nuageinit_start()
{
local citype
@@ -34,13 +46,28 @@ nuageinit_start()
fi
unset drive
done
if [ -z "$drive" ]; then
# try to detect networked based instance
err 1 "Impossible to find a cloud init provider"
if [ -n "$drive" ]; then
mkdir -p /media/nuageinit
fs=$(fstyp $drive 2> /dev/null)
mount -t $fs $drive /media/nuageinit
else
product=$(kenv smbios.system.product)
case "$product" in
OpenStack*)
mkdir -p /media/nuageinit/openstack/latest
ifaces=$(ifconfig -l ether)
set -- $ifaces
dhclient -p /tmp/ephemeraldhcp.pid $1
fetch_openstack
pkill -F /tmp/ephemeraldhcp.pid
citype=config-2
;;
*)
# try to detect networked based instance
err 1 "Impossible to find a cloud init provider"
;;
esac
fi
mkdir -p /media/nuageinit
fs=$(fstyp $drive 2> /dev/null)
mount -t $fs $drive /media/nuageinit
# according to the specification, the content is either
# in the openstack or ec2 directory
case "$citype" in
@@ -59,8 +86,10 @@ nuageinit_start()
esac
if [ -n "$drive" ]; then
umount /media/nuageinit
rmdir /media/nuageinit
else
rm -rf /media/nuageinit
fi
rmdir /media/nuageinit
}
load_rc_config $name
+32 -9
View File
@@ -7,14 +7,16 @@
# memstick: Builds memory stick image (memstick.img)
# mini-memstick: Builds minimal memory stick image (mini-memstick.img)
# ftp: Sets up FTP distribution area (ftp)
# release: Invokes real-release, vm-release, and cloudware-release targets
# release: Invokes real-release, vm-release, cloudware-release and oci-release targets
# real-release: Build all media and FTP distribution area
# vm-release: Build all virtual machine image targets
# cloudware-release: Build all cloud hosting provider targets
# install: Invokes the release-install and vm-install targets
# oci-release: Build all OCI container images
# install: Invokes the release-install, vm-install and oci-install targets
# release-install: Copies all release installation media into ${DESTDIR}
# vm-install: Copies all virtual machine images into ${DESTDIR}
# cloud-install: Copies non-uploaded cloud images into ${DESTDIR}
# oci-install: Copies all OCI container images into ${DESTDIR}
#
# Variables affecting the build process:
# WORLDDIR: location of src tree -- must have built world and default kernel
@@ -68,6 +70,17 @@ VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH}
.endfor
.endif
.if ${.MAKE.OS} == "FreeBSD"
# For installing packages into the release media.
.if defined(NO_ROOT)
PKG_ENV+= INSTALL_AS_USER=yes
PKG_ARGS+= -o METALOG=METALOG
.endif
PKG_ENV+= ASSUME_ALWAYS_YES=yes
PKG_ARGS+= -r ${.TARGET} -o REPOS_DIR=${.CURDIR}/pkg_repos
PKG_INSTALL= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} install
.endif
.if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL)
VOLUME_LABEL= FreeBSD_Install
.endif
@@ -175,15 +188,19 @@ disc1: packagesystem
-DDB_FROM_SRC )
# Copy distfiles
mkdir -p ${.TARGET}/usr/freebsd-dist
for dist in MANIFEST $$(ls *.txz | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \
for dist in MANIFEST $$(ls *.txz | grep -v container | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \
do cp $${dist} ${.TARGET}/usr/freebsd-dist; \
done
.if defined(NO_ROOT)
echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG
for dist in MANIFEST $$(ls *.txz | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \
for dist in MANIFEST $$(ls *.txz | grep -v container | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \
do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \
done
.endif
.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG))
# Install packages onto release media.
${PKG_INSTALL} wifi-firmware-kmod-release || true
.endif
# Set up installation environment
ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf
echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf
@@ -245,15 +262,19 @@ dvd: packagesystem
-DDB_FROM_SRC )
# Copy distfiles
mkdir -p ${.TARGET}/usr/freebsd-dist
for dist in MANIFEST $$(ls *.txz | grep -v -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \
for dist in MANIFEST $$(ls *.txz | grep -v container); \
do cp $${dist} ${.TARGET}/usr/freebsd-dist; \
done
.if defined(NO_ROOT)
echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG
for dist in MANIFEST $$(ls *.txz | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \
for dist in MANIFEST $$(ls *.txz | grep -v container); \
do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \
done
.endif
.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG))
# Install packages onto release media.
${PKG_INSTALL} wifi-firmware-kmod-release || true
.endif
# Set up installation environment
ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf
echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf
@@ -298,7 +319,7 @@ mini-memstick.img: bootonly-memstick
cd bootonly-memstick && sh ${.CURDIR}/${TARGET}/make-memstick.sh .${NO_ROOT:D/METALOG} ../${.TARGET}
packagesystem: ${DISTRIBUTIONS}
sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST
sh ${.CURDIR}/scripts/make-manifest.sh $$(ls *.txz | grep -v container) > MANIFEST
touch ${.TARGET}
pkg-stage: dvd
@@ -318,8 +339,9 @@ ftp: packagesystem
rm -rf ftp
mkdir -p ftp
cp *.txz MANIFEST ftp
rm -f ftp/container-*.txz
release: real-release vm-release cloudware-release
release: real-release vm-release cloudware-release oci-release
${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} release-done
true
@@ -330,7 +352,7 @@ real-release:
${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj
${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS}
install: release-install vm-install .WAIT cloud-install
install: release-install vm-install oci-install .WAIT cloud-install
release-install:
.if defined(DESTDIR) && !empty(DESTDIR)
@@ -350,3 +372,4 @@ release-install:
.include "${.CURDIR}/Makefile.inc1"
.include "${.CURDIR}/Makefile.vm"
.include "${.CURDIR}/Makefile.oci"
+53
View File
@@ -58,6 +58,11 @@ STAGE_TARGETS+= ci-images-stage
CI_DIR= ${TLD}/CI-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH}
.endif
.if defined(WITH_OCIIMAGES) && !empty(WITH_OCIIMAGES)
STAGE_TARGETS+= oci-images-stage
OCI_DIR= ${TLD}/OCI-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH}
.endif
CLEANFILES+= ${STAGE_TARGETS}
CHECKSUM_FILES?= SHA512 SHA256
SNAP_SUFFIX!= echo ${_SNAP_SUFFIX:S,^-,,1} | tr -d ' '
@@ -333,5 +338,53 @@ ci-images-stage:
. endfor
.endif
oci-images-stage:
mkdir -p ${OCI_DIR}
.if defined(SNAPSHOT) && !empty(SNAPSHOT)
. if exists(${OCI_DIR}/Latest)
rm -rf ${OCI_DIR}/Latest
. endif
mkdir -p ${OCI_DIR}/Latest
mkdir -p ${OCI_DIR}/${BUILDDATE}
. for _IMG in ${OCI_IMAGES}
cd ${RELEASEDIR}/ociimages && \
mv container-image-${_IMG}.txz \
${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz
cp ${RELEASEDIR}/ociimages/${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz \
${OCI_DIR}/${BUILDDATE}/${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz
cd ${OCI_DIR}/Latest && \
ln -s ../${BUILDDATE}/${OSRELEASE}-container-image-${SNAP_SUFFIX}-${_IMG}.txz \
${OSRELEASE}-container-image-${_IMG}.txz
. endfor
cd ${RELEASEDIR}/ociimages && rm -f CHECKSUM.*
. for CHECKSUM in ${CHECKSUM_FILES}
cd ${RELEASEDIR}/ociimages && \
${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX}
cp -p ${RELEASEDIR}/ociimages/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \
${OCI_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX}
cd ${OCI_DIR}/Latest && \
ln -s ../${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \
CHECKSUM.${CHECKSUM}
. endfor
.else # not snapshot
. if exists(${OCI_DIR}/Latest)
rm -rf ${OCI_DIR}/Latest
. endif
mkdir -p ${OCI_DIR}/Latest
. for _IMG in ${OCI_IMAGES}
cd ${RELEASEDIR}/ociimages && \
mv container-image-${_IMG}.txz \
${OSRELEASE}-container-image-${_IMG}.txz
cp ${RELEASEDIR}/ociimages/${OSRELEASE}-container-image-${_IMG}.txz \
${OCI_DIR}/Latest/${OSRELEASE}-container-image-${_IMG}.txz
. endfor
. for CHECKSUM in ${CHECKSUM_FILES}
cd ${RELEASEDIR}/ociimages && \
${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX}
cp -p ${RELEASEDIR}/ociimages/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \
${OCI_DIR}/Latest/CHECKSUM.${CHECKSUM}
. endfor
.endif
ftp-stage: remove-old-bits ${STAGE_TARGETS}
+34
View File
@@ -0,0 +1,34 @@
#
#
#
# Makefile for building OCI container images.
#
.if defined(WITH_OCIIMAGES) && !empty(WITH_OCIIMAGES)
OCI_IMAGES= static dynamic minimal
.endif
oci-install:
.if defined(WITH_OCIIMAGES) && !empty(WITH_OCIIMAGES)
mkdir -p ${DESTDIR}/ociimages
. for _IMG in ${OCI_IMAGES}
cp -p ${.OBJDIR}/container-image-${_IMG}.txz ${DESTDIR}/ociimages
. endfor
.endif
OCI_TARGETS=
OCI_DEPS_static=
OCI_DEPS_dynamic= container-image-static.txz
OCI_DEPS_minimal= container-image-dynamic.txz
.for _IMG in ${OCI_IMAGES}
OCI_TARGETS+= container-image-${_IMG}.txz
container-image-${_IMG}.txz: ${OCI_DEPS_${_IMG}}
sh ${.CURDIR}/scripts/make-oci-image.sh ${.CURDIR} ${REVISION} ${BRANCH} ${TARGET_ARCH} ${_IMG}
skopeo copy \
containers-storage:localhost/freebsd${REVISION:R}-${_IMG}:latest \
oci-archive:${.OBJDIR}/container-image-${_IMG}.tar:freebsd${REVISION:R}-${_IMG}:${REVISION}-${BRANCH}-${TARGET_ARCH}
${XZ_CMD} < ${.OBJDIR}/container-image-${_IMG}.tar > ${.OBJDIR}/container-image-${_IMG}.txz
.endfor
oci-release: ${OCI_TARGETS}
+1 -1
View File
@@ -1,5 +1,5 @@
release: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
url: "pkg+http://pkg.FreeBSD.org/${ABI}/release_2",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
+4
View File
@@ -114,3 +114,7 @@ PORTBRANCH="main"
## If WITH_CLOUDWARE is set to a non-empty value, this is a list of providers
## to create disk images.
#CLOUDWARE="EC2 GCE ORACLE VAGRANT-VIRTUALBOX VAGRANT-VMWARE"
## If WITH_OCIIMAGES is set to a non-empty value, build Open Container
## Initiative (OCI) base images as part of the release.
#WITH_OCIIMAGES=
+46 -1
View File
@@ -120,6 +120,9 @@ env_setup() {
# cloud providers as part of the release.
WITH_CLOUDWARE=
# Set to non-empty to build OCI images as part of the release
WITH_OCIIMAGES=
return 0
} # env_setup()
@@ -195,7 +198,8 @@ env_check() {
RELEASE_RMAKEFLAGS="${ARCH_FLAGS} ${RELEASE_FLAGS} \
KERNCONF=\"${KERNEL}\" ${CONF_FILES} ${SRCPORTS} \
WITH_DVD=${WITH_DVD} WITH_VMIMAGES=${WITH_VMIMAGES} \
WITH_CLOUDWARE=${WITH_CLOUDWARE} XZ_THREADS=${XZ_THREADS}"
WITH_CLOUDWARE=${WITH_CLOUDWARE} WITH_OCIIMAGES=${WITH_OCIIMAGES} \
XZ_THREADS=${XZ_THREADS}"
return 0
} # env_check()
@@ -288,6 +292,44 @@ extra_chroot_setup() {
fi
fi
if [ ! -z "${WITH_OCIIMAGES}" ]; then
# Install buildah and skopeo from ports if the ports tree is available;
# otherwise install the pkg.
if [ -d ${CHROOTDIR}/usr/ports ]; then
# Trick the ports 'run-autotools-fixup' target to do the right
# thing.
_OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U)
REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION)
BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH)
UNAME_r=${REVISION}-${BRANCH}
GITUNSETOPTS="CONTRIB CURL CVS GITWEB GUI HTMLDOCS"
GITUNSETOPTS="${GITUNSETOPTS} ICONV NLS P4 PERL"
GITUNSETOPTS="${GITUNSETOPTS} SEND_EMAIL SUBTREE SVN"
GITUNSETOPTS="${GITUNSETOPTS} PCRE PCRE2"
PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes"
PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}"
PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}"
PBUILD_FLAGS="${PBUILD_FLAGS} WRKDIRPREFIX=/tmp/ports"
PBUILD_FLAGS="${PBUILD_FLAGS} DISTDIR=/tmp/distfiles"
for _PORT in sysutils/buildah sysutils/skopeo; do
eval chroot ${CHROOTDIR} env ${PBUILD_FLAGS} make -C \
/usr/ports/${_PORT} \
FORCE_PKG_REGISTER=1 deinstall install clean distclean
done
else
eval chroot ${CHROOTDIR} env ASSUME_ALWAYS_YES=yes \
pkg install -y sysutils/buildah sysutils/skopeo
eval chroot ${CHROOTDIR} env ASSUME_ALWAYS_YES=yes \
pkg clean -y
fi
# Use the vfs storage driver so that this works whether or not
# the build directory is on ZFS. The images are small so the
# performance difference is negligible.
eval chroot ${CHROOTDIR} sed -I .bak -e '/^driver/s/zfs/vfs/' /usr/local/etc/containers/storage.conf
# Remove any stray images from previous builds
eval chroot ${CHROOTDIR} buildah rmi -af
fi
if [ ! -z "${EMBEDDEDPORTS}" ]; then
_OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U)
REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION)
@@ -323,6 +365,9 @@ chroot_build_target() {
fi
eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld
eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel
if [ ! -z "${WITH_OCIIMAGES}" ]; then
eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} packages
fi
return 0
} # chroot_build_target
+63
View File
@@ -0,0 +1,63 @@
#! /bin/sh
# Build an Open Container Initiative (OCI) container image
curdir=$1; shift
rev=$1; shift
branch=$1; shift
arch=$1; shift
image=$1; shift
major=${rev%.*}
minor=${rev#*.}
abi=FreeBSD:${major}:${arch}
echo "Building OCI freebsd${major}-${image} image for ${abi}"
. ${curdir}/tools/oci-image-${image}.conf
init_workdir() {
local abi=$1; shift
local workdir=$(mktemp -d -t oci-images)
mkdir ${workdir}/repos
cat > ${workdir}/repos/base.conf <<EOF
FreeBSD-base: {
url: "file:///usr/obj/usr/src/repo/${abi}/latest"
signature_type: "none"
fingerprints: "none"
}
EOF
cp /etc/pkg/FreeBSD.conf ${workdir}/repos
echo ${workdir}
}
install_packages() {
local abi=$1; shift
local workdir=$1; shift
local rootdir=$1; shift
if [ ! -d ${rootdir}/usr/share/keys/pkg/trusted ]; then
mkdir -p ${rootdir}/usr/share/keys/pkg/trusted
fi
cp /usr/share/keys/pkg/trusted/* ${rootdir}/usr/share/keys/pkg/trusted
# We install the packages and then remove repository metadata (keeping the
# metadata for what was installed). This trims more than 40Mb from the
# resulting image.
env IGNORE_OSVERSION=yes ABI=${abi} pkg --rootdir ${rootdir} --repo-conf-dir ${workdir}/repos \
install -yq "$@" || exit $?
rm -rf ${rootdir}/var/db/pkg/repos
}
workdir=$(init_workdir ${abi})
if [ -n "${OCI_BASE_IMAGE}" ]; then
base_image=freebsd${major}-${OCI_BASE_IMAGE}
else
base_image=scratch
fi
c=$(buildah from ${base_image})
m=$(buildah mount $c)
oci_image_build
buildah unmount $c
buildah commit --rm $c freebsd${major}-${image}:latest
+1
View File
@@ -19,6 +19,7 @@ graphics/drm-515-kmod
misc/freebsd-doc-all
net/mpd5
net/rsync
net/wifi-firmware-kmod@release
ports-mgmt/pkg
shells/bash
shells/zsh
+5
View File
@@ -63,6 +63,11 @@ ec2_common() {
# nodes, but apply the workaround just in case.
echo 'hw.broken_txfifo="1"' >> ${DESTDIR}/boot/loader.conf
# Graviton 1 through Graviton 4 have a bug in their ACPI where they
# mark the PL061's pins as needing to be configured in PullUp mode
# (in fact the PL061 has no pullup/pulldown resistors).
echo 'debug.acpi.quirks="8"' >> ${DESTDIR}/boot/loader.conf
# Load the kernel module for the Amazon "Elastic Network Adapter"
echo 'if_ena_load="YES"' >> ${DESTDIR}/boot/loader.conf
+11
View File
@@ -0,0 +1,11 @@
#! /bin/sh
# Build Open Container Initiative (OCI) container image suitable as a base for
# dynamic-linked workloads. This adds libraries from the FreeBSD-clibs and
# FreeBSD-openssl-lib packages.
OCI_BASE_IMAGE=static
oci_image_build() {
install_packages ${abi} ${workdir} $m FreeBSD-clibs FreeBSD-openssl-lib
}
+22
View File
@@ -0,0 +1,22 @@
#! /bin/sh
# Build Open Container Initiative (OCI) container image suitable as a base for
# shell-based workloads. This adds FreeBSD-runtime, FreeBSD-pkg-bootstrap and a
# handful of others packages to create a small image which can be easily
# extended by installing packages.
OCI_BASE_IMAGE=dynamic
oci_image_build() {
install_packages ${abi} ${workdir} $m \
FreeBSD-runtime \
FreeBSD-certctl \
FreeBSD-kerberos-lib \
FreeBSD-libarchive \
FreeBSD-libexecinfo \
FreeBSD-libucl \
FreeBSD-fetch \
FreeBSD-rc \
FreeBSD-pkg-bootstrap \
FreeBSD-mtree
}
+42
View File
@@ -0,0 +1,42 @@
#! /bin/sh
# Build Open Container Initiative (OCI) container image suitable as a base for
# static-linked workloads. This contains mtree directories, SSL certificates and
# a few other config files.
OCI_BASE_IMAGE=
oci_image_build() {
mtree -deU -p $m/ -f /etc/mtree/BSD.root.dist > /dev/null
mtree -deU -p $m/var -f /etc/mtree/BSD.var.dist > /dev/null
mtree -deU -p $m/usr -f /etc/mtree/BSD.usr.dist > /dev/null
mtree -deU -p $m/usr/include -f /etc/mtree/BSD.include.dist > /dev/null
mtree -deU -p $m/usr/lib -f /etc/mtree/BSD.debug.dist > /dev/null
install_packages ${abi} ${workdir} $m FreeBSD-caroot FreeBSD-zoneinfo
cp /etc/master.passwd $m/etc
pwd_mkdb -p -d $m/etc $m/etc/master.passwd || return $?
cp /etc/group $m/etc || return $?
cp /etc/termcap.small $m/etc/termcap.small || return $?
cp /etc/termcap.small $m/usr/share/misc/termcap || return $?
env DESTDIR=$m /usr/sbin/certctl rehash
# Generate a suitable repo config for pkgbase
case ${branch} in
CURRENT|STABLE|BETA*)
repo=base_latest
;;
*)
repo=base_release_${minor}
;;
esac
mkdir -p $m/usr/local/etc/pkg/repos
cat > $m/usr/local/etc/pkg/repos/base.conf <<EOF
FreeBSD-base: {
url: "https://pkg.FreeBSD.org/\${ABI}/${repo}",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
EOF
}
+6
View File
@@ -22,6 +22,7 @@ LDIRS= BSD_daemon \
libvgl \
mdoc \
netgraph \
oci \
perfmon \
ppi \
ppp \
@@ -198,6 +199,11 @@ SE_NETGRAPH= \
virtual.chain \
virtual.lan \
SE_DIRS+= oci
SE_OCI= \
README \
Containerfile.pkg
SE_DIRS+= perfmon
SE_PERFMON= \
Makefile \
+27
View File
@@ -0,0 +1,27 @@
# This is an example showing how to extend the freebsd-minimal OCI image by
# installing additional packages while keeping the resulting image as small as
# possible.
# The OS version matching the desired freebsd-minimal image
ARG version=15.0-CURRENT-amd64
# Select freebsd-minimal as our starting point.
FROM localhost/freebsd-minimal:${version}
# A list of package(s) to install
ARG packages
# Install package management tools. We specify 'FreeBSD' as the repository to
# use for downloading pkg since the freebsd-minimal image has both FreeBSD and
# FreeBSD-base pkg repo configs installed and FreeBSD-base does not contain the
# pkg package.
RUN env ASSUME_ALWAYS_YES=yes pkg bootstrap -r FreeBSD && pkg update
# Install some package(s).
RUN pkg install -y ${packages}
# Clean up and remove package management overhead. We delete downloaded
# packages, uninstall pkg and delete the repository metadata downloaded by 'pkg
# install'. This retains the record of which packages are installed in the
# image.
RUN pkg clean -ay && pkg delete -fy pkg && rm -rf /var/db/pkg/repos
+7
View File
@@ -0,0 +1,7 @@
This example Containerfile shows how to add packages to freebsd-minimal while
minimising the package metadata overhead.
For instance, To build a new image called 'my-new-image:latest' containing the
nginx package:
# podman build --squash --build-arg packages=nginx --tag my-new-image:latest -f Containerfile.pkg
+22 -17
View File
@@ -1,3 +1,6 @@
.\"-
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Copyright (c) 2004-2006
.\" Damien Bergamini <[email protected]>. All rights reserved.
.\"
@@ -23,12 +26,12 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd October 15, 2015
.Dd November 10, 2024
.Dt IPW 4
.Os
.Sh NAME
.Nm ipw
.Nd "Intel PRO/Wireless 2100 IEEE 802.11 driver"
.Nd Intel PRO/Wireless 2100 IEEE 802.11a/b driver
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following lines in your
@@ -57,19 +60,14 @@ legal.intel_ipw.license_ack=1
.Sh DESCRIPTION
The
.Nm
driver provides support for the
.Tn Intel
PRO/Wireless 2100 MiniPCI network adapter.
.Nm
supports
driver provides support for Intel PRO/Wireless 2100 802.11a/b
wireless network devices in
.Cm station ,
.Cm adhoc ,
and
.Cm monitor
mode operation.
Only one virtual interface may be configured at any time.
For more information on configuring this device, see
.Xr ifconfig 8 .
.Pp
This driver requires the firmware built with the
.Nm ipwfw
@@ -80,28 +78,34 @@ must be agreed by adding the following line to
.Xr loader.conf 5 :
.Pp
.Dl "legal.intel_ipw.license_ack=1"
.Pp
For more information on configuring this device, see
.Xr ifconfig 8 .
.Sh HARDWARE
The
.Nm
driver provides support for the
Intel PRO/Wireless 2100a/b MiniPCI network adapter.
.Sh FILES
.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw.LICENSE" -compact
.Bl -tag -width "/usr/share/doc/legal/intel_ipw.LICENSE" -compact
.It Pa /usr/share/doc/legal/intel_ipw.LICENSE
.Nm
firmware license
.El
.Sh EXAMPLES
Join an existing BSS network (i.e., connect to an access point):
.Bd -literal -offset indent
ifconfig wlan create wlandev ipw0 inet 192.168.0.20 \e
netmask 0xffffff00
.Ed
.Pp
.Dl ifconfig wlan create wlandev ipw0 inet 192.0.2.20/24
.Pp
Join a specific BSS network with network name
.Dq Li my_net :
.Ar my_net :
.Pp
.Dl "ifconfig wlan create wlandev ipw0 ssid my_net up"
.Dl ifconfig wlan create wlandev ipw0 ssid my_net up
.Pp
Join a specific BSS network with 64-bit WEP encryption:
.Bd -literal -offset indent
ifconfig wlan create wlandev ipw0 ssid my_net \e
wepmode on wepkey 0x1234567890 weptxkey 1 up
wepmode on wepkey 0x1234567890 weptxkey 1 up
.Ed
.Pp
Join a specific BSS network with 128-bit WEP encryption:
@@ -144,6 +148,7 @@ This should not happen.
.Xr wlan_ccmp 4 ,
.Xr wlan_tkip 4 ,
.Xr wlan_wep 4 ,
.Xr networking 7 ,
.Xr ifconfig 8 ,
.Xr wpa_supplicant 8
.Sh AUTHORS
+30 -17
View File
@@ -1,3 +1,6 @@
.\"-
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Copyright (c) 2004-2006
.\" Damien Bergamini <[email protected]>. All rights reserved.
.\"
@@ -23,12 +26,12 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd October 15, 2015
.Dd November 10, 2024
.Dt IWI 4
.Os
.Sh NAME
.Nm iwi
.Nd "Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 driver"
.Nd Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 network driver
.Sh SYNOPSIS
To compile this driver into the kernel,
include the following lines in your
@@ -57,19 +60,14 @@ legal.intel_iwi.license_ack=1
.Sh DESCRIPTION
The
.Nm
driver provides support for
.Tn Intel
PRO/Wireless 2200BG/2915ABG MiniPCI and 2225BG PCI network adapters.
.Nm
supports
driver provides support for Intel PRO/Wireless 2200BG/2225BG/2915ABG
IEEE 802.11a/b/g wireless network devices in
.Cm station ,
.Cm adhoc ,
and
.Cm monitor
mode operation.
Only one virtual interface may be configured at any time.
For more information on configuring this device, see
.Xr ifconfig 8 .
.Pp
This driver requires the firmware built with the
.Nm iwifw
@@ -80,28 +78,42 @@ must be agreed by adding the following line to
.Xr loader.conf 5 :
.Pp
.Dl "legal.intel_iwi.license_ack=1"
.Pp
For more information on configuring this device, see
.Xr ifconfig 8 .
.Sh HARDWARE
The
.Nm
driver supports the following wireless network devices:
.Pp
.Bl -bullet -compact
.It
Intel PRO/Wireless 2200BG MiniPCI Network Connection
.It
Intel PRO/Wireless 2225BG PCI Network Connection
.It
Intel PRO/Wireless 2915ABG MiniPCI Network Connection
.El
.Sh FILES
.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi.LICENSE" -compact
.Bl -tag -width "/usr/share/doc/legal/intel_iwi.LICENSE" -compact
.It Pa /usr/share/doc/legal/intel_iwi.LICENSE
.Nm
firmware license
.El
.Sh EXAMPLES
Join an existing BSS network (i.e., connect to an access point):
.Bd -literal -offset indent
ifconfig wlan create wlandev iwi0 inet 192.168.0.20 \e
netmask 0xffffff00
.Ed
.Pp
.Dl ifconfig wlan create wlandev iwi0 inet 192.0.2.20/24
.Pp
Join a specific BSS network with network name
.Dq Li my_net :
.Ar my_net :
.Pp
.Dl "ifconfig wlan create wlandev iwi0 ssid my_net up"
.Dl ifconfig wlan create wlandev iwi0 ssid my_net up
.Pp
Join a specific BSS network with 64-bit WEP encryption:
.Bd -literal -offset indent
ifconfig wlan create wlandev iwi0 ssid my_net \e
wepmode on wepkey 0x1234567890 weptxkey 1 up
wepmode on wepkey 0x1234567890 weptxkey 1 up
.Ed
.Pp
Join a specific BSS network with 128-bit WEP encryption:
@@ -149,6 +161,7 @@ This should not happen.
.Xr wlan_ccmp 4 ,
.Xr wlan_tkip 4 ,
.Xr wlan_wep 4 ,
.Xr networking 7 ,
.Xr ifconfig 8 ,
.Xr wpa_supplicant 8
.Sh AUTHORS
+48 -19
View File
@@ -1,4 +1,6 @@
.\"-
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Copyright (c) 2021-2024 The FreeBSD Foundation
.\"
.\" This documentation was written by Bj\xc3\xb6rn Zeeb under sponsorship from
@@ -25,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd September 30, 2024
.Dd November 10, 2024
.Dt IWLWIFI 4
.Os
.Sh NAME
@@ -54,11 +56,11 @@ It is discouraged to load the driver from
.Sh DESCRIPTION
The
.Nm
driver is derived from Intel's Linux iwlwifi driver
driver provides support for Intel Wireless network devices.
.Pp
.Nm
will be a successor to
.Xr iwm 4
is derived from Intel's Linux iwlwifi driver, will be a successor to
.Xr iwm 4 ,
and may supersede that driver in the future.
It still complements the
.Xr iwn 4
@@ -66,33 +68,51 @@ driver which supports older chipsets.
.Pp
The driver uses the
.\" No LinuxKPI man pages so no .Xr here.
.Em linuxkpi_wlan
.Sy linuxkpi_wlan
and
.Em linuxkpi
.Sy linuxkpi
compat framework to bridge between the Linux and
native
.Fx
driver code as well as to the native
.Xr net80211 4
wireless stack.
.Pp
While
.Nm
supports all 802.11 a/b/g/n/ac/ax
the compatibility code currently only supports 802.11 a/b/g modes.
Support for 802.11 n/ac is to come. 802.11ax and 6Ghz support are planned.
.Sh HARDWARE
The
.Nm
driver supports PCIe devices from the
.Em mvm
sub-driver with the following chipsets:
.Sy mvm
sub-driver with the following chipset generations:
.Pp
.\" awk -F\\t '{ print $5 }' ~/tmp/iwlwifi_pci_ids_name.txt | \
.\" grep -v undefined | sort -V | uniq | grep -v ^$ | \
.\" awk '{ printf ".It\n%s\n", $0 }'
.Bl -bullet -compact
.It
7000
.It
8000
.It
9000
.It
22000
.It
AX210
.It
BZ
.It
SC
.El
.Pp
These chipset generations match the following common device names:
.Pp
.Bl -bullet -compact
.\" ---------------------------------------------------------------------
.\" --------------------------------------------------------------------
.\" This list is manually generated from a sysctl and post-processing.
.\" Edits will be overwritten on next update.
.\" ---------------------------------------------------------------------
.\" awk -F\\t '{ if ($2 == "") { next; } if (seen[$2]) { next; } \
.\" seen[$2]=1; printf ".It\n%s\n", $2; }' iwlwifi_pci_ids_name.txt
.\" --------------------------------------------------------------------
.It
Intel(R) Dual Band Wireless AC 7260
.It
@@ -209,15 +229,15 @@ Intel(R) TBD Bz device
Intel(R) Wi-Fi 6 AX204 160MHz
.It
Intel(R) TBD Sc device
.\" ---------------------------------------------------------------------
.\" --------------------------------------------------------------------
.El
.Sh BUGS
Certainly.
.Sh SEE ALSO
.Xr iwlwififw 4 ,
.Xr iwm 4 ,
.Xr iwn 4 ,
.Xr wlan 4 ,
.Xr networking 7 ,
.Xr fwget 8 ,
.Xr ifconfig 8 ,
.Xr wpa_supplicant 8
.Sh HISTORY
@@ -225,3 +245,12 @@ The
.Nm
driver first appeared in
.Fx 13.1 .
.Sh BUGS
Certainly.
.Pp
While
.Nm
supports 802.11a/b/g/n/ac/ax modes,
the compatibility code currently only supports 802.11a/b/g modes.
Support for 802.11n/ac/ax is yet to come.
802.11ax and 6Ghz support are planned.
+55 -41
View File
@@ -1,3 +1,6 @@
.\"-
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Copyright (c) 2004-2006
.\" Damien Bergamini <[email protected]>. All rights reserved.
.\"
@@ -23,7 +26,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd February 20, 2024
.Dd November 10, 2024
.Dt IWM 4
.Os
.Sh NAME
@@ -31,8 +34,7 @@
.Nd Intel IEEE 802.11ac wireless network driver
.Sh SYNOPSIS
To compile this driver into the kernel,
include the following lines in your
kernel configuration file:
include the following lines in your kernel configuration file:
.Bd -ragged -offset indent
.Cd "device iwm"
.Cd "device pci"
@@ -79,55 +81,59 @@ iwm9260fw_load="YES"
.Sh DESCRIPTION
The
.Nm
driver provides support for:
.Pp
.Bl -tag -width Ds -offset indent -compact
.It Intel Dual Band Wireless AC 3160
.It Intel Dual Band Wireless AC 3165
.It Intel Dual Band Wireless AC 3168
.It Intel Dual Band Wireless AC 7260
.It Intel Dual Band Wireless AC 7265
.It Intel Dual Band Wireless AC 8260
.It Intel Dual Band Wireless AC 8265
.It Intel Dual Band Wireless AC 9260
.It Intel Dual Band Wireless AC 9270
.It Intel Dual Band Wireless AC 946X
.It Intel Dual Band Wireless AC 9560
.El
.Pp
.Nm
supports
driver supports running most Intel Wireless AC series network devices in
.Cm station
mode operation.
Only one virtual interface may be configured at any time.
For more information on configuring this device, see
.Xr ifconfig 8 .
.Pp
This driver requires the firmware built with the
.Nm iwmfw
.Xr iwmfw 4
module to work.
.Pp
Currently,
For more information on configuring this device, see
.Xr ifconfig 8 .
.Sh HARDWARE
The
.Nm
only supports 802.11b and 802.11g modes.
It will not associate to access points that are configured to operate only
in 802.11n or 802.11ac modes.
driver supports the following PCIe Wi-Fi devices:
.Pp
.Bl -bullet -compact
.It
Intel Dual Band Wireless AC 3160
.It
Intel Dual Band Wireless AC 3165
.It
Intel Dual Band Wireless AC 3168
.It
Intel Dual Band Wireless AC 7260
.It
Intel Dual Band Wireless AC 7265
.It
Intel Dual Band Wireless AC 8260
.It
Intel Dual Band Wireless AC 8265
.It
Intel Dual Band Wireless AC 9260
.It
Intel Dual Band Wireless AC 9270
.It
Intel Dual Band Wireless AC 946X
.It
Intel Dual Band Wireless AC 9560
.El
.Sh EXAMPLES
Join an existing BSS network (i.e., connect to an access point):
.Bd -literal -offset indent
ifconfig wlan create wlandev iwm0 inet 192.168.0.20 \e
netmask 0xffffff00
.Ed
.Pp
.Dl ifconfig wlan create wlandev iwm0 inet 192.0.2.20/24
.Pp
Join a specific BSS network with network name
.Dq Li my_net :
.Ar my_net :
.Pp
.Dl "ifconfig wlan create wlandev iwm0 ssid my_net up"
.Dl ifconfig wlan create wlandev iwm0 ssid my_net up
.Pp
Join a specific BSS network with 64-bit WEP encryption:
.Bd -literal -offset indent
ifconfig wlan create wlandev iwm0 ssid my_net \e
wepmode on wepkey 0x1234567890 weptxkey 1 up
wepmode on wepkey 0x1234567890 weptxkey 1 up
.Ed
.Pp
Join a specific BSS network with 128-bit WEP encryption:
@@ -155,15 +161,16 @@ Verify the
.Xr iwmfw 4
firmware module is present.
.It "iwm%d: could not load boot firmware"
An attempt to upload the boot firmware image to the onboard microcontroller
failed.
An attempt to upload the boot firmware image
to the onboard microcontroller failed.
This should not happen.
.It "iwm%d: could not load microcode"
An attempt to upload the microcode image to the onboard microcontroller failed.
An attempt to upload the microcode image
to the onboard microcontroller failed.
This should not happen.
.It "iwm%d: could not load main firmware"
An attempt to upload the main firmware image to the onboard microcontroller
failed.
An attempt to upload the main firmware image
to the onboard microcontroller failed.
This should not happen.
.El
.Sh SEE ALSO
@@ -174,5 +181,12 @@ This should not happen.
.Xr wlan_ccmp 4 ,
.Xr wlan_tkip 4 ,
.Xr wlan_wep 4 ,
.Xr networking 7 ,
.Xr ifconfig 8 ,
.Xr wpa_supplicant 8
.Sh BUGS
Currently,
.Nm
only supports 802.11a/b/g modes.
It will not associate to access points that are configured to operate
only in 802.11n/ac modes.
+24 -14
View File
@@ -1,4 +1,6 @@
.\"-
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Copyright (c) 2023-2024 Bjoern A. Zeeb
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -22,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd September 30, 2024
.Dd November 10, 2024
.Dt MT7915 4
.Os
.Sh NAME
@@ -50,7 +52,9 @@ It is discouraged to load the driver from
.Sh DESCRIPTION
The
.Nm
driver is derived from MediaTek's Linux mt76 driver.
driver provides support for MediaTek MT7915E wireless network devices.
.Nm
is derived from MediaTek's Linux mt76 driver.
.Pp
This driver requires firmware to be loaded before it will work.
The package
@@ -62,36 +66,34 @@ Otherwise no
.Xr wlan 4
interface can be created using
.Xr ifconfig 8 .
One can use
.Xr fwget 8
to install the correct firmware package.
.Pp
The driver uses the
.\" No LinuxKPI man pages so no .Xr here.
.Em linuxkpi_wlan
.Sy linuxkpi_wlan
and
.Em linuxkpi
.Sy linuxkpi
compat framework to bridge between the Linux and
native
.Fx
driver code as well as to the native
.Xr net80211 4
wireless stack.
.Pp
While
.Nm
supports all 802.11 a/b/g/n/ac and ax
the compatibility code currently only supports 802.11 a/b/g modes.
Support for 802.11 n/ac is to come.
.Sh HARDWARE
The
.Nm
driver supports PCIe devices with the following chipsets:
.Pp
.Bl -tag -width Ds -offset indent -compact
.It MediaTek MT7915E
.Bl -bullet -offset indent -compact
.It
MediaTek MT7915E
.El
.Sh BUGS
Certainly.
.Sh SEE ALSO
.Xr wlan 4 ,
.Xr networking 7 ,
.Xr fwget 8 ,
.Xr ifconfig 8 ,
.Xr wpa_supplicant 8
.Sh HISTORY
@@ -99,3 +101,11 @@ The
.Nm
driver first appeared in
.Fx 14.0 .
.Sh BUGS
Certainly.
.Pp
While
.Nm
supports 802.11a/b/g/n/ac/ax modes,
the compatibility code currently only supports 802.11a/b/g modes.
Support for 802.11n/ac/ax is yet to come.
+24 -14
View File
@@ -1,4 +1,6 @@
.\"-
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Copyright (c) 2023-2024 Bjoern A. Zeeb
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -22,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd September 30, 2024
.Dd November 10, 2024
.Dt MT7921 4
.Os
.Sh NAME
@@ -50,7 +52,9 @@ It is discouraged to load the driver from
.Sh DESCRIPTION
The
.Nm
driver is derived from MediaTek's Linux mt76 driver.
driver provides support for MediaTek MT7921E wireless network devices.
.Nm
is derived from MediaTek's Linux mt76 driver.
.Pp
This driver requires firmware to be loaded before it will work.
The package
@@ -62,36 +66,34 @@ Otherwise no
.Xr wlan 4
interface can be created using
.Xr ifconfig 8 .
One can use
.Xr fwget 8
to install the correct firmware package.
.Pp
The driver uses the
.\" No LinuxKPI man pages so no .Xr here.
.Em linuxkpi_wlan
.Sy linuxkpi_wlan
and
.Em linuxkpi
.Sy linuxkpi
compat framework to bridge between the Linux and
native
.Fx
driver code as well as to the native
.Xr net80211 4
wireless stack.
.Pp
While
.Nm
supports all 802.11 a/b/g/n/ac and ax
the compatibility code currently only supports 802.11 a/b/g modes.
Support for 802.11 n/ac is to come.
.Sh HARDWARE
The
.Nm
driver supports PCIe devices with the following chipsets:
.Pp
.Bl -tag -width Ds -offset indent -compact
.It MediaTek MT7921E
.Bl -bullet -offset indent -compact
.It
MediaTek MT7921E
.El
.Sh BUGS
Certainly.
.Sh SEE ALSO
.Xr wlan 4 ,
.Xr networking 7 ,
.Xr fwget 8 ,
.Xr ifconfig 8 ,
.Xr wpa_supplicant 8
.Sh HISTORY
@@ -99,3 +101,11 @@ The
.Nm
driver first appeared in
.Fx 14.0 .
.Sh BUGS
Certainly.
.Pp
While
.Nm
supports 802.11a/b/g/n/ac/ax modes,
the compatibility code currently only supports 802.11a/b/g modes.
Support for 802.11n/ac/ax is to come.
+57 -37
View File
@@ -1,3 +1,5 @@
.\"-
.\" SPDX-License-Identifier: ISC
.\"
.\" Copyright (c) 2015 Adrian Chadd <[email protected]>
.\"
@@ -13,12 +15,12 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd September 25, 2015
.Dd November 10, 2024
.Dt OTUS 4
.Os
.Sh NAME
.Nm otus
.Nd Atheros AR9170 USB IEEE 802.11a/b/g/n wireless network device
.Nd Atheros AR9170 USB IEEE 802.11a/b/g/n wireless network driver
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following lines in your kernel configuration file:
@@ -79,6 +81,51 @@ The
.Nm
driver can be configured at runtime with
.Xr ifconfig 8 .
.Sh HARDWARE
The
.Nm
driver provides support for Atheros AR9170 USB IEEE 802.11b/g/n
wireless network adapters, including:
.Pp
.Bl -bullet -offset indent -compact
.It
3Com 3CRUSBN275
.It
Arcadyan WN7512
.\" .It AVM FRITZ!WLAN USB Stick N
.It
CACE AirPcap \&Nx
.It
D-Link DWA-130 rev \&D1
.It
D-Link DWA-160 rev A1
.It
D-Link DWA-160 rev A2
.It
IO-Data WN-GDN/US2
.It
NEC Aterm WL300NU-G
.It
Netgear WNDA3100
.It
Netgear WN111 v2
.It
Planex GW-US300
.It
SMC Networks SMCWUSB-N2
.It
TP-Link TL-WN821N v1, v2
.It
Ubiquiti SR71 USB
.It
Unex DNUA-81
.It
Z-Com UB81
.It
Z-Com UB82
.It
ZyXEL NWD-271N
.El
.Sh FILES
The driver needs at least version 1.0 of the following firmware files,
which is loaded when an interface is attached:
@@ -87,49 +134,20 @@ which is loaded when an interface is attached:
.It Pa /boot/kernel/otusfw-init.ko
.It Pa /boot/kernel/otusfw-main.ko
.El
.Sh HARDWARE
The
.Nm
driver provices support for Atheros AR9170 USB IEEE 802.11b/g/n
wireless network adapters, including:
.Pp
.Bl -tag -width Ds -offset indent -compact
.It 3Com 3CRUSBN275
.It Arcadyan WN7512
.\" .It AVM FRITZ!WLAN USB Stick N
.It CACE AirPcap \&Nx
.It D-Link DWA-130 rev \&D1
.It D-Link DWA-160 rev A1
.It D-Link DWA-160 rev A2
.It IO-Data WN-GDN/US2
.It NEC Aterm WL300NU-G
.It Netgear WNDA3100
.It Netgear WN111 v2
.It Planex GW-US300
.It SMC Networks SMCWUSB-N2
.It TP-Link TL-WN821N v1, v2
.It Ubiquiti SR71 USB
.It Unex DNUA-81
.It Z-Com UB81
.It Z-Com UB82
.It ZyXEL NWD-271N
.El
.Sh EXAMPLES
Join an existing BSS network (i.e., connect to an access point):
.Bd -literal -offset indent
ifconfig wlan create wlandev otus0 inet 192.168.0.20 \e
netmask 0xffffff00
.Ed
.Pp
.Dl ifconfig wlan create wlandev otus0 inet 192.0.2.20/24
.Pp
Join a specific BSS network with network name
.Dq Li my_net :
.Ar my_net :
.Pp
.Dl "ifconfig wlan create wlandev otus0 ssid my_net up"
.Dl ifconfig wlan create wlandev otus0 ssid my_net up
.Pp
Join a specific BSS network with 64-bit WEP encryption:
.Bd -literal -offset indent
ifconfig wlan create wlandev otus0 ssid my_net \e
wepmode on wepkey 0x1234567890 weptxkey 1 up
wepmode on wepkey 0x1234567890 weptxkey 1 up
.Ed
.Sh DIAGNOSTICS
.Bl -diag
@@ -152,7 +170,9 @@ The file might be missing or corrupted.
The
.Nm
driver first appeared in
.Ox 4.6 .
.Ox 4.6
and
.Fx 11 .
.Sh AUTHORS
.An -nosplit
The
+15 -12
View File
@@ -1,3 +1,6 @@
.\"-
.\" SPDX-License-Identifier: ISC
.\"
.\" Copyright (c) 2005-2010 Damien Bergamini <[email protected]>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
@@ -12,12 +15,12 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd April 4, 2017
.Dd November 10, 2024
.Dt RAL 4
.Os
.Sh NAME
.Nm ral
.Nd "Ralink Technology IEEE 802.11a/g/n wireless network device"
.Nd Ralink Technology IEEE 802.11a/g/n wireless network driver
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following lines in your
@@ -119,7 +122,7 @@ The
driver supports PCI/PCIe/CardBus wireless adapters based on Ralink Technology
chipsets, including:
.Pp
.Bl -column -compact ".Li Atlantis Land A02-PCM-W54" "RT2561S" "CardBus"
.Bl -column -offset indent -compact "Atlantis Land A02-PCM-W54" "RT2561S" "CardBus"
.It Em Card Ta Em MAC/BBP Ta Em Bus
.It "A-Link WL54H" Ta RT2560 Ta PCI
.It "A-Link WL54PC" Ta RT2560 Ta CardBus
@@ -212,26 +215,25 @@ chipsets, including:
.Sh EXAMPLES
Join an existing BSS network (i.e., connect to an access point):
.Pp
.Dl "ifconfig wlan create wlandev ral0 inet 192.168.0.20 netmask 0xffffff00"
.Dl ifconfig wlan create wlandev ral0 inet 192.0.2.20/24
.Pp
Join a specific BSS network with network name
.Dq Li my_net :
.Ar my_net :
.Bd -literal -offset indent
ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e
netmask 0xffffff00 ssid my_net
ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e
ssid my_net
.Ed
.Pp
Join a specific BSS network with 40-bit WEP encryption:
.Bd -literal -offset indent
ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e
netmask 0xffffff00 ssid my_net \e
wepmode on wepkey 0x1234567890 weptxkey 1
ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e
ssid my_net wepmode on wepkey 0x1234567890 weptxkey 1
.Ed
.Pp
Join a specific BSS network with 104-bit WEP encryption:
.Bd -literal -offset indent
ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e
netmask 0xffffff00 ssid my_net \e
ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e
ssid my_net \e
wepmode on wepkey 0x01020304050607080910111213 weptxkey 1
.Ed
.Sh DIAGNOSTICS
@@ -254,6 +256,7 @@ This should not happen.
.Xr wlan_tkip 4 ,
.Xr wlan_wep 4 ,
.Xr wlan_xauth 4 ,
.Xr networking 7 ,
.Xr hostapd 8 ,
.Xr ifconfig 8 ,
.Xr wpa_supplicant 8
+50 -33
View File
@@ -1,3 +1,6 @@
.\"-
.\" SPDX-License-Identifier: ISC
.\"
.\" $OpenBSD: rsu.4,v 1.11 2013/02/14 07:40:42 jmc Exp $
.\"
.\" Copyright (c) 2010 Damien Bergamini <[email protected]>
@@ -14,12 +17,12 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd May 23, 2021
.Dd November 10, 2024
.Dt RSU 4
.Os
.Sh NAME
.Nm rsu
.Nd Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n wireless network device
.Nd Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n wireless network driver
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following lines in your kernel configuration file:
@@ -93,8 +96,46 @@ The
.Nm
driver can be configured at runtime with
.Xr ifconfig 8 .
.Sh HARDWARE
The
.Nm
driver provides support for Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n
wireless network adapters, including:
.Pp
.Bl -bullet -offset indent -compact
.It
ASUS USB-N10
.It
ASUS WL-167G V3
.It
Belkin F7D1101 v1
.It
D-Link DWA-131 A1
.It
EDUP EP-MS150N(W)
.It
Edimax EW-7622UMN
.It
Hercules HWGUn-54
.It
Hercules HWNUm-300
.It
Planex GW-USNano
.It
Sitecom WL-349 v1
.It
Sitecom WL-353
.It
Sweex LW154
.It
TRENDnet TEW-646UBH
.It
TRENDnet TEW-648UB
.It
TRENDnet TEW-649UB
.El
.Sh FILES
.Bl -tag -width ".Pa /usr/share/doc/legal/realtek.LICENSE" -compact
.Bl -tag -width "/usr/share/doc/legal/realtek.LICENSE" -compact
.It Pa /usr/share/doc/legal/realtek.LICENSE
.Nm
firmware license
@@ -106,45 +147,20 @@ which is loaded when an interface is attached:
.Bl -tag -width Ds -offset indent -compact
.It Pa /boot/kernel/rsu-rtl8712fw.ko
.El
.Sh HARDWARE
The
.Nm
driver provices support for Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n
wireless network adapters, including:
.Pp
.Bl -tag -width Ds -offset indent -compact
.It ASUS USB-N10
.It ASUS WL-167G V3
.It Belkin F7D1101 v1
.It D-Link DWA-131 A1
.It EDUP EP-MS150N(W)
.It Edimax EW-7622UMN
.It Hercules HWGUn-54
.It Hercules HWNUm-300
.It Planex GW-USNano
.It Sitecom WL-349 v1
.It Sitecom WL-353
.It Sweex LW154
.It TRENDnet TEW-646UBH
.It TRENDnet TEW-648UB
.It TRENDnet TEW-649UB
.El
.Sh EXAMPLES
Join an existing BSS network (i.e., connect to an access point):
.Bd -literal -offset indent
ifconfig wlan create wlandev rsu0 inet 192.168.0.20 \e
netmask 0xffffff00
.Ed
.Pp
.Dl ifconfig wlan create wlandev rsu0 inet 192.0.2.20/24
.Pp
Join a specific BSS network with network name
.Dq Li my_net :
.Ar my_net :
.Pp
.Dl "ifconfig wlan create wlandev rsu0 ssid my_net up"
.Dl ifconfig wlan create wlandev rsu0 ssid my_net up
.Pp
Join a specific BSS network with 64-bit WEP encryption:
.Bd -literal -offset indent
ifconfig wlan create wlandev rsu0 ssid my_net \e
wepmode on wepkey 0x1234567890 weptxkey 1 up
wepmode on wepkey 0x1234567890 weptxkey 1 up
.Ed
.Sh DIAGNOSTICS
.Bl -diag
@@ -163,6 +179,7 @@ This should not happen.
.Xr rsufw 4 ,
.Xr usb 4 ,
.Xr wlan 4 ,
.Xr networking 7 ,
.Xr arp 8 ,
.Xr hostapd 8 ,
.Xr ifconfig 8 ,
+34 -26
View File
@@ -1,4 +1,6 @@
.\"-
.\" SPDX-License-Identifer: BSD-2-Clause
.\"
.\" Copyright (c) 2022-2024 Bjoern A. Zeeb
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -22,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd September 30, 2024
.Dd November 10, 2024
.Dt RTW88 4
.Os
.Sh NAME
@@ -55,21 +57,30 @@ driver is derived from Realtek's Linux rtw88 driver.
.Pp
The driver uses the
.\" No LinuxKPI man pages so no .Xr here.
.Em linuxkpi_wlan
.Sy linuxkpi_wlan
and
.Em linuxkpi
.Sy linuxkpi
compat framework to bridge between the Linux and
native
.Fx
driver code as well as to the native
.Xr net80211 4
wireless stack.
.Pp
While
.Sh HARDWARE
The
.Nm
supports all 802.11 a/b/g/n and ac
the compatibility code currently only supports 802.11 a/b/g modes.
Support for 802.11 n/ac is to come.
driver supports PCIe devices with the following chipsets:
.Pp
.Bl -bullet -offset indent -compact
.It
Realtek 802.11n wireless 8723de (RTL8723DE)
.It
Realtek 802.11ac wireless 8821ce (RTL8821CE)
.It
Realtek 802.11ac wireless 8822be (RTL8822BE)
.It
Realtek 802.11ac wireless 8822ce (RTL8822CE)
.El
.Sh LOADER TUNABLES
.Bl -tag -width indent
.It Va compat.linuxkpi.skb.mem_limit
@@ -83,17 +94,18 @@ This tunable will work around a problem with DMA and limit allocations
for network buffer memory to the lower 32bit of physical memory and
make the driver work.
.El
.Sh HARDWARE
.Sh SEE ALSO
.Xr rtw88fw 4 ,
.Xr wlan 4 ,
.Xr networking 7 ,
.Xr fwget 8 ,
.Xr ifconfig 8 ,
.Xr wpa_supplicant 8
.Sh HISTORY
The
.Nm
driver supports PCIe devices with the following chipsets:
.Pp
.Bl -tag -width Ds -offset indent -compact
.It Realtek 802.11n wireless 8723de (RTL8723DE)
.It Realtek 802.11ac wireless 8821ce (RTL8821CE)
.It Realtek 802.11ac wireless 8822be (RTL8822BE)
.It Realtek 802.11ac wireless 8822ce (RTL8822CE)
.El
driver first appeared in
.Fx 13.2 .
.Sh BUGS
Certainly.
.Pp
@@ -102,13 +114,9 @@ main memory.
See in the
.Sx LOADER TUNABLES
section above.
.Sh SEE ALSO
.Xr rtw88fw 4 ,
.Xr wlan 4 ,
.Xr ifconfig 8 ,
.Xr wpa_supplicant 8
.Sh HISTORY
The
.Pp
While
.Nm
driver first appeared in
.Fx 13.2 .
supports 802.11a/b/g/n/ac modes,
the compatibility code currently only supports 802.11a/b/g modes.
Support for 802.11n/ac is yet to come.
+36 -29
View File
@@ -1,4 +1,6 @@
.\"-
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Copyright (c) 2023-2024 Bjoern A. Zeeb
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -22,9 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd October 10, 2024
.Dd November 10, 2024
.Dt RTW89 4
.Os
.Sh NAME
@@ -67,21 +67,32 @@ to install the correct firmware package.
.Pp
The driver uses the
.\" No LinuxKPI man pages so no .Xr here.
.Em linuxkpi_wlan
.Sy linuxkpi_wlan
and
.Em linuxkpi
.Sy linuxkpi
compat framework to bridge between the Linux and
native
.Fx
driver code as well as to the native
.Xr net80211 4
wireless stack.
.Pp
While
.Sh HARDWARE
The
.Nm
supports all 802.11 a/b/g/n/ac and ax
the compatibility code currently only supports 802.11 a/b/g modes.
Support for 802.11 n/ac is to come.
driver supports PCIe devices with the following chipsets:
.Pp
.Bl -bullet -offset indent -compact
.It
Realtek 8851BE Wi-Fi 6 (RTL8851BE)
.It
Realtek 8852AE Wi-Fi 6 (RTL8852AE)
.It
Realtek 8852BE Wi-Fi 6 (RTL8852BE)
.It
Realtek 8852CE Wi-Fi 6E (RTL8852CE)
.It
Realtek 8922AE Wi-Fi 7 (RTL8922AE)
.El
.Sh LOADER TUNABLES
.Bl -tag -width indent
.It Va compat.linuxkpi.skb.mem_limit
@@ -95,27 +106,9 @@ This tunable will work around a problem with DMA and limit allocations
for network buffer memory to the lower 32bit of physical memory and
make the driver work.
.El
.Sh HARDWARE
The
.Nm
driver supports PCIe devices with the following chipsets:
.Pp
.Bl -tag -width Ds -offset indent -compact
.It Realtek 802.11ax wireless 8851be (RTL8851BE)
.It Realtek 802.11ax wireless 8852ae (RTL8852AE)
.It Realtek 802.11ax wireless 8852be (RTL8852BE)
.It Realtek 802.11ax wireless 8852ce (RTL8852CE)
.El
.Sh BUGS
Certainly.
.Pp
Does not seem to work (reliably) on machines with more than 4GB of
main memory.
See in the
.Sx LOADER TUNABLES
section above.
.Sh SEE ALSO
.Xr wlan 4 ,
.Xr networking 7 ,
.Xr fwget 8 ,
.Xr ifconfig 8 ,
.Xr wpa_supplicant 8
@@ -124,3 +117,17 @@ The
.Nm
driver first appeared in
.Fx 14.2 .
.Sh BUGS
Certainly.
.Pp
Does not seem to work (reliably) on machines with more than 4GB of
main memory.
See in the
.Sx LOADER TUNABLES
section above.
.Pp
While
.Nm
supports 802.11a/b/g/n/ac/ax modes,
the compatibility code currently only supports 802.11a/b/g modes.
Support for 802.11n/ac/ax is yet to come.
+64 -40
View File
@@ -1,3 +1,6 @@
.\"-
.\" SPDX-License-Identifier: ISC
.\"
.\" $OpenBSD: rtwn.4,v 1.2 2015/07/09 11:28:53 stsp Exp $
.\"
.\" Copyright (c) 2010 Damien Bergamini <[email protected]>
@@ -16,12 +19,12 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd January 2, 2019
.Dd November 10, 2024
.Dt RTWN 4
.Os
.Sh NAME
.Nm rtwn
.Nd Realtek IEEE 802.11 wireless network driver
.Nd Realtek IEEE 802.11n/ac wireless network driver
.Sh SYNOPSIS
.Cd "options RTWN_DEBUG"
.Cd "options RTWN_WITHOUT_UCODE"
@@ -48,16 +51,14 @@ if_rtwn_usb_load="YES"
.Sh DESCRIPTION
The
.Nm
driver provides support for wireless network devices based on
the Realtek RTL8192C, RTL8188E, RTL8192E, RTL8812A and RTL8821A
programming APIs.
These APIs are used by a wide variety of chips;
most chips with USB and some with PCI interface are supported.
driver provides support for 802.11n/ac wireless network PHYs supplied by
.Xr rtwn_pci 4
and
.Xr rtwn_usb 4 .
.Pp
To enable use for PCI/PCIe systems, see the rtwn_pci(4) driver;
for USB devices, use the rtwn_usb(4) driver.
.Pp
The driver supports
The
.Nm
driver supports
.Cm station ,
.Cm adhoc ,
.Cm hostap
@@ -79,17 +80,40 @@ The
.Nm
driver can be configured at runtime with
.Xr ifconfig 8 .
.Sh HARDWARE
The
.Nm
driver supports USB and PCI devices with the following chipsets:
.Pp
.Bl -bullet -offset indent -compact
.It
Realtek 802.11n wireless 8188e (RTL8188E)
.It
Realtek 802.11n wireless 8192c (RTL8192C)
.It
Realtek 802.11n wireless 8192e (RTL8192E)
.It
Realtek 802.11ac wireless 8812a (RTL8812A)
.It
Realtek 802.11ac wireless 8821a (RTL8821A)
.El
.Pp
For specific devices, see
.Xr rtwn_pci 4
and
.Xr rtwn_usb 4 .
.Sh FILES
.Bl -tag -width ".Pa /usr/share/doc/legal/realtek.LICENSE" -compact
.Bl -tag -width "/usr/share/doc/legal/realtek.LICENSE" -compact
.It Pa /usr/share/doc/legal/realtek.LICENSE
.Nm
firmware license
.El
.Pp
The driver (if not compiled with
.Cd options RTWN_WITHOUT_UCODE
) may use following firmware files, which are loaded
when an interface is brought up:
The driver
.Pq if not compiled with Cd options RTWN_WITHOUT_UCODE
may use following firmware files,
which are loaded when an interface is brought up:
.Pp
.Bl -tag -width Ds -offset indent -compact
.It Pa /boot/kernel/rtwn-rtl8188eefw.ko
.It Pa /boot/kernel/rtwn-rtl8188eufw.ko
@@ -103,41 +127,38 @@ when an interface is brought up:
.El
.Sh EXAMPLES
Join an existing BSS network (i.e., connect to an access point):
.Bd -literal -offset indent
ifconfig wlan create wlandev rtwn0 inet 192.168.0.20 \e
netmask 0xffffff00
.Ed
.Pp
.Dl ifconfig wlan create wlandev rtwn0 inet 192.0.2.20/24
.Pp
Join a specific BSS network with network name
.Dq Li my_net :
.Ar my_net :
.Pp
.Dl "ifconfig wlan create wlandev rtwn0 ssid my_net up"
.Dl ifconfig wlan create wlandev rtwn0 ssid my_net up
.Pp
Join a specific BSS network with 64-bit WEP encryption:
.Bd -literal -offset indent
ifconfig wlan create wlandev rtwn0 ssid my_net \e
wepmode on wepkey 0x1234567890 weptxkey 1 up
wepmode on wepkey 0x1234567890 weptxkey 1 up
.Ed
.Pp
Create an IBSS network with 128-bit WEP encryption on the channel 4:
.Bd -literal -offset indent
ifconfig wlan create wlandev rtwn0 wlanmode adhoc ssid my_net \e
wepmode on wepkey 0x01020304050607080910111213 weptxkey 1 \e
channel 4
wepmode on wepkey 0x01020304050607080910111213 weptxkey 1 \e
channel 4
.Ed
.Pp
Join/create an 802.11b IBSS network with network name
.Dq Li my_net :
.Ar my_net :
.Bd -literal -offset indent
ifconfig wlan0 create wlandev rtwn0 wlanmode adhoc
ifconfig wlan0 inet 192.168.0.22 netmask 0xffffff00 ssid my_net \e
mode 11b
ifconfig wlan0 inet 192.0.2.20/24 ssid my_net mode 11b
.Ed
.Pp
Create a host-based access point:
.Bd -literal -offset indent
ifconfig wlan0 create wlandev rtwn0 wlanmode hostap
ifconfig wlan0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap
ifconfig wlan0 inet 192.0.2.20/24 ssid my_ap
.Ed
.Sh LOADER TUNABLES
Tunables can be set at the
@@ -147,32 +168,32 @@ prompt before booting the kernel or stored in
.Bl -tag -width indent
.It Va dev.rtwn.%d.hwcrypto
This tunable controls how key slots are assigned:
.br
.Pp
0 - disable h/w crypto support.
Features that require access to frame contents (e.g., TCP/UDP/IP Rx
checksum validation) will not work;
.br
.Pp
1 - use h/w crypto support for pairwise keys only;
.br
.Pp
2 - use h/w crypto support for all keys; may not work for
multi-vap configurations.
.br
.Pp
By default it is set to 1.
.It Va dev.rtwn.%d.ratectl
This tunable switches between rate control implementations:
.br
.Pp
0 - no rate control;
.br
.Pp
1 - driver sends 'tx complete' reports to net80211; algorithm
is controlled via net80211;
.br
.Pp
2 - firmware-based rate control.
.br
.Pp
By default it is set to 1; however driver may choose another
algorithm in case if it is not implemented
.br
.Pp
Currently selected algorithm is reported via
.Em Va dev.rtwn.%d.ratectl_selected
.Va dev.rtwn.%d.ratectl_selected
read-only OID.
.It Va dev.rtwn.%d.rx_buf_size
(USB only) Controls size of temporary Rx buffer; smaller buffer size
@@ -212,6 +233,7 @@ This should not happen.
.Xr wlan_tkip 4 ,
.Xr wlan_wep 4 ,
.Xr wlan_xauth 4 ,
.Xr networking 7 ,
.Xr hostapd 8 ,
.Xr ifconfig 8 ,
.Xr wpa_supplicant 8
@@ -225,7 +247,9 @@ and
the
.Nm
driver first appeared in
.Ox 5.8 .
.Ox 5.8
and
.Fx 11.0 .
.Sh AUTHORS
The
.Nm
+20 -6
View File
@@ -1,8 +1,10 @@
.\"-
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Copyright (c) 2011 Adrian Chadd, Xenion Pty Ltd
.\" Copyright (c) 2016 Andriy Voskoboinyk <[email protected]>
.\" All rights reserved.
.\""
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
@@ -26,13 +28,13 @@
.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
.\" THE POSSIBILITY OF SUCH DAMAGES.
.\"/
.Dd January 2, 2019
.\"
.Dd November 10, 2024
.Dt RTWN_PCI 4
.Os
.Sh NAME
.Nm rtwn_pci
.Nd "Realtek PCI device glue"
.Nd Realtek wireless rtwn network driver PCI/PCIe support
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following lines in your
@@ -46,12 +48,24 @@ kernel configuration file:
.Sh DESCRIPTION
The
.Nm
driver supports PCIe wireless network devices based on the Realtek
RTL8188CE/RTL8188EE chipsets.
driver provides support for PCIe wireless network devices to the
.Xr rtwn 4
driver.
.Pp
Both RTL8188CE and RTL8188EE are highly integrated 802.11n adapters
that combines a MAC, a 1T1R capable baseband and an RF in a single chip.
They are operate in the 2GHz spectrum only.
.Sh HARDWARE
The
.Nm
driver supports the following PCIe Wi-Fi devices:
.Pp
.Bl -bullet -offset indent -compact
.It
Realtek 802.11n wireless 8188 (RTL8188EE)
.It
Realtek 802.11n wireless 8192 (RTL8192CE)
.El
.Sh SEE ALSO
.Xr pci 4 ,
.Xr rtwn 4 ,
+12 -9
View File
@@ -1,8 +1,10 @@
.\"-
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Copyright (c) 2011 Adrian Chadd, Xenion Pty Ltd
.\" Copyright (c) 2016 Andriy Voskoboinyk <[email protected]>
.\" All rights reserved.
.\""
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
@@ -26,13 +28,13 @@
.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
.\" THE POSSIBILITY OF SUCH DAMAGES.
.\"/
.Dd November 1, 2021
.\"
.Dd November 10, 2024
.Dt RTWN_USB 4
.Os
.Sh NAME
.Nm rtwn_usb
.Nd "Realtek USB device glue"
.Nd Realtek wireless rtwn network driver USB support
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following lines in your
@@ -48,17 +50,18 @@ kernel configuration file:
.Cd "device wlan"
.Ed
.Sh DESCRIPTION
This module provides the USB bus glue needed for the devices supported
by the
The
.Nm
driver provides support for USB wireless network devices to the
.Xr rtwn 4
driver.
.Sh HARDWARE
The
.Nm
driver supports Realtek RTL8188CUS/RTL8188RU/RTL8188EU/RTL8192CU/RTL8192EU/RTL8812AU/RTL8821AU
based USB wireless network adapters, including:
driver supports USB wireless network adapters based on certain
Realtek RTL 8188/8192/8812 and 8821 chipsets, including:
.Pp
.Bl -column -compact "Belkin F7D1102 Surf Wireless Micro" "RTL8188CUS" "Bus"
.Bl -column -compact "Belkin F7D1102 Surf Wireless Micro" "RTL8188CUS" "USB 2.0"
.It Em Card Ta Em Chip Ta Em Bus
.It "Alfa AWUS036NHR v2" Ta RTL8188RU Ta USB 2.0
.It "ASUS USB-AC56" Ta RTL8812AU Ta USB 3.0
+13 -10
View File
@@ -1,3 +1,5 @@
.\"-
.\" SPDX-License-Identifier: ISC
.\"
.\" Copyright (c) 2005-2007
.\" Damien Bergamini <[email protected]>
@@ -14,12 +16,12 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd November 8, 2018
.Dd November 10, 2024
.Dt RUM 4
.Os
.Sh NAME
.Nm rum
.Nd Ralink Technology USB IEEE 802.11a/b/g wireless network device
.Nd Ralink Technology USB IEEE 802.11a/b/g wireless network driver
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following lines in your
@@ -125,20 +127,18 @@ including:
.El
.Sh EXAMPLES
Join an existing BSS network (i.e., connect to an access point):
.Bd -literal -offset indent
ifconfig wlan create wlandev rum0 inet 192.168.0.20 \e
netmask 0xffffff00
.Ed
.Pp
.Dl ifconfig wlan create wlandev rum0 inet 192.0.2.20/24
.Pp
Join a specific BSS network with network name
.Dq Li my_net :
.Ar my_net :
.Pp
.Dl "ifconfig wlan create wlandev rum0 ssid my_net up"
.Dl ifconfig wlan create wlandev rum0 ssid my_net up
.Pp
Join a specific BSS network with 64-bit WEP encryption:
.Bd -literal -offset indent
ifconfig wlan create wlandev rum0 ssid my_net \e
wepmode on wepkey 0x1234567890 weptxkey 1 up
wepmode on wepkey 0x1234567890 weptxkey 1 up
.Ed
.Pp
Join a specific BSS network with 128-bit WEP encryption:
@@ -164,6 +164,7 @@ This should not happen.
.Xr wlan_tkip 4 ,
.Xr wlan_wep 4 ,
.Xr wlan_xauth 4 ,
.Xr networking 7 ,
.Xr hostapd 8 ,
.Xr ifconfig 8 ,
.Xr wpa_supplicant 8
@@ -171,7 +172,9 @@ This should not happen.
The
.Nm
driver first appeared in
.Ox 4.0 .
.Ox 4.0
and
.Fx 7.0 .
.Sh AUTHORS
.An -nosplit
The original
+138 -73
View File
@@ -1,3 +1,6 @@
.\"-
.\" SPDX-License-Identifier: ISC
.\"
.\" $OpenBSD: run.4,v 1.22 2009/11/23 06:16:32 jmc Exp $
.\"
.\" Copyright (c) 2008 Damien Bergamini <[email protected]>
@@ -14,12 +17,12 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd May 23, 2021
.Dd November 10, 2024
.Dt RUN 4
.Os
.Sh NAME
.Nm run
.Nd Ralink Technology USB IEEE 802.11a/g/n wireless network device
.Nd Ralink Technology USB IEEE 802.11a/g/n wireless network driver
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following lines in your
@@ -119,87 +122,148 @@ The
.Nm
driver supports the following wireless adapters:
.Pp
.Bl -tag -width Ds -offset indent -compact
.It Airlink101 AWLL6090
.It ASUS USB-N11
.It ASUS USB-N13 ver. A1
.It ASUS USB-N14
.It ASUS USB-N66
.It ASUS WL-160N
.It Belkin F5D8051 ver 3000
.It Belkin F5D8053
.It Belkin F5D8055
.It Belkin F6D4050 ver 1
.It Belkin F9L1103
.It Buffalo WLI-UC-AG300N
.It Buffalo WLI-UC-G300HP
.It Buffalo WLI-UC-G300N
.It Buffalo WLI-UC-G301N
.It Buffalo WLI-UC-GN
.It Buffalo WLI-UC-GNM
.It Buffalo WLI-UC-GNM2
.It Corega CG-WLUSB2GNL
.It Corega CG-WLUSB2GNR
.It Corega CG-WLUSB300AGN
.It Corega CG-WLUSB300GNM
.It D-Link DWA-130 rev B1
.It D-Link DWA-130 rev F1
.It D-Link DWA-140 rev B1, B2, B3, \&D1
.It D-Link DWA-160 rev B2
.It D-Link DWA-162
.It DrayTek Vigor N61
.It Edimax EW-7711UAn
.It Edimax EW-7711UTn
.It Edimax EW-7717Un
.It Edimax EW-7718Un
.It Edimax EW-7733UnD
.It Gigabyte GN-WB30N
.It Gigabyte GN-WB31N
.It Gigabyte GN-WB32L
.It Hawking HWDN1
.It Hawking HWUN1
.It Hawking HWUN2
.It Hercules HWNU-300
.It Linksys WUSB54GC v3
.It Linksys WUSB600N
.It Logitec LAN-W150N/U2
.It Mvix Nubbin MS-811N
.It Panda Wireless PAU06
.It Planex GW-USMicroN
.It Planex GW-US300MiniS
.It Sitecom WL-182
.It Sitecom WL-188
.It Sitecom WL-301
.It Sitecom WL-302
.It Sitecom WL-315
.It SMC SMCWUSBS-N2
.It Sweex LW303
.It Sweex LW313
.It TP-LINK TL-WDN3200
.It TP-LINK TL-WN321G v4
.It TP-LINK TL-WN727N v3
.It Unex DNUR-81
.It Unex DNUR-82
.It ZyXEL NWD2705
.It ZyXEL NWD210N
.It ZyXEL NWD270N
.Bl -bullet -offset indent -compact
.It
Airlink101 AWLL6090
.It
ASUS USB-N11
.It
ASUS USB-N13 ver. A1
.It
ASUS USB-N14
.It
ASUS USB-N66
.It
ASUS WL-160N
.It
Belkin F5D8051 ver 3000
.It
Belkin F5D8053
.It
Belkin F5D8055
.It
Belkin F6D4050 ver 1
.It
Belkin F9L1103
.It
Buffalo WLI-UC-AG300N
.It
Buffalo WLI-UC-G300HP
.It
Buffalo WLI-UC-G300N
.It
Buffalo WLI-UC-G301N
.It
Buffalo WLI-UC-GN
.It
Buffalo WLI-UC-GNM
.It
Buffalo WLI-UC-GNM2
.It
Corega CG-WLUSB2GNL
.It
Corega CG-WLUSB2GNR
.It
Corega CG-WLUSB300AGN
.It
Corega CG-WLUSB300GNM
.It
D-Link DWA-130 rev B1
.It
D-Link DWA-130 rev F1
.It
D-Link DWA-140 rev B1, B2, B3, \&D1
.It
D-Link DWA-160 rev B2
.It
D-Link DWA-162
.It
DrayTek Vigor N61
.It
Edimax EW-7711UAn
.It
Edimax EW-7711UTn
.It
Edimax EW-7717Un
.It
Edimax EW-7718Un
.It
Edimax EW-7733UnD
.It
Gigabyte GN-WB30N
.It
Gigabyte GN-WB31N
.It
Gigabyte GN-WB32L
.It
Hawking HWDN1
.It
Hawking HWUN1
.It
Hawking HWUN2
.It
Hercules HWNU-300
.It
Linksys WUSB54GC v3
.It
Linksys WUSB600N
.It
Logitec LAN-W150N/U2
.It
Mvix Nubbin MS-811N
.It
Panda Wireless PAU06
.It
Planex GW-USMicroN
.It
Planex GW-US300MiniS
.It
Sitecom WL-182
.It
Sitecom WL-188
.It
Sitecom WL-301
.It
Sitecom WL-302
.It
Sitecom WL-315
.It
SMC SMCWUSBS-N2
.It
Sweex LW303
.It
Sweex LW313
.It
TP-LINK TL-WDN3200
.It
TP-LINK TL-WN321G v4
.It
TP-LINK TL-WN727N v3
.It
Unex DNUR-81
.It
Unex DNUR-82
.It
ZyXEL NWD2705
.It
ZyXEL NWD210N
.It
ZyXEL NWD270N
.El
.Sh EXAMPLES
Join an existing BSS network (i.e., connect to an access point):
.Bd -literal -offset indent
ifconfig wlan create wlandev run0 inet 192.168.0.20 \e
netmask 0xffffff00
.Ed
.Pp
.Dl ifconfig wlan create wlandev run0 inet 192.0.2.20/24
.Pp
Join a specific BSS network with network name
.Dq Li my_net :
.Ar my_net :
.Pp
.Dl "ifconfig wlan create wlandev run0 ssid my_net up"
.Dl ifconfig wlan create wlandev run0 ssid my_net up
.Pp
Join a specific BSS network with 64-bit WEP encryption:
.Bd -literal -offset indent
ifconfig wlan create wlandev run0 ssid my_net \e
wepmode on wepkey 0x1234567890 weptxkey 1 up
wepmode on wepkey 0x1234567890 weptxkey 1 up
.Ed
.Pp
Join a specific BSS network with 128-bit WEP encryption:
@@ -232,6 +296,7 @@ This should not happen.
.Xr wlan_tkip 4 ,
.Xr wlan_wep 4 ,
.Xr wlan_xauth 4 ,
.Xr networking 7 ,
.Xr hostapd 8 ,
.Xr ifconfig 8 ,
.Xr wpa_supplicant 8
+9 -1
View File
@@ -24,7 +24,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd May 25, 2022
.Dd November 2, 2024
.Dt SYSCONS 4
.Os
.Sh NAME
@@ -69,6 +69,14 @@ In
In
.Pa /boot/loader.conf :
.Cd kern.vty=sc
.Sh DEPRECATION NOTICE
The
.Nm
console is deprecated, and will be removed in a future version of
.Fx .
Users are advised to migrate to the
.Xr vt 4
console instead.
.Sh DESCRIPTION
The
.Nm
+17 -13
View File
@@ -1,3 +1,6 @@
.\"-
.\" SPDX-License-Identifier: ISC
.\"
.\" Copyright (c) 2005, 2006
.\" Damien Bergamini <[email protected]>
.\"
@@ -13,12 +16,12 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd April 13, 2008
.Dd November 10, 2024
.Dt URAL 4
.Os
.Sh NAME
.Nm ural
.Nd "Ralink Technology RT2500USB IEEE 802.11 driver"
.Nd Ralink RT2500USB IEEE 802.11a/b/g wireless network driver
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following lines in your
@@ -68,7 +71,7 @@ The
driver supports USB 2.0 wireless adapters based on the Ralink Technology
RT2500USB chipset, including:
.Pp
.Bl -column -compact ".Li Atlantis Land A02-PCM-W54" "Bus"
.Bl -column -compact "Atlantis Land A02-PCM-W54" "Bus"
.It Em Card Ta Em Bus
.It "AMIT WL532U" Ta USB
.It "ASUS WL-167g" Ta USB
@@ -103,20 +106,18 @@ An up to date list can be found at
.Pa http://ralink.rapla.net/ .
.Sh EXAMPLES
Join an existing BSS network (i.e., connect to an access point):
.Bd -literal -offset indent
ifconfig wlan create wlandev ural0 inet 192.168.0.20 \e
netmask 0xffffff00
.Ed
.Pp
.Dl ifconfig wlan create wlandev ural0 inet 192.0.2.20/24
.Pp
Join a specific BSS network with network name
.Dq Li my_net :
.Ar my_net :
.Pp
.Dl "ifconfig wlan create wlandev ural0 ssid my_net up"
.Dl ifconfig wlan create wlandev ural0 ssid my_net up
.Pp
Join a specific BSS network with 64-bit WEP encryption:
.Bd -literal -offset indent
ifconfig wlan create wlandev ural0 ssid my_net \e
wepmode on wepkey 0x1234567890 weptxkey 1 up
wepmode on wepkey 0x1234567890 weptxkey 1 up
.Ed
.Pp
Join a specific BSS network with 128-bit WEP encryption:
@@ -140,6 +141,7 @@ This should not happen.
.Xr wlan_tkip 4 ,
.Xr wlan_wep 4 ,
.Xr wlan_xauth 4 ,
.Xr networking 7 ,
.Xr hostapd 8 ,
.Xr ifconfig 8 ,
.Xr wpa_supplicant 8
@@ -147,7 +149,9 @@ This should not happen.
The
.Nm
driver first appeared in
.Ox 3.7 .
.Ox 3.7
and
.Fx 6.0 .
.Sh AUTHORS
The original
.Nm
@@ -155,5 +159,5 @@ driver was written by
.An Damien Bergamini Aq Mt [email protected] .
.Sh BUGS
Host AP mode doesn't support client power save.
Clients using power save mode will experience
packet loss (disabling power saving on the client will fix this).
Clients using power save mode will experience packet loss
.Pq disabling power saving on the client will fix this .
+23 -21
View File
@@ -1,3 +1,6 @@
.\"-
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Copyright (c) 2008 Weongyo Jeong
.\" All rights reserved.
.\"
@@ -22,12 +25,12 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd October 17, 2009
.Dd November 10, 2024
.Dt URTW 4
.Os
.Sh NAME
.Nm urtw
.Nd Realtek RTL8187B/L USB IEEE 802.11b/g wireless network device
.Nd Realtek RTL8187B/L USB IEEE 802.11b/g wireless network driver
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following lines in your kernel configuration file:
@@ -59,6 +62,7 @@ and
.Cm monitor
mode operation.
Only one virtual interface may be configured at any time.
.Pp
For more information on configuring this device, see
.Xr ifconfig 8 .
.Sh HARDWARE
@@ -66,35 +70,33 @@ The
.Nm
driver supports Realtek RTL8187B/L based wireless network devices, including:
.Pp
.Bl -column "Shuttle XPC Accessory PN20" "RTL8225" "USB" -compact -offset 6n
.It Em "Card Radio Bus"
.It "Belkin F5D7050E RTL8225 USB"
.It "Linksys WUSB54GCv2 RTL8225 USB"
.It "Netgear WG111v2 RTL8225 USB"
.It "Netgear WG111v3 RTL8225 USB"
.It "Safehome WLG-1500SMA5 RTL8225 USB"
.It "Shuttle XPC Accessory PN20 RTL8225 USB"
.It "Sitecom WL168v1 RTL8225 USB"
.It "Sitecom WL168v4 RTL8225 USB"
.It "SureCom EP-9001-g(2A) RTL8225 USB"
.It "TRENDnet TEW-424UB V3.xR RTL8225 USB"
.Bl -column -offset indent "Shuttle XPC Accessory PN20" "RTL8225" "USB" -compact
.It Em Card Ta Em Radio Ta Em Bus
.It Belkin F5D7050E Ta RTL8225 Ta USB
.It Linksys WUSB54GCv2 Ta RTL8225 Ta USB
.It Netgear WG111v2 Ta RTL8225 Ta USB
.It Netgear WG111v3 Ta RTL8225 Ta USB
.It Safehome WLG-1500SMA5 Ta RTL8225 Ta USB
.It Shuttle XPC Accessory PN20 Ta RTL8225 Ta USB
.It Sitecom WL168v1 Ta RTL8225 Ta USB
.It Sitecom WL168v4 Ta RTL8225 Ta USB
.It SureCom EP-9001-g(2A) Ta RTL8225 Ta USB
.It TRENDnet TEW-424UB V3.xR Ta RTL8225 Ta USB
.El
.Sh EXAMPLES
Join an existing BSS network (i.e., connect to an access point):
.Bd -literal -offset indent
ifconfig wlan create wlandev urtw0 inet 192.168.0.20 \e
netmask 0xffffff00
.Ed
.Pp
.Dl ifconfig wlan create wlandev urtw0 inet 192.0.2.20/24
.Pp
Join a specific BSS network with network name
.Dq Li my_net :
.Ar my_net :
.Pp
.Dl "ifconfig wlan create wlandev urtw0 ssid my_net up"
.Dl ifconfig wlan create wlandev urtw0 ssid my_net up
.Pp
Join a specific BSS network with 64-bit WEP encryption:
.Bd -literal -offset indent
ifconfig wlan create wlandev urtw0 ssid my_net \e
wepmode on wepkey 0x1234567890 weptxkey 1 up
wepmode on wepkey 0x1234567890 weptxkey 1 up
.Ed
.Sh SEE ALSO
.Xr intro 4 ,
+96 -51
View File
@@ -31,12 +31,12 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
.\" THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd March 7, 2013
.Dd November 10, 2024
.Dt ZYD 4
.Os
.Sh NAME
.Nm zyd
.Nd ZyDAS ZD1211/ZD1211B USB IEEE 802.11b/g wireless network device
.Nd ZyDAS ZD1211/ZD1211B USB IEEE 802.11b/g wireless network driver
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following lines in your
@@ -77,51 +77,95 @@ The following devices are known to be supported by the
.Nm
driver:
.Pp
.Bl -tag -width Ds -offset indent -compact
.It 3COM 3CRUSB10075
.It Acer WLAN-G-US1
.It Airlink+ AWLL3025
.It Airlink 101 AWLL3026
.It AOpen 802.11g WL54
.It Asus A9T integrated wireless
.It Asus WL-159g
.It Belkin F5D7050 v.4000
.It Billion BiPAC 3011G
.It Buffalo WLI-U2-KG54L
.It CC&C WL-2203B
.It DrayTek Vigor 550
.It Edimax EW-7317UG
.It Edimax EW-7317LDG
.It Fiberline Networks WL-43OU
.It iNexQ UR055g
.It Linksys WUSBF54G
.It Longshine LCS-8131G3
.It MSI US54SE
.It MyTek MWU-201 USB adapter
.It Philips SNU5600
.It Planet WL-U356
.It Planex GW-US54GZ
.It Planex GW-US54GZL
.It Planex GW-US54Mini
.It Safecom SWMULZ-5400
.It Sagem XG 760A
.It Sagem XG 76NA
.It Sandberg Wireless G54 USB
.It Sitecom WL-113
.It SMC SMCWUSB-G
.It Sweex wireless USB 54 Mbps
.It Tekram/Siemens USB adapter
.It Telegent TG54USB
.It Trendnet TEW-424UB rev A
.It Trendnet TEW-429UB
.It TwinMOS G240
.It Unicorn WL-54G
.It US Robotics 5423
.It X-Micro XWL-11GUZX
.It Yakumo QuickWLAN USB
.It Zonet ZEW2501
.It ZyXEL ZyAIR G-202
.It ZyXEL ZyAIR G-220
.Bl -bullet -offset indent -compact
.It
3COM 3CRUSB10075
.It
Acer WLAN-G-US1
.It
Airlink+ AWLL3025
.It
Airlink 101 AWLL3026
.It
AOpen 802.11g WL54
.It
Asus A9T integrated wireless
.It
Asus WL-159g
.It
Belkin F5D7050 v.4000
.It
Billion BiPAC 3011G
.It
Buffalo WLI-U2-KG54L
.It
CC&C WL-2203B
.It
DrayTek Vigor 550
.It
Edimax EW-7317UG
.It
Edimax EW-7317LDG
.It
Fiberline Networks WL-43OU
.It
iNexQ UR055g
.It
Linksys WUSBF54G
.It
Longshine LCS-8131G3
.It
MSI US54SE
.It
MyTek MWU-201 USB adapter
.It
Philips SNU5600
.It
Planet WL-U356
.It
Planex GW-US54GZ
.It
Planex GW-US54GZL
.It
Planex GW-US54Mini
.It
Safecom SWMULZ-5400
.It
Sagem XG 760A
.It
Sagem XG 76NA
.It
Sandberg Wireless G54 USB
.It
Sitecom WL-113
.It
SMC SMCWUSB-G
.It
Sweex wireless USB 54 Mbps
.It
Tekram/Siemens USB adapter
.It
Telegent TG54USB
.It
Trendnet TEW-424UB rev A
.It
Trendnet TEW-429UB
.It
TwinMOS G240
.It
Unicorn WL-54G
.It
US Robotics 5423
.It
X-Micro XWL-11GUZX
.It
Yakumo QuickWLAN USB
.It
Zonet ZEW2501
.It
ZyXEL ZyAIR G-202
.It
ZyXEL ZyAIR G-220
.El
.Sh EXAMPLES
The following
@@ -131,14 +175,14 @@ channel 11:
.Bd -literal -offset indent
ifconfig wlan create wlandev zyd0 channel 11 \e
wepmode on wepkey 0x1deadbeef1 weptxkey 1 \e
inet 192.168.1.1 netmask 255.255.255.0
inet 192.0.2.20/24
.Ed
.Pp
Join an existing BSS network,
.Dq my_net :
.Ar my_net :
.Bd -literal -offset indent
ifconfig wlan create wlandev zyd0 192.168.0.2 \e
netmask 0xffffff00 ssid my_net
ifconfig wlan create wlandev zyd0 192.0.2.20/24 \e
ssid my_net
.Ed
.Sh DIAGNOSTICS
.Bl -diag
@@ -167,6 +211,7 @@ This should not happen.
.Xr wlan_ccmp 4 ,
.Xr wlan_tkip 4 ,
.Xr wlan_wep 4 ,
.Xr networking 7 ,
.Xr ifconfig 8 ,
.Xr wpa_supplicant 8
.Sh AUTHORS
+1 -1
View File
@@ -238,7 +238,7 @@ nameserver 192.168.2.1
# Fallback nameservers, in this case these from Google.
nameserver 8.8.8.8
nameserver 4.4.4.4
nameserver 8.8.4.4
# Attach an OPT pseudo-RR for the EDNS0 extension,
# as specified in RFC 2671.
+13 -1
View File
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd August 6, 2023
.Dd September 26, 2024
.Dt RELEASE 7
.Os
.Sh NAME
@@ -443,6 +443,18 @@ values, run:
cd /usr/src
make -C release list-cloudware
.Ed
.Sh OCI IMAGES
The
.Fx
release build tools have experimental support for building
Open Container Initiative (OCI) format container base images.
This is enabled using a
.Fa release.conf
variable:
.Bl -tag -width Ev
.It Va WITH_OCIIMAGES
Set to a non-null value to build OCI base images.
.El
.Sh MAKEFILE TARGETS
The release makefile
.Pq Pa src/release/Makefile
-5
View File
@@ -56,11 +56,6 @@ STANDALONE_SUBDIR_TARGETS+= \
installconfig installdirs installincludes installfiles print-dir \
maninstall manlint obj objlink
# It is safe to install in parallel when staging.
.if defined(NO_ROOT) || !empty(SYSROOT)
STANDALONE_SUBDIR_TARGETS+= realinstall
.endif
.include <bsd.init.mk>
.if ${MK_META_MODE} == "yes"
+4
View File
@@ -88,6 +88,10 @@ CWARNFLAGS.clang+= -Wno-unused-const-variable
.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 150000
CWARNFLAGS.clang+= -Wno-error=unused-but-set-parameter
.endif
.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 190000
# Similar to gcc >= 8.1 -Wno-error=cast-function-type below
CWARNFLAGS.clang+= -Wno-error=cast-function-type-mismatch
.endif
.endif # WARNS <= 6
.if ${WARNS} <= 3
CWARNFLAGS.clang+= -Wno-tautological-compare -Wno-unused-value\
+9
View File
@@ -543,6 +543,15 @@ function core.nextConsoleChoice()
end
end
-- The graphical-enabled loaders have unicode drawing character support. The
-- text-only ones do not. We check the old and new bindings for term_drawrect as
-- a proxy for unicode support, which will work on older boot loaders as well
-- as be future proof for when we remove the old binding. This also abstracts
-- out the test to one spot in case we start to export this notion more directly.
function core.hasUnicode()
return gfx.term_drawrect ~= nil or loader.term_drawrect ~= nil
end
-- Sanity check the boot loader revision
-- Loaders with version 3.0 have everything that we need without backwards
-- compatible hacks. Warn users that still have old versions to upgrade so
+27 -5
View File
@@ -506,23 +506,45 @@ drawer.frame_styles = {
top_right = "+",
bottom_right = "+",
},
["single"] = {
}
if core.hasUnicode() then
-- unicode based framing characters
drawer.frame_styles["single"] = {
horizontal = "\xE2\x94\x80",
vertical = "\xE2\x94\x82",
top_left = "\xE2\x94\x8C",
bottom_left = "\xE2\x94\x94",
top_right = "\xE2\x94\x90",
bottom_right = "\xE2\x94\x98",
},
["double"] = {
}
drawer.frame_styles["double"] = {
horizontal = "\xE2\x95\x90",
vertical = "\xE2\x95\x91",
top_left = "\xE2\x95\x94",
bottom_left = "\xE2\x95\x9A",
top_right = "\xE2\x95\x97",
bottom_right = "\xE2\x95\x9D",
},
}
}
else
-- non-unicode cons25-style framing characters
drawer.frame_styles["single"] = {
horizontal = "\xC4",
vertical = "\xB3",
top_left = "\xDA",
bottom_left = "\xC0",
top_right = "\xBF",
bottom_right = "\xD9",
}
drawer.frame_styles["double"] = {
horizontal = "\xCD",
vertical = "\xBA",
top_left = "\xC9",
bottom_left = "\xC8",
top_right = "\xBB",
bottom_right = "\xBC",
}
end
function drawer.drawscreen(menudef)
-- drawlogo() must go first.
@@ -30,6 +30,7 @@
#ifndef _LINUXKPI_LINUX_LOCKDEP_H_
#define _LINUXKPI_LINUX_LOCKDEP_H_
#include <sys/systm.h>
#include <sys/types.h>
#include <sys/lock.h>
+2
View File
@@ -1741,9 +1741,11 @@ dev/gve/gve_sysctl.c optional gve
dev/gve/gve_tx.c optional gve
dev/gve/gve_utils.c optional gve
dev/goldfish/goldfish_rtc.c optional goldfish_rtc fdt
dev/gpio/acpi_gpiobus.c optional acpi gpio
dev/gpio/dwgpio/dwgpio.c optional gpio dwgpio fdt
dev/gpio/dwgpio/dwgpio_bus.c optional gpio dwgpio fdt
dev/gpio/dwgpio/dwgpio_if.m optional gpio dwgpio fdt
dev/gpio/gpioaei.c optional acpi gpio
dev/gpio/gpiobacklight.c optional gpiobacklight fdt
dev/gpio/gpiokeys.c optional gpiokeys fdt
dev/gpio/gpiokeys_codes.c optional gpiokeys fdt
+1 -1
View File
@@ -53,7 +53,7 @@
TYPE="FreeBSD"
REVISION="14.2"
BRANCH="PRERELEASE"
BRANCH="RELEASE"
if [ -n "${BRANCH_OVERRIDE}" ]; then
BRANCH=${BRANCH_OVERRIDE}
fi
+9
View File
@@ -3858,13 +3858,22 @@ acpi_invoke_wake_eventhandler(void *context)
UINT32
acpi_event_power_button_sleep(void *context)
{
#if defined(__amd64__) || defined(__i386__)
struct acpi_softc *sc = (struct acpi_softc *)context;
#else
(void)context;
#endif
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
#if defined(__amd64__) || defined(__i386__)
if (ACPI_FAILURE(AcpiOsExecute(OSL_NOTIFY_HANDLER,
acpi_invoke_sleep_eventhandler, &sc->acpi_power_button_sx)))
return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
#else
shutdown_nice(RB_POWEROFF);
#endif
return_VALUE (ACPI_INTERRUPT_HANDLED);
}
+3
View File
@@ -224,12 +224,15 @@ extern struct mtx acpi_mutex;
* ACPI_Q_MADT_IRQ0: Specifies that ISA IRQ 0 is wired up to pin 0 of the
* first APIC and that the MADT should force that by ignoring the PC-AT
* compatible flag and ignoring overrides that redirect IRQ 0 to pin 2.
* ACPI_Q_AEI_NOPULL: Specifies that _AEI objects incorrectly designate pins
* as "PullUp" and they should be treated as "NoPull" instead.
*/
extern int acpi_quirks;
#define ACPI_Q_OK 0
#define ACPI_Q_BROKEN (1 << 0)
#define ACPI_Q_TIMER (1 << 1)
#define ACPI_Q_MADT_IRQ0 (1 << 2)
#define ACPI_Q_AEI_NOPULL (1 << 3)
#if defined(__amd64__) || defined(__i386__)
/*
+432
View File
@@ -0,0 +1,432 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2024 Ahmad Khalifa <ahmadkhalifa570@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <sys/types.h>
#include <sys/bus.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/gpio.h>
#include <contrib/dev/acpica/include/acpi.h>
#include <dev/acpica/acpivar.h>
#include <dev/gpio/gpiobusvar.h>
#include <dev/gpio/acpi_gpiobusvar.h>
#include "gpiobus_if.h"
struct acpi_gpiobus_softc {
struct gpiobus_softc super_sc;
ACPI_CONNECTION_INFO handler_info;
};
struct acpi_gpiobus_ctx {
struct gpiobus_softc *sc;
ACPI_HANDLE dev_handle;
};
struct acpi_gpiobus_ivar
{
struct gpiobus_ivar gpiobus; /* Must come first */
ACPI_HANDLE dev_handle; /* ACPI handle for bus */
uint32_t flags;
};
static uint32_t
acpi_gpiobus_convflags(ACPI_RESOURCE_GPIO *gpio_res)
{
uint32_t flags = 0;
/* Figure out pin flags */
if (gpio_res->ConnectionType == ACPI_RESOURCE_GPIO_TYPE_INT) {
switch (gpio_res->Polarity) {
case ACPI_ACTIVE_HIGH:
flags = gpio_res->Triggering == ACPI_LEVEL_SENSITIVE ?
GPIO_INTR_LEVEL_HIGH : GPIO_INTR_EDGE_RISING;
break;
case ACPI_ACTIVE_LOW:
flags = gpio_res->Triggering == ACPI_LEVEL_SENSITIVE ?
GPIO_INTR_LEVEL_LOW : GPIO_INTR_EDGE_FALLING;
break;
case ACPI_ACTIVE_BOTH:
flags = GPIO_INTR_EDGE_BOTH;
break;
}
#ifdef NOT_YET
/* This is not currently implemented. */
if (gpio_res->Shareable == ACPI_SHARED)
flags |= GPIO_INTR_SHAREABLE;
#endif
}
switch (gpio_res->IoRestriction) {
case ACPI_IO_RESTRICT_INPUT:
flags |= GPIO_PIN_INPUT;
break;
case ACPI_IO_RESTRICT_OUTPUT:
flags |= GPIO_PIN_OUTPUT;
break;
}
switch (gpio_res->PinConfig) {
case ACPI_PIN_CONFIG_PULLUP:
flags |= GPIO_PIN_PULLUP;
break;
case ACPI_PIN_CONFIG_PULLDOWN:
flags |= GPIO_PIN_PULLDOWN;
break;
}
return (flags);
}
static ACPI_STATUS
acpi_gpiobus_enumerate_res(ACPI_RESOURCE *res, void *context)
{
ACPI_RESOURCE_GPIO *gpio_res = &res->Data.Gpio;
struct acpi_gpiobus_ctx *ctx = context;
struct gpiobus_softc *super_sc = ctx->sc;
ACPI_HANDLE handle;
uint32_t flags, i;
if (res->Type != ACPI_RESOURCE_TYPE_GPIO)
return (AE_OK);
if (ACPI_FAILURE(AcpiGetHandle(ACPI_ROOT_OBJECT,
gpio_res->ResourceSource.StringPtr, &handle)) ||
handle != ctx->dev_handle)
return (AE_OK);
if (__predict_false(gpio_res->PinTableLength > super_sc->sc_npins)) {
device_printf(super_sc->sc_busdev,
"invalid pin table length %hu, max: %d (bad ACPI tables?)\n",
gpio_res->PinTableLength, super_sc->sc_npins);
return (AE_LIMIT);
}
flags = acpi_gpiobus_convflags(gpio_res);
for (i = 0; i < gpio_res->PinTableLength; i++) {
UINT16 pin = gpio_res->PinTable[i];
if (__predict_false(pin >= super_sc->sc_npins)) {
device_printf(super_sc->sc_busdev,
"invalid pin 0x%x, max: 0x%x (bad ACPI tables?)\n",
pin, super_sc->sc_npins - 1);
return (AE_LIMIT);
}
GPIO_PIN_SETFLAGS(super_sc->sc_dev, pin, flags &
~GPIO_INTR_MASK);
}
return (AE_OK);
}
static struct acpi_gpiobus_ivar *
acpi_gpiobus_setup_devinfo(device_t bus, device_t child,
ACPI_RESOURCE_GPIO *gpio_res)
{
struct acpi_gpiobus_ivar *devi;
devi = malloc(sizeof(*devi), M_DEVBUF, M_NOWAIT | M_ZERO);
if (devi == NULL)
return (NULL);
resource_list_init(&devi->gpiobus.rl);
devi->flags = acpi_gpiobus_convflags(gpio_res);
if (acpi_quirks & ACPI_Q_AEI_NOPULL)
devi->flags &= ~GPIO_PIN_PULLUP;
devi->gpiobus.npins = 1;
if (gpiobus_alloc_ivars(&devi->gpiobus) != 0) {
free(devi, M_DEVBUF);
return (NULL);
}
for (int i = 0; i < devi->gpiobus.npins; i++)
devi->gpiobus.pins[i] = gpio_res->PinTable[i];
return (devi);
}
static ACPI_STATUS
acpi_gpiobus_enumerate_aei(ACPI_RESOURCE *res, void *context)
{
ACPI_RESOURCE_GPIO *gpio_res = &res->Data.Gpio;
struct acpi_gpiobus_ctx *ctx = context;
device_t bus = ctx->sc->sc_busdev;
device_t child;
struct acpi_gpiobus_ivar *devi;
/* Check that we have a GpioInt object. */
if (res->Type != ACPI_RESOURCE_TYPE_GPIO)
return (AE_OK);
if (gpio_res->ConnectionType != ACPI_RESOURCE_GPIO_TYPE_INT)
return (AE_OK);
/* Add a child. */
child = device_add_child_ordered(bus, 0, "gpio_aei", -1);
if (child == NULL)
return (AE_OK);
devi = acpi_gpiobus_setup_devinfo(bus, child, gpio_res);
if (devi == NULL) {
device_delete_child(bus, child);
return (AE_OK);
}
device_set_ivars(child, devi);
for (int i = 0; i < devi->gpiobus.npins; i++) {
if (GPIOBUS_PIN_SETFLAGS(bus, child, 0, devi->flags)) {
gpiobus_free_ivars(&devi->gpiobus);
free(devi, M_DEVBUF);
device_delete_child(bus, child);
return (AE_OK);
}
}
/* Pass ACPI information to children. */
devi->dev_handle = ctx->dev_handle;
return (AE_OK);
}
static ACPI_STATUS
acpi_gpiobus_enumerate(ACPI_HANDLE handle, UINT32 depth, void *context,
void **result)
{
UINT32 sta;
/*
* If no _STA method or if it failed, then assume that
* the device is present.
*/
if (!ACPI_FAILURE(acpi_GetInteger(handle, "_STA", &sta)) &&
!ACPI_DEVICE_PRESENT(sta))
return (AE_OK);
if (!acpi_has_hid(handle))
return (AE_OK);
/* Look for GPIO resources */
AcpiWalkResources(handle, "_CRS", acpi_gpiobus_enumerate_res, context);
return (AE_OK);
}
static ACPI_STATUS
acpi_gpiobus_space_handler(UINT32 function, ACPI_PHYSICAL_ADDRESS address,
UINT32 length, UINT64 *value, void *context, void *region_context)
{
ACPI_CONNECTION_INFO *info = context;
ACPI_RESOURCE_GPIO *gpio_res;
device_t controller;
ACPI_RESOURCE *res;
ACPI_STATUS status;
status = AcpiBufferToResource(info->Connection, info->Length, &res);
if (ACPI_FAILURE(status) || res->Type != ACPI_RESOURCE_TYPE_GPIO)
goto err;
gpio_res = &res->Data.Gpio;
controller = __containerof(info, struct acpi_gpiobus_softc,
handler_info)->super_sc.sc_dev;
switch (function) {
case ACPI_WRITE:
if (__predict_false(
gpio_res->IoRestriction == ACPI_IO_RESTRICT_INPUT))
goto err;
for (int i = 0; i < length; i++)
if (GPIO_PIN_SET(controller,
gpio_res->PinTable[address + i], (*value & 1 << i) ?
GPIO_PIN_HIGH : GPIO_PIN_LOW) != 0)
goto err;
break;
case ACPI_READ:
if (__predict_false(
gpio_res->IoRestriction == ACPI_IO_RESTRICT_OUTPUT))
goto err;
for (int i = 0; i < length; i++) {
uint32_t v;
if (GPIO_PIN_GET(controller,
gpio_res->PinTable[address + i], &v) != 0)
goto err;
*value |= v << i;
}
break;
default:
goto err;
}
ACPI_FREE(res);
return (AE_OK);
err:
ACPI_FREE(res);
return (AE_BAD_PARAMETER);
}
static int
acpi_gpiobus_probe(device_t dev)
{
device_t controller;
if (acpi_disabled("gpiobus"))
return (ENXIO);
controller = device_get_parent(dev);
if (controller == NULL)
return (ENXIO);
if (acpi_get_handle(controller) == NULL)
return (ENXIO);
device_set_desc(dev, "GPIO bus (ACPI-hinted)");
return (BUS_PROBE_DEFAULT);
}
static int
acpi_gpiobus_attach(device_t dev)
{
struct acpi_gpiobus_softc *sc;
struct acpi_gpiobus_ctx ctx;
ACPI_HANDLE handle;
ACPI_STATUS status;
int err;
if ((err = gpiobus_attach(dev)) != 0)
return (err);
sc = device_get_softc(dev);
handle = acpi_get_handle(sc->super_sc.sc_dev);
if (handle == NULL) {
gpiobus_detach(dev);
return (ENXIO);
}
status = AcpiInstallAddressSpaceHandler(handle, ACPI_ADR_SPACE_GPIO,
acpi_gpiobus_space_handler, NULL, &sc->handler_info);
if (ACPI_FAILURE(status)) {
device_printf(dev,
"Failed to install GPIO address space handler\n");
gpiobus_detach(dev);
return (ENXIO);
}
ctx.dev_handle = handle;
ctx.sc = &sc->super_sc;
status = AcpiWalkNamespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, acpi_gpiobus_enumerate, NULL, &ctx, NULL);
if (ACPI_FAILURE(status))
device_printf(dev, "Failed to enumerate GPIO resources\n");
/* Look for AEI children */
status = AcpiWalkResources(handle, "_AEI", acpi_gpiobus_enumerate_aei,
&ctx);
if (ACPI_FAILURE(status))
device_printf(dev, "Failed to enumerate GPIO resources\n");
return (0);
}
static int
acpi_gpiobus_detach(device_t dev)
{
struct gpiobus_softc *super_sc;
ACPI_STATUS status;
super_sc = device_get_softc(dev);
status = AcpiRemoveAddressSpaceHandler(
acpi_get_handle(super_sc->sc_dev), ACPI_ADR_SPACE_GPIO,
acpi_gpiobus_space_handler
);
if (ACPI_FAILURE(status))
device_printf(dev,
"Failed to remove GPIO address space handler\n");
return (gpiobus_detach(dev));
}
int
gpio_pin_get_by_acpi_index(device_t consumer, uint32_t idx,
gpio_pin_t *out_pin)
{
struct acpi_gpiobus_ivar *devi;
int rv;
rv = gpio_pin_get_by_child_index(consumer, idx, out_pin);
if (rv != 0)
return (rv);
devi = device_get_ivars(consumer);
(*out_pin)->flags = devi->flags;
return (0);
}
static int
acpi_gpiobus_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
{
struct acpi_gpiobus_ivar *devi = device_get_ivars(child);
switch (which) {
case ACPI_GPIOBUS_IVAR_HANDLE:
*result = (uintptr_t)devi->dev_handle;
break;
default:
return (gpiobus_read_ivar(dev, child, which, result));
}
return (0);
}
static device_method_t acpi_gpiobus_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, acpi_gpiobus_probe),
DEVMETHOD(device_attach, acpi_gpiobus_attach),
DEVMETHOD(device_detach, acpi_gpiobus_detach),
/* Bus interface */
DEVMETHOD(bus_read_ivar, acpi_gpiobus_read_ivar),
DEVMETHOD_END
};
DEFINE_CLASS_1(gpiobus, acpi_gpiobus_driver, acpi_gpiobus_methods,
sizeof(struct acpi_gpiobus_softc), gpiobus_driver);
EARLY_DRIVER_MODULE(acpi_gpiobus, gpio, acpi_gpiobus_driver, NULL, NULL,
BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);
MODULE_VERSION(acpi_gpiobus, 1);
MODULE_DEPEND(acpi_gpiobus, acpi, 1, 1, 1);
+49
View File
@@ -0,0 +1,49 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2024 Colin Percival
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifndef __ACPI_GPIOBUS_H__
#define __ACPI_GPIOBUS_H__
#include <sys/bus.h>
#include <contrib/dev/acpica/include/acpi.h>
enum acpi_gpiobus_ivars {
ACPI_GPIOBUS_IVAR_HANDLE = 10600,
};
#define ACPI_GPIOBUS_ACCESSOR(var, ivar, type) \
__BUS_ACCESSOR(acpi_gpiobus, var, ACPI_GPIOBUS, ivar, type)
ACPI_GPIOBUS_ACCESSOR(handle, HANDLE, ACPI_HANDLE)
#undef ACPI_GPIOBUS_ACCESSOR
int gpio_pin_get_by_acpi_index(device_t consumer, uint32_t idx,
gpio_pin_t *out_pin);
#endif /* __ACPI_GPIOBUS_H__ */
+131
View File
@@ -0,0 +1,131 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2024 Colin Percival
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <sys/types.h>
#include <sys/bus.h>
#include <sys/gpio.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include "gpiobus_if.h"
#include <contrib/dev/acpica/include/acpi.h>
#include <dev/acpica/acpivar.h>
#include <dev/gpio/gpiobusvar.h>
#include <dev/gpio/acpi_gpiobusvar.h>
struct gpio_aei_softc {
ACPI_HANDLE handle;
char objname[5]; /* "_EXX" or "_LXX" */
struct resource * intr_res;
int intr_rid;
void * intr_cookie;
};
static int
gpio_aei_probe(device_t dev)
{
/* We only match when gpiobus explicitly requested gpio_aei. */
return (BUS_PROBE_NOWILDCARD);
}
static void
gpio_aei_intr(void * arg)
{
struct gpio_aei_softc * sc = arg;
/* Ask ACPI to run the appropriate _Exx or _Lxx method. */
AcpiEvaluateObject(sc->handle, sc->objname, NULL, NULL);
}
static int
gpio_aei_attach(device_t dev)
{
struct gpio_aei_softc * sc = device_get_softc(dev);
gpio_pin_t pin;
int err;
/* This is us. */
device_set_desc(dev, "ACPI Event Information Device");
/* Store parameters needed by gpio_aei_intr. */
sc->handle = acpi_gpiobus_get_handle(dev);
if (gpio_pin_get_by_acpi_index(dev, 0, &pin) != 0) {
device_printf(dev, "Unable to get the input pin\n");
return (ENXIO);
}
sprintf(sc->objname, "_%c%02X",
(pin->flags & GPIO_INTR_EDGE_MASK) ? 'E' : 'L', pin->pin);
/* Support for GPIO pins > 255 is not implemented. */
if (pin->pin > 255) {
device_printf(dev, "ACPI Event Information Device does not support pins > 255");
return (ENOTSUP);
}
/* Set up the interrupt. */
if ((sc->intr_res = gpio_alloc_intr_resource(dev, &sc->intr_rid,
RF_ACTIVE, pin, pin->flags & GPIO_INTR_MASK)) == NULL) {
device_printf(dev, "Cannot allocate an IRQ\n");
return (ENOTSUP);
}
err = bus_setup_intr(dev, sc->intr_res, INTR_TYPE_MISC | INTR_MPSAFE,
NULL, gpio_aei_intr, sc, &sc->intr_cookie);
if (err != 0) {
device_printf(dev, "Cannot set up IRQ\n");
bus_release_resource(dev, SYS_RES_IRQ, sc->intr_rid,
sc->intr_res);
return (err);
}
return (0);
}
static int
gpio_aei_detach(device_t dev)
{
struct gpio_aei_softc * sc = device_get_softc(dev);
bus_teardown_intr(dev, sc->intr_res, sc->intr_cookie);
bus_release_resource(dev, SYS_RES_IRQ, sc->intr_rid, sc->intr_res);
return (0);
}
static device_method_t gpio_aei_methods[] = {
/* Device interface. */
DEVMETHOD(device_probe, gpio_aei_probe),
DEVMETHOD(device_attach, gpio_aei_attach),
DEVMETHOD(device_detach, gpio_aei_detach),
DEVMETHOD_END
};
DEFINE_CLASS_0(gpio_aei, gpio_aei_driver, gpio_aei_methods, sizeof(struct gpio_aei_softc));
DRIVER_MODULE(gpio_aei, gpiobus, gpio_aei_driver, NULL, NULL);
MODULE_DEPEND(gpio_aei, acpi_gpiobus, 1, 1, 1);
+3 -5
View File
@@ -53,8 +53,6 @@
static void gpiobus_print_pins(struct gpiobus_ivar *, struct sbuf *);
static int gpiobus_parse_pins(struct gpiobus_softc *, device_t, int);
static int gpiobus_probe(device_t);
static int gpiobus_attach(device_t);
static int gpiobus_detach(device_t);
static int gpiobus_suspend(device_t);
static int gpiobus_resume(device_t);
static void gpiobus_probe_nomatch(device_t, device_t);
@@ -551,7 +549,7 @@ gpiobus_probe(device_t dev)
return (BUS_PROBE_GENERIC);
}
static int
int
gpiobus_attach(device_t dev)
{
int err;
@@ -573,7 +571,7 @@ gpiobus_attach(device_t dev)
* Since this is not a self-enumerating bus, and since we always add
* children in attach, we have to always delete children here.
*/
static int
int
gpiobus_detach(device_t dev)
{
struct gpiobus_softc *sc;
@@ -755,7 +753,7 @@ gpiobus_hinted_child(device_t bus, const char *dname, int dunit)
}
}
static int
int
gpiobus_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
{
struct gpiobus_ivar *devi;
+3
View File
@@ -174,9 +174,12 @@ struct resource *gpio_alloc_intr_resource(device_t consumer_dev, int *rid,
int gpio_check_flags(uint32_t, uint32_t);
device_t gpiobus_attach_bus(device_t);
int gpiobus_detach_bus(device_t);
int gpiobus_attach(device_t);
int gpiobus_detach(device_t);
int gpiobus_init_softc(device_t);
int gpiobus_alloc_ivars(struct gpiobus_ivar *);
void gpiobus_free_ivars(struct gpiobus_ivar *);
int gpiobus_read_ivar(device_t, device_t, int, uintptr_t *);
int gpiobus_acquire_pin(device_t, uint32_t);
int gpiobus_release_pin(device_t, uint32_t);
+2 -2
View File
@@ -396,5 +396,5 @@ static driver_t gpio_spi_driver = {
DRIVER_MODULE(gpiospi, gpiobus, gpio_spi_driver, 0, 0);
DRIVER_MODULE(spibus, gpiospi, spibus_driver, 0, 0);
MODULE_DEPEND(spi, gpiospi, 1, 1, 1);
MODULE_DEPEND(gpiobus, gpiospi, 1, 1, 1);
MODULE_DEPEND(gpiospi, spibus, 1, 1, 1);
MODULE_DEPEND(gpiospi, gpiobus, 1, 1, 1);
+4
View File
@@ -172,6 +172,8 @@ static int ig4iic_pci_detach(device_t dev);
#define PCI_CHIP_METEORLAKE_M_I2C_1 0x7e798086
#define PCI_CHIP_METEORLAKE_M_I2C_2 0x7e508086
#define PCI_CHIP_METEORLAKE_M_I2C_3 0x7e518086
#define PCI_CHIP_METEORLAKE_M_I2C_4 0x7e7a8086
#define PCI_CHIP_METEORLAKE_M_I2C_5 0x7e7b8086
struct ig4iic_pci_device {
uint32_t devid;
@@ -288,6 +290,8 @@ static struct ig4iic_pci_device ig4iic_pci_devices[] = {
{ PCI_CHIP_METEORLAKE_M_I2C_1, "Intel Meteor Lake-M I2C Controller-1", IG4_TIGERLAKE},
{ PCI_CHIP_METEORLAKE_M_I2C_2, "Intel Meteor Lake-M I2C Controller-2", IG4_TIGERLAKE},
{ PCI_CHIP_METEORLAKE_M_I2C_3, "Intel Meteor Lake-M I2C Controller-3", IG4_TIGERLAKE},
{ PCI_CHIP_METEORLAKE_M_I2C_4, "Intel Meteor Lake-M I2C Controller-4", IG4_TIGERLAKE},
{ PCI_CHIP_METEORLAKE_M_I2C_5, "Intel Meteor Lake-M I2C Controller-5", IG4_TIGERLAKE},
};
static int
+6 -2
View File
@@ -1205,8 +1205,12 @@ iichid_attach(device_t dev)
iichid_detach(dev);
}
done:
(void)iichid_set_power(sc, I2C_HID_POWER_OFF);
sc->power_on = false;
iicbus_request_bus(device_get_parent(dev), dev, IIC_WAIT);
if (!sc->open) {
(void)iichid_set_power(sc, I2C_HID_POWER_OFF);
sc->power_on = false;
}
iicbus_release_bus(device_get_parent(dev), dev);
return (error);
}
+1 -1
View File
@@ -120,7 +120,7 @@ static const struct terminal_class vt_termclass = {
/* Bell pitch/duration. */
#define VT_BELLDURATION (SBT_1S / 20)
#define VT_BELLPITCH (1193182 / 800) /* Approx 1491Hz */
#define VT_BELLPITCH 800
#define VT_UNIT(vw) ((vw)->vw_device->vd_unit * VT_MAXWINDOWS + \
(vw)->vw_number)
+4 -3
View File
@@ -2718,9 +2718,10 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags)
kve->kve_ref_count = obj->ref_count;
kve->kve_shadow_count = obj->shadow_count;
if (obj->type == OBJT_DEVICE ||
obj->type == OBJT_MGTDEVICE) {
cdev = obj->un_pager.devp.dev;
if ((obj->type == OBJT_DEVICE ||
obj->type == OBJT_MGTDEVICE) &&
(obj->flags & OBJ_CDEVH) != 0) {
cdev = obj->un_pager.devp.handle;
if (cdev != NULL) {
csw = dev_refthread(cdev, &ref);
if (csw != NULL) {
+34 -13
View File
@@ -53,6 +53,9 @@
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/cpuset.h>
#ifdef INTRNG
#include <sys/intr.h>
#endif
#include <net/vnet.h>
@@ -4382,17 +4385,26 @@ bus_generic_rman_activate_resource(device_t dev, device_t child, int type,
if (error != 0)
return (error);
if ((rman_get_flags(r) & RF_UNMAPPED) == 0 &&
(type == SYS_RES_MEMORY || type == SYS_RES_IOPORT)) {
error = BUS_MAP_RESOURCE(dev, child, type, r, NULL, &map);
if (error != 0) {
rman_deactivate_resource(r);
return (error);
}
switch (type) {
case SYS_RES_IOPORT:
case SYS_RES_MEMORY:
if ((rman_get_flags(r) & RF_UNMAPPED) == 0) {
error = BUS_MAP_RESOURCE(dev, child, type, r, NULL, &map);
if (error != 0)
break;
rman_set_mapping(r, &map);
rman_set_mapping(r, &map);
}
break;
#ifdef INTRNG
case SYS_RES_IRQ:
error = intr_activate_irq(child, r);
break;
#endif
}
return (0);
if (error != 0)
rman_deactivate_resource(r);
return (error);
}
/**
@@ -4421,10 +4433,19 @@ bus_generic_rman_deactivate_resource(device_t dev, device_t child, int type,
if (error != 0)
return (error);
if ((rman_get_flags(r) & RF_UNMAPPED) == 0 &&
(type == SYS_RES_MEMORY || type == SYS_RES_IOPORT)) {
rman_get_mapping(r, &map);
BUS_UNMAP_RESOURCE(dev, child, type, r, &map);
switch (type) {
case SYS_RES_IOPORT:
case SYS_RES_MEMORY:
if ((rman_get_flags(r) & RF_UNMAPPED) == 0) {
rman_get_mapping(r, &map);
BUS_UNMAP_RESOURCE(dev, child, type, r, &map);
}
break;
#ifdef INTRNG
case SYS_RES_IRQ:
intr_deactivate_irq(child, r);
break;
#endif
}
return (0);
}
+4 -18
View File
@@ -1961,25 +1961,11 @@ vn_alloc_hard(struct mount *mp, u_long rnumvnodes, bool bumped)
mtx_lock(&vnode_list_mtx);
if (vn_alloc_cyclecount != 0) {
rnumvnodes = atomic_load_long(&numvnodes);
if (rnumvnodes + 1 < desiredvnodes) {
vn_alloc_cyclecount = 0;
mtx_unlock(&vnode_list_mtx);
goto alloc;
}
rfreevnodes = vnlru_read_freevnodes();
if (rfreevnodes < wantfreevnodes) {
if (vn_alloc_cyclecount++ >= rfreevnodes) {
vn_alloc_cyclecount = 0;
vstir = true;
}
} else {
vn_alloc_cyclecount = 0;
}
rfreevnodes = vnlru_read_freevnodes();
if (vn_alloc_cyclecount++ >= rfreevnodes) {
vn_alloc_cyclecount = 0;
vstir = true;
}
/*
* Grow the vnode cache if it will not be above its target max
* after growing. Otherwise, if the free list is nonempty, try
+4
View File
@@ -30,4 +30,8 @@ SUBDIR = gpiobus gpioiic gpioled gpiospi gpioths
SUBDIR += gpiokeys gpiopps
.endif
.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
SUBDIR += gpioaei
.endif
.include <bsd.subdir.mk>
+15
View File
@@ -0,0 +1,15 @@
.PATH: ${SRCTOP}/sys/dev/gpio/
KMOD= gpioaei
SRCS= gpioaei.c
SRCS+= \
acpi_if.h \
bus_if.h \
device_if.h \
gpio_if.h \
gpiobus_if.h
CFLAGS+= -I. -I${SRCTOP}/sys/dev/gpio/
.include <bsd.kmod.mk>
+3
View File
@@ -38,6 +38,9 @@ SRCS+= device_if.h bus_if.h opt_platform.h
.if !empty(OPT_FDT)
SRCS+= ofw_gpiobus.c
.endif
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "aarch64"
SRCS+= acpi_gpiobus.c opt_acpi.h acpi_if.h
.endif
CFLAGS+= -I. -I${SRCTOP}/sys/dev/gpio/
+1 -1
View File
@@ -193,7 +193,7 @@
* List of capabilities to possibly mask on the member interface.
*/
#define BRIDGE_IFCAPS_MASK (IFCAP_TOE|IFCAP_TSO|IFCAP_TXCSUM|\
IFCAP_TXCSUM_IPV6)
IFCAP_TXCSUM_IPV6|IFCAP_MEXTPG)
/*
* List of capabilities to strip
+2 -2
View File
@@ -338,8 +338,8 @@ sctp_addr_change(struct ifaddr *ifa, int cmd)
(void *)ifa, ifa->ifa_addr, ifa_flags, 1);
} else {
sctp_del_addr_from_vrf(SCTP_DEFAULT_VRFID, ifa->ifa_addr,
ifa->ifa_ifp->if_index,
ifa->ifa_ifp->if_xname);
(void *)ifa->ifa_ifp,
ifa->ifa_ifp->if_index);
/*
* We don't bump refcount here so when it completes the
+13 -115
View File
@@ -193,12 +193,11 @@ sctp_find_ifn(void *ifn, uint32_t ifn_index)
struct sctp_ifnlist *hash_ifn_head;
SCTP_IPI_ADDR_LOCK_ASSERT();
KASSERT(ifn != NULL, ("sctp_find_ifn(NULL, %u) called", ifn_index));
hash_ifn_head = &SCTP_BASE_INFO(vrf_ifn_hash)[(ifn_index & SCTP_BASE_INFO(vrf_ifn_hashmark))];
LIST_FOREACH(sctp_ifnp, hash_ifn_head, next_bucket) {
if (sctp_ifnp->ifn_index == ifn_index) {
break;
}
if (ifn != NULL && sctp_ifnp->ifn_p == ifn) {
if (sctp_ifnp->ifn_index == ifn_index &&
sctp_ifnp->ifn_p == ifn) {
break;
}
}
@@ -276,90 +275,6 @@ sctp_delete_ifn(struct sctp_ifn *sctp_ifnp)
sctp_free_ifn(sctp_ifnp);
}
void
sctp_mark_ifa_addr_down(uint32_t vrf_id, struct sockaddr *addr,
const char *if_name, uint32_t ifn_index)
{
struct sctp_vrf *vrf;
struct sctp_ifa *sctp_ifap;
SCTP_IPI_ADDR_RLOCK();
vrf = sctp_find_vrf(vrf_id);
if (vrf == NULL) {
SCTPDBG(SCTP_DEBUG_PCB4, "Can't find vrf_id 0x%x\n", vrf_id);
goto out;
}
sctp_ifap = sctp_find_ifa_by_addr(addr, vrf->vrf_id, SCTP_ADDR_LOCKED);
if (sctp_ifap == NULL) {
SCTPDBG(SCTP_DEBUG_PCB4, "Can't find sctp_ifap for address\n");
goto out;
}
if (sctp_ifap->ifn_p == NULL) {
SCTPDBG(SCTP_DEBUG_PCB4, "IFA has no IFN - can't mark unusable\n");
goto out;
}
if (if_name) {
if (strncmp(if_name, sctp_ifap->ifn_p->ifn_name, SCTP_IFNAMSIZ) != 0) {
SCTPDBG(SCTP_DEBUG_PCB4, "IFN %s of IFA not the same as %s\n",
sctp_ifap->ifn_p->ifn_name, if_name);
goto out;
}
} else {
if (sctp_ifap->ifn_p->ifn_index != ifn_index) {
SCTPDBG(SCTP_DEBUG_PCB4, "IFA owned by ifn_index:%d down command for ifn_index:%d - ignored\n",
sctp_ifap->ifn_p->ifn_index, ifn_index);
goto out;
}
}
sctp_ifap->localifa_flags &= (~SCTP_ADDR_VALID);
sctp_ifap->localifa_flags |= SCTP_ADDR_IFA_UNUSEABLE;
out:
SCTP_IPI_ADDR_RUNLOCK();
}
void
sctp_mark_ifa_addr_up(uint32_t vrf_id, struct sockaddr *addr,
const char *if_name, uint32_t ifn_index)
{
struct sctp_vrf *vrf;
struct sctp_ifa *sctp_ifap;
SCTP_IPI_ADDR_RLOCK();
vrf = sctp_find_vrf(vrf_id);
if (vrf == NULL) {
SCTPDBG(SCTP_DEBUG_PCB4, "Can't find vrf_id 0x%x\n", vrf_id);
goto out;
}
sctp_ifap = sctp_find_ifa_by_addr(addr, vrf->vrf_id, SCTP_ADDR_LOCKED);
if (sctp_ifap == NULL) {
SCTPDBG(SCTP_DEBUG_PCB4, "Can't find sctp_ifap for address\n");
goto out;
}
if (sctp_ifap->ifn_p == NULL) {
SCTPDBG(SCTP_DEBUG_PCB4, "IFA has no IFN - can't mark unusable\n");
goto out;
}
if (if_name) {
if (strncmp(if_name, sctp_ifap->ifn_p->ifn_name, SCTP_IFNAMSIZ) != 0) {
SCTPDBG(SCTP_DEBUG_PCB4, "IFN %s of IFA not the same as %s\n",
sctp_ifap->ifn_p->ifn_name, if_name);
goto out;
}
} else {
if (sctp_ifap->ifn_p->ifn_index != ifn_index) {
SCTPDBG(SCTP_DEBUG_PCB4, "IFA owned by ifn_index:%d down command for ifn_index:%d - ignored\n",
sctp_ifap->ifn_p->ifn_index, ifn_index);
goto out;
}
}
sctp_ifap->localifa_flags &= (~SCTP_ADDR_IFA_UNUSEABLE);
sctp_ifap->localifa_flags |= SCTP_ADDR_VALID;
out:
SCTP_IPI_ADDR_RUNLOCK();
}
/*-
* Add an ifa to an ifn.
* Register the interface as necessary.
@@ -523,7 +438,8 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index,
if (sctp_ifap != NULL) {
/* The address being added is already or still known. */
if (sctp_ifap->ifn_p != NULL) {
if (sctp_ifap->ifn_p->ifn_index == ifn_index) {
if (sctp_ifap->ifn_p->ifn_index == ifn_index &&
sctp_ifap->ifn_p->ifn_p == ifn) {
SCTPDBG(SCTP_DEBUG_PCB4,
"Using existing ifn %s (0x%x) for ifa %p\n",
sctp_ifap->ifn_p->ifn_name, ifn_index,
@@ -662,8 +578,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index,
*/
SCTPDBG(SCTP_DEBUG_PCB4, "Lost an address change?\n");
/* Opps, must decrement the count */
sctp_del_addr_from_vrf(vrf_id, addr, ifn_index,
if_name);
sctp_del_addr_from_vrf(vrf_id, addr, ifn, ifn_index);
return (NULL);
}
SCTP_INCR_LADDR_COUNT();
@@ -688,7 +603,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index,
void
sctp_del_addr_from_vrf(uint32_t vrf_id, struct sockaddr *addr,
uint32_t ifn_index, const char *if_name)
void *ifn, uint32_t ifn_index)
{
struct sctp_vrf *vrf;
struct sctp_ifa *sctp_ifap;
@@ -709,29 +624,12 @@ sctp_del_addr_from_vrf(uint32_t vrf_id, struct sockaddr *addr,
if (sctp_ifap != NULL) {
/* Validate the delete */
if (sctp_ifap->ifn_p) {
bool valid = false;
/*-
* The name has priority over the ifn_index
* if its given.
*/
if (if_name) {
if (strncmp(if_name, sctp_ifap->ifn_p->ifn_name, SCTP_IFNAMSIZ) == 0) {
/* They match its a correct delete */
valid = true;
}
}
if (!valid) {
/* last ditch check ifn_index */
if (ifn_index == sctp_ifap->ifn_p->ifn_index) {
valid = true;
}
}
if (!valid) {
SCTPDBG(SCTP_DEBUG_PCB4, "ifn:%d ifname:%s does not match addresses\n",
ifn_index, ((if_name == NULL) ? "NULL" : if_name));
SCTPDBG(SCTP_DEBUG_PCB4, "ifn:%d ifname:%s - ignoring delete\n",
sctp_ifap->ifn_p->ifn_index, sctp_ifap->ifn_p->ifn_name);
if (ifn_index != sctp_ifap->ifn_p->ifn_index ||
ifn != sctp_ifap->ifn_p->ifn_p) {
SCTPDBG(SCTP_DEBUG_PCB4, "ifn:%d (%p) ifname:%s - ignoring delete\n",
sctp_ifap->ifn_p->ifn_index,
sctp_ifap->ifn_p->ifn_p,
sctp_ifap->ifn_p->ifn_name);
SCTP_IPI_ADDR_WUNLOCK();
return;
}
+1 -13
View File
@@ -487,18 +487,6 @@ struct sctp_vrf *sctp_allocate_vrf(int vrfid);
struct sctp_vrf *sctp_find_vrf(uint32_t vrfid);
void sctp_free_vrf(struct sctp_vrf *vrf);
/*-
* Change address state, can be used if
* O/S supports telling transports about
* changes to IFA/IFN's (link layer triggers).
* If a ifn goes down, we will do src-addr-selection
* and NOT use that, as a source address. This does
* not stop the routing system from routing out
* that interface, but we won't put it as a source.
*/
void sctp_mark_ifa_addr_down(uint32_t vrf_id, struct sockaddr *addr, const char *if_name, uint32_t ifn_index);
void sctp_mark_ifa_addr_up(uint32_t vrf_id, struct sockaddr *addr, const char *if_name, uint32_t ifn_index);
struct sctp_ifa *
sctp_add_addr_to_vrf(uint32_t vrfid,
void *ifn, uint32_t ifn_index, uint32_t ifn_type,
@@ -510,7 +498,7 @@ void sctp_free_ifa(struct sctp_ifa *sctp_ifap);
void
sctp_del_addr_from_vrf(uint32_t vrfid, struct sockaddr *addr,
uint32_t ifn_index, const char *if_name);
void *ifn, uint32_t ifn_index);
struct sctp_nets *sctp_findnet(struct sctp_tcb *, struct sockaddr *);
+1 -1
View File
@@ -288,7 +288,7 @@ struct xdr_discrim {
* These are the "generic" xdr routines.
*/
__BEGIN_DECLS
extern bool_t xdr_void(void);
extern bool_t xdr_void(XDR *, void *);
extern bool_t xdr_int(XDR *, int *);
extern bool_t xdr_u_int(XDR *, u_int *);
extern bool_t xdr_long(XDR *, long *);
+3 -3
View File
@@ -83,10 +83,10 @@
#define GPIO_INTR_EDGE_FALLING 0x00080000 /* edge trigger, falling */
#define GPIO_INTR_EDGE_BOTH 0x00100000 /* edge trigger, both */
#define GPIO_INTR_ATTACHED 0x00200000 /* interrupt attached to file */
#define GPIO_INTR_EDGE_MASK (GPIO_INTR_EDGE_RISING | \
GPIO_INTR_EDGE_FALLING | GPIO_INTR_EDGE_BOTH )
#define GPIO_INTR_MASK (GPIO_INTR_LEVEL_LOW | GPIO_INTR_LEVEL_HIGH | \
GPIO_INTR_EDGE_RISING | \
GPIO_INTR_EDGE_FALLING | GPIO_INTR_EDGE_BOTH | \
GPIO_INTR_ATTACHED)
GPIO_INTR_EDGE_MASK | GPIO_INTR_ATTACHED)
struct gpio_pin {
uint32_t gp_pin; /* pin number */
+1 -1
View File
@@ -75,7 +75,7 @@
* cannot include sys/param.h and should only be updated here.
*/
#undef __FreeBSD_version
#define __FreeBSD_version 1401503
#define __FreeBSD_version 1402000
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
+10 -10
View File
@@ -121,8 +121,8 @@ cdev_pager_lookup(void *handle)
again:
mtx_lock(&dev_pager_mtx);
object = vm_pager_object_lookup(&dev_pager_object_list, handle);
if (object != NULL && object->un_pager.devp.dev == NULL) {
msleep(&object->un_pager.devp.dev, &dev_pager_mtx,
if (object != NULL && object->un_pager.devp.handle == NULL) {
msleep(&object->un_pager.devp.handle, &dev_pager_mtx,
PVM | PDROP, "cdplkp", 0);
vm_object_deallocate(object);
goto again;
@@ -186,8 +186,8 @@ again:
object1->type = OBJT_DEAD;
vm_object_deallocate(object1);
object1 = NULL;
if (object->un_pager.devp.dev == NULL) {
msleep(&object->un_pager.devp.dev,
if (object->un_pager.devp.handle == NULL) {
msleep(&object->un_pager.devp.handle,
&dev_pager_mtx, PVM | PDROP, "cdplkp", 0);
vm_object_deallocate(object);
goto again;
@@ -221,7 +221,7 @@ again:
mtx_lock(&dev_pager_mtx);
TAILQ_REMOVE(&dev_pager_object_list, object,
pager_object_list);
wakeup(&object->un_pager.devp.dev);
wakeup(&object->un_pager.devp.handle);
mtx_unlock(&dev_pager_mtx);
object->type = OBJT_DEAD;
vm_object_deallocate(object);
@@ -231,14 +231,14 @@ again:
mtx_lock(&dev_pager_mtx);
object->flags |= OBJ_COLORED;
object->pg_color = color;
object->un_pager.devp.dev = handle;
wakeup(&object->un_pager.devp.dev);
object->un_pager.devp.handle = handle;
wakeup(&object->un_pager.devp.handle);
}
}
MPASS(object1 == NULL);
} else {
if (object->un_pager.devp.dev == NULL) {
msleep(&object->un_pager.devp.dev,
if (object->un_pager.devp.handle == NULL) {
msleep(&object->un_pager.devp.handle,
&dev_pager_mtx, PVM | PDROP, "cdplkp", 0);
vm_object_deallocate(object);
goto again;
@@ -292,7 +292,7 @@ dev_pager_dealloc(vm_object_t object)
vm_page_t m;
VM_OBJECT_WUNLOCK(object);
object->un_pager.devp.ops->cdev_pg_dtor(object->un_pager.devp.dev);
object->un_pager.devp.ops->cdev_pg_dtor(object->un_pager.devp.handle);
mtx_lock(&dev_pager_mtx);
TAILQ_REMOVE(&dev_pager_object_list, object, pager_object_list);
+3
View File
@@ -1435,6 +1435,9 @@ vm_mmap_cdev(struct thread *td, vm_size_t objsize, vm_prot_t prot,
td->td_ucred);
if (obj == NULL)
return (EINVAL);
VM_OBJECT_WLOCK(obj);
vm_object_set_flag(obj, OBJ_CDEVH);
VM_OBJECT_WUNLOCK(obj);
*objp = obj;
*flagsp = flags;
return (0);
+3 -2
View File
@@ -2610,8 +2610,9 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only)
sp = swap_pager_swapped_pages(obj);
kvo->kvo_swapped = sp > UINT32_MAX ? UINT32_MAX : sp;
}
if (obj->type == OBJT_DEVICE || obj->type == OBJT_MGTDEVICE) {
cdev = obj->un_pager.devp.dev;
if ((obj->type == OBJT_DEVICE || obj->type == OBJT_MGTDEVICE) &&
(obj->flags & OBJ_CDEVH) != 0) {
cdev = obj->un_pager.devp.handle;
if (cdev != NULL) {
csw = dev_refthread(cdev, &ref);
if (csw != NULL) {
+2 -1
View File
@@ -139,7 +139,7 @@ struct vm_object {
struct {
TAILQ_HEAD(, vm_page) devp_pglist;
const struct cdev_pager_ops *ops;
struct cdev *dev;
void *handle;
} devp;
/*
@@ -206,6 +206,7 @@ struct vm_object {
#define OBJ_PAGERPRIV2 0x00008000 /* Pager private */
#define OBJ_SYSVSHM 0x00010000 /* SysV SHM */
#define OBJ_POSIXSHM 0x00020000 /* Posix SHM */
#define OBJ_CDEVH 0x00040000 /* OBJT_DEVICE handle is cdev */
/*
* Helpers to perform conversion between vm_object page indexes and offsets.
+1 -2
View File
@@ -88,9 +88,8 @@ xdr_free(xdrproc_t proc, void *objp)
* XDR nothing
*/
bool_t
xdr_void(void)
xdr_void(XDR *xrds __unused, void *ptr __unused)
{
return (TRUE);
}
+18 -1
View File
@@ -1,6 +1,10 @@
.\"-
.\" Copyright (c) 2011-2013 Nathan Whitehorn <[email protected]> All rights reserved.
.\" Copyright (c) 2018 Roberto Fernandez Cueto <[email protected]>
.\" Copyright (c) 2024 The FreeBSD Foundation
.\"
.\" Portions of this documentation were written by Björn Zeeb
.\" under sponsorship from the FreeBSD Foundation.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -23,7 +27,7 @@
.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd November 18, 2023
.Dd November 4, 2024
.Dt BSDINSTALL 8
.Os
.Sh NAME
@@ -240,6 +244,12 @@ Extracts the distributions listed in
.Ev DISTRIBUTIONS
into
.Ev BSDINSTALL_CHROOT .
.It Cm firmware
executes
.Xr fwget 8
inside the
.Ev BSDINSTALL_CHROOT
to install any needed and available firmware for the new system.
.It Cm rootpass
Interactively invokes
.Xr passwd 1
@@ -323,6 +333,13 @@ Default:
Path to a log file for the installation.
Default:
.Dq Pa $TMPDIR/bsdinstall_log
.It Ev BSDINSTALL_SKIP_FIRMWARE
If not empty, the
.Cm auto
target
will not invoke the
.Cm firmware
target.
.It Ev BSDINSTALL_SKIP_HARDENING
If not empty, the
.Cm auto
+1
View File
@@ -7,6 +7,7 @@ SCRIPTS=auto \
docsinstall \
entropy \
fetchmissingdists \
firmware \
hardening \
hostname \
jail \
+1
View File
@@ -364,6 +364,7 @@ fi
[ -z "$BSDINSTALL_SKIP_TIME" ] && bsdinstall time
[ -z "$BSDINSTALL_SKIP_SERVICES" ] && bsdinstall services
[ -z "$BSDINSTALL_SKIP_HARDENING" ] && bsdinstall hardening
[ -z "$BSDINSTALL_SKIP_FIRMWARE" ] && bsdinstall firmware
[ -z "$BSDINSTALL_SKIP_USERS" ] && dialog --backtitle "$OSNAME Installer" \
--title "Add User Accounts" --yesno \
+125
View File
@@ -0,0 +1,125 @@
#!/bin/sh
#-
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2024 The FreeBSD Foundation
#
# This software was developed by Björn Zeeb
# under sponsorship from the FreeBSD Foundation.
#
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/packages/packages.subr
msg_freebsd_firmware_installation="$OSNAME Firmware Installation"
msg_freebsd_installer="$OSNAME Installer"
msg_firmware_menu_text="This menu allows you to install firmware packages for your system"
hline_arrows_space_tab_enter="Use arrows, SPACE, TAB or ENTER"
hline_ok="Press OK to continue"
dialog_menu_main()
{
local title="$DIALOG_TITLE"
local btitle="$DIALOG_BACKTITLE"
local prompt="$msg_firmware_menu_text"
local hline
local check_list= # Empty; filled below
local fwlist _fw
fwlist=`chroot $BSDINSTALL_CHROOT fwget -q -n`
case "${fwlist}" in
"") # No firmware to install
# Print a dialog with OK and a 3 line timeout bar.
local height width rows msg
msg="No firmware to install, continuing..."
hline="$hline_ok"
eval f_dialog_checklist_size height width rows \
\"\$title\" \
\"\$btitle\" \
\"\$msg\" \
\"-\" \
\"n\" \
\"-\" \
\"\$hline\"
${DIALOG} --title "${title}" --backtitle "${btitle}" \
--hline "${hline}" \
--nocancel --pause "${msg}" $height $width 5
f_dialog_menutag_store -s ""
return $DIALOG_OK
;;
*)
local desc status height width rows selected retval
hline="$hline_arrows_space_tab_enter"
for _fw in ${fwlist}; do
desc="${_fw}"
f_shell_escape "$desc" desc
# install each firmware package by default.
check_list="$check_list
'$_fw' '$desc' 'on'
"
done
eval f_dialog_checklist_size height width rows \
\"\$title\" \
\"\$btitle\" \
\"\$prompt\" \
\"\$hline\" \
$check_list
selected=$( eval $DIALOG \
--title \"\$title\" \
--backtitle \"\$btitle\" \
--separate-output \
--hline \"\$hline\" \
--ok-label \"\$msg_ok\" \
--cancel-label \"\$msg_cancel\" \
--checklist \"\$prompt\" \
$height $width $rows \
$check_list \
2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
)
retval=$?
f_dialog_menutag_store -s "$selected"
return $retval
;;
esac
}
# Initialize
f_dialog_title "$msg_freebsd_firmware_installation"
f_dialog_backtitle "$msg_freebsd_installer"
# Gather the firmware files and present them to the user
dialog_menu_main || f_die
f_dialog_menutag_fetch selected
# Nothing to install?
if [ "${selected}" == "" ]; then
exit 0
fi
f_mustberoot_init
# pkg(8) needs name servers (unless we could use a local repo in the future).
f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/
${DIALOG} --title "$DIALOG_TITLE" --backtitle "$DIALOG_BACKTITLE" \
--infobox "Installing firmware. This may take a moment." 0 0
# Install each of the selected firmware packages
for fw in ${selected}; do
# We install one at a time in case one is not avail.
# pkg-install.8 needs an option to skip unavail.
ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg install -qy ${fw}
done
# end
+2 -1
View File
@@ -55,7 +55,8 @@ country_set()
"$WLAN_IFACE" "$ifconfig_args"
error_str="${error_str#ifconfig: }"
# Restart wpa_supplicant(8) (should not fail).
[ "$iface_up" ] && f_eval_catch -d wlanconfig wpa_supplicant \
[ "$iface_up" ] && ifconfig "$WLAN_IFACE" up && \
f_eval_catch -d wlanconfig wpa_supplicant \
'wpa_supplicant -B -i "%s" -c "%s/wpa_supplicant.conf"' \
"$WLAN_IFACE" "$BSDINSTALL_TMPETC"
if [ "$error_str" ]; then
Regular → Executable
+33 -15
View File
@@ -38,7 +38,8 @@ Supported subsystems
pci
Options:
-n -- Do not install package, only print the results
-n -- Do not install packages, only print the results
-q -- Quiet mode. If used with -n only prints a package a line
-v -- More verbose
EOF
exit 1
@@ -75,22 +76,27 @@ addpkg()
}
DRY_RUN=n
QUIET=n
VERBOSE=n
while [ $# -gt 0 ]; do
case $1 in
-n)
DRY_RUN=y
;;
-v)
VERBOSE=y
;;
*)
subsystems="${subsystems} $1"
;;
while getopts ":nqv" _arg; do
case ${_arg} in
n)
DRY_RUN=y
;;
q)
QUIET=y
;;
v)
VERBOSE=y
;;
?)
usage
;;
esac
shift
done
shift $(($OPTIND - 1))
subsystems="$@"
# Default searching PCI subsystem
if [ -z "${subsystems}" ]; then
@@ -112,13 +118,25 @@ done
case "${packages}" in
""|^[[:space:]]*$)
echo "No firmware packages to install."
if [ "${QUIET}" != "y" ]; then
echo "No firmware packages to install."
fi
exit 0
;;
esac
echo "Needed firmware packages: '${packages}'"
if [ "${QUIET}" != "y" ]; then
echo "Needed firmware packages: '${packages}'"
fi
if [ "${DRY_RUN}" = "y" ]; then
if [ "${QUIET}" = "y" ]; then
for pkg in ${packages}; do
case "${pkg}" in
""|^[[:space:]]*$) continue ;;
esac
echo "${pkg}"
done
fi
exit 0
fi
+4 -2
View File
@@ -1038,8 +1038,10 @@ badopt:
warnx("argument to -b must be duration.pitch or [quiet.]visual|normal|off");
return;
}
if (pitch != 0)
pitch = 1193182 / pitch; /* in Hz */
if (!is_vt4()) {
if (pitch != 0)
pitch = 1193182 / pitch; /* in Hz */
}
duration /= 10; /* in 10 m sec */
}
+1 -1
View File
@@ -28,7 +28,7 @@
# SUCH DAMAGE.
#
MAKEFS="makefs -t zfs -o verify-txgs=true -o nowarn=true"
MAKEFS="makefs -t zfs -o verify-txgs=true"
ZFS_POOL_NAME="makefstest$$"
TEST_ZFS_POOL_NAME="$TMPDIR/poolname"
+1 -7
View File
@@ -94,7 +94,7 @@ zfs_prep_opts(fsinfo_t *fsopts)
{ '\0', "verify-txgs", &zfs->verify_txgs, OPT_BOOL,
0, 0, "Make OpenZFS verify data upon import" },
{ '\0', "nowarn", &zfs->nowarn, OPT_BOOL,
0, 0, "Suppress warning about experimental ZFS support" },
0, 0, "Provided for backwards compatibility, ignored" },
{ .name = NULL }
};
@@ -792,12 +792,6 @@ zfs_makefs(const char *image, const char *dir, fsnode *root, fsinfo_t *fsopts)
zfs_check_opts(fsopts);
if (!zfs->nowarn) {
fprintf(stderr,
"ZFS support is currently considered experimental. "
"Do not use it for anything critical.\n");
}
dirfd = open(dir, O_DIRECTORY | O_RDONLY);
if (dirfd < 0)
err(1, "open(%s)", dir);
+1 -1
View File
@@ -74,7 +74,7 @@ typedef struct {
*/
char filebuf[MAXBLOCKSIZE] __aligned(alignof(uint64_t));
bool nowarn;
bool nowarn; /* ignored */
/* Pool parameters. */
const char *poolname;
+4 -5
View File
@@ -125,7 +125,6 @@
static pid_t pid;
static int32_t thiszone; /* time difference with gmt */
static int s = -1;
static int repeat = 0;
static char host_buf[NI_MAXHOST]; /* getnameinfo() */
static char ifix_buf[IFNAMSIZ]; /* if_indextoname() */
@@ -252,8 +251,8 @@ main(int argc, char **argv)
/*NOTREACHED*/
}
mode = 'a';
repeat = atoi(optarg);
if (repeat < 0) {
opts.repeat = atoi(optarg);
if (opts.repeat < 0) {
usage();
/*NOTREACHED*/
}
@@ -823,10 +822,10 @@ again:
if (buf != NULL)
free(buf);
if (repeat) {
if (opts.repeat) {
xo_emit("\n");
xo_flush();
sleep(repeat);
sleep(opts.repeat);
goto again;
}
+1
View File
@@ -10,6 +10,7 @@ struct ndp_opts {
bool tflag;
int flags;
time_t expire_time;
int repeat;
};
extern struct ndp_opts opts;
+20 -10
View File
@@ -316,12 +316,24 @@ print_entries_nl(uint32_t ifindex, struct sockaddr_in6 *addr, bool cflag)
struct snl_state ss_req = {}, ss_cmd = {};
struct snl_parsed_link_simple link = {};
struct snl_writer nw;
struct nlmsghdr *hdr;
struct ndmsg *ndmsg;
nl_init_socket(&ss_req);
snl_init_writer(&ss_req, &nw);
struct nlmsghdr *hdr = snl_create_msg_request(&nw, RTM_GETNEIGH);
struct ndmsg *ndmsg = snl_reserve_msg_object(&nw, struct ndmsg);
/* Print header */
if (!opts.tflag && !cflag) {
char xobuf[200];
snprintf(xobuf, sizeof(xobuf),
"{T:/%%-%d.%ds} {T:/%%-%d.%ds} {T:/%%%d.%ds} {T:/%%-9.9s} {T:/%%1s} {T:/%%5s}\n",
W_ADDR, W_ADDR, W_LL, W_LL, W_IF, W_IF);
xo_emit(xobuf, "Neighbor", "Linklayer Address", "Netif", "Expire", "S", "Flags");
}
again:
hdr = snl_create_msg_request(&nw, RTM_GETNEIGH);
ndmsg = snl_reserve_msg_object(&nw, struct ndmsg);
if (ndmsg != NULL) {
ndmsg->ndm_family = AF_INET6;
ndmsg->ndm_ifindex = ifindex;
@@ -337,14 +349,6 @@ print_entries_nl(uint32_t ifindex, struct sockaddr_in6 *addr, bool cflag)
int count = 0;
nl_init_socket(&ss_cmd);
/* Print header */
if (!opts.tflag && !cflag) {
char xobuf[200];
snprintf(xobuf, sizeof(xobuf),
"{T:/%%-%d.%ds} {T:/%%-%d.%ds} {T:/%%%d.%ds} {T:/%%-9.9s} {T:/%%1s} {T:/%%5s}\n",
W_ADDR, W_ADDR, W_LL, W_LL, W_IF, W_IF);
xo_emit(xobuf, "Neighbor", "Linklayer Address", "Netif", "Expire", "S", "Flags");
}
xo_open_list("neighbor-cache");
while ((hdr = snl_read_reply_multi(&ss_req, nlmsg_seq, &e)) != NULL) {
@@ -382,6 +386,12 @@ print_entries_nl(uint32_t ifindex, struct sockaddr_in6 *addr, bool cflag)
count++;
snl_clear_lb(&ss_req);
}
if (opts.repeat) {
xo_emit("\n");
xo_flush();
sleep(opts.repeat);
goto again;
}
xo_close_list("neighbor-cache");
snl_free(&ss_req);