Commit Graph

20029 Commits

Author SHA1 Message Date
Emmanuel Vadot
d198b8774d fwget: Introduce new utility
This script's goal is to check the system for peripherals that needs
firmware and install the needed packages for them.
For now it only support pci subsystem and only video classes for AMD
and Intel GPUs.

Reviewed by:	bapt
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D39825
2023-05-01 08:32:59 +02:00
Poul-Henning Kamp
e0e5bf4d62 freebsd-update: Mention 13.2-RELEASE in usage. 2023-04-30 05:06:56 +00:00
Vitaliy Gusev
8371bbdadb
bhyve: enable capsicum for snapshot code
Reviewed by:		corvink
Sponsored by:		vStack
Differential Revision:	https://reviews.freebsd.org/D38860
2023-04-28 09:02:51 +02:00
Vitaliy Gusev
18126b647a
bhyve: use directory file descriptor for checkpoint
This is required to enable capsicum for the snapshot code.

Reviewed by:		corvink
Sponsored by:		vStack
Differential Revision:	https://reviews.freebsd.org/D38858
2023-04-28 09:00:48 +02:00
Konstantin Belousov
cae85a647a efiwake(8): style
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2023-04-28 06:08:09 +03:00
Johannes Totz
1808b5577d Add efiwake tool
Reviewed by:	kib
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D36714
2023-04-28 04:28:51 +03:00
Yuri Pankov
08ed87514f tzsetup: appease checkstyle9 2023-04-27 20:29:55 +02:00
Yuri Pankov
cfd0217aa9 tzsetup: adopt zone1970.tab changes
- assumption that single-zone countries do not have description
  is no longer correct; do not try to optimize this case as it's
  only going to make the code more confusing and we now have menus
  with a single zone selection because of this
- remove the single-country continent short cut, it also only serves
  to confuse users as we now have such a continent
- instead add a single-zone contry short cut (see above), now all
  single-zone countries fall here
- use the #@ continent overrides that zone1970.tab introduces (this is
  visible at least fixing Iceland being currently listed under Africa)
- add Arctic Ocean "continent" coming only from the overrides at the
  moment
- update baseline with the changes

Reviewed by:	bapt, philip
Differential Revision:	https://reviews.freebsd.org/D39606
2023-04-27 19:31:48 +02:00
Guido Falsi
014e03411f bhyve: Add DEBUG_HDA_FILE define to specify location of debug output
Reviewed by:		corvink
Approved by:		corvink
Differential Revision:	https://reviews.freebsd.org/D39826
2023-04-27 15:12:55 +02:00
Guido Falsi
03d3124629 bhyve: Disable bhyve HDA debug by default.
Adapt hda_print_cmd_ctl_data() to not generate compiler warnings
when DEBUG_HDA is off.

Reviewed by:		corvink
Approved by:		corvink
Differential Revision:	https://reviews.freebsd.org/D39826
2023-04-27 15:12:45 +02:00
John Baldwin
2d7842d0bf arp/ndp: Use valid prototypes for function declarations with no arguments. 2023-04-26 13:18:53 -07:00
Alexander V. Chernikov
52199877a6 arp: report successful deletion via netlink to mimic rtsock. 2023-04-26 13:26:37 +00:00
Yuri Pankov
989a0e1d81 tzsetup: fix bootstrapping for github CI jobs
Move dump_zonetab() under HAVE_BSDDIALOG as the parsing code
it relies on already is.
2023-04-26 14:29:08 +02:00
Peter Jeremy
b9600db494
prometheus_sysctl_exporter: Replace magic numbers with identifiers.
Identifiers make it clearer what is going on and makes it easier to
find consumers of sysctl functionality.

No functional change.

MFC after:	3 days
Reviewed by:	asomers
Differential Revision:	https://reviews.freebsd.org/D39797
2023-04-26 18:29:33 +10:00
Corvin Köhne
16f23f7543
bhyve: pass E820 table to guest
E820 table will be used to report valid RAM ranges and reserve special
memory areas like graphics memory for GPU passthrough.

Reviewed by:		markj
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D39550
2023-04-26 09:58:37 +02:00
Corvin Köhne
a8a8e9af57
bhyve: add E820 dump function
For debugging purposes it is helpful to dump the E820 table.

Reviewed by:		markj
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D39549
2023-04-26 09:58:35 +02:00
Corvin Köhne
5597f56487
bhyve: add allocation function to E820
This function makes it easy to allocate new E820 entries. It will be
used to allocate graphics memory for Intel integrated graphic devices.

Reviewed by:		markj
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D39547
2023-04-26 09:58:34 +02:00
Corvin Köhne
059af92a30
bhyve: add common memory holes to E820 table
The VGA and the ROM memory ranges can't be used as system memory. For
that reason, remove them from the E820 table.

Reviewed by:		markj
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D39546
2023-04-26 09:58:31 +02:00
Corvin Köhne
9180daa1e3
bhyve: add basic E820 implementation
There are some use cases where bhyve has to prepare some special memory
regions. E.g. GPU passthrough for Intel integrated graphic devices needs
to reserve some memory for the graphic device. So, bhyve has to inform
the guest about those memory regions. This information can be passed by
the qemu fwcfg interface. As qemu creates an E820 table, we can reuse
the existing fwcfg item "etc/e820".

This commit is the first one of a series. It only adds a basic
implementation for the creation of the E820 table. Some subsequent
commits will add more items to the E820 table and register it as fwcfg
item.

Reviewed by:		markj
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D39545
2023-04-26 09:58:27 +02:00
Alexander V. Chernikov
7825619a9e ndp: fix signed/unsigned compariosn in the netlink code. 2023-04-25 14:55:56 +00:00
Alexander V. Chernikov
91fbe0819b ndp: convert ndp(8) to netlink.
The change is intended to be fully transparent to the users.
Similarly to route(8) and netstat(8), ndp can be build without
  netlink by defining WITHOUT_NETLINK in make.conf.

 Differential Revision:  https://reviews.freebsd.org/D39720
2023-04-25 12:30:39 +00:00
Alexander V. Chernikov
35e7180a32 arp: remove forgotten debug message. 2023-04-25 12:29:34 +00:00
Alexander V. Chernikov
6ad73dbf65 arp: convert arp(8) to netlink.
The change is intended to be fully transparent to the users.
Similarly to route(8) and netstat(8), arp can be build without
 netlink by defining WITHOUT_NETLINK in make.conf.

Differential Revision:	https://reviews.freebsd.org/D39720
2023-04-25 11:26:22 +00:00
Corvin Köhne
7959d80d99
bhyve: make use of qemus acpi table loader
Add all acpi tables to qemus acpi table loader. This passes the acpi
tables by fwcfg to the guest.

Reviewed by:		markj
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38439
2023-04-25 08:29:29 +02:00
Corvin Köhne
f565b4d630
bhyve: add helper struct for qemus acpi table loader
The hypervisor is aware of all system properties. For the guest bios
it's hard and complex to detect all system properties. For that reason,
it would be better if the hypervisor creates acpi tables instead of the
guest. Therefore, the hypervisor has to send the acpi tables to the
guest. At the moment, bhyve just copies the acpi tables into the guest
memory. This approach has some restrictions. You have to keep sure that
the guest doesn't overwrite them accidentally. Additionally, the size of
acpi tables is limited.

Providing a plain copy of all acpi tables by fwcfg isn't possible. Acpi
tables have to point to each other. So, if the guest copies the acpi
tables into memory by it's own, it has to patch the tables. Due to
different layouts for different acpi tables, there's no generic way to
do that.  For that reason, qemu created a table loader interface. It
contains commands for the guest for loading specific blobs into guest
memory and patching those blobs.

This commit adds a qemu_loader class which handles the creation of qemu
loader commands. At the moment, the WRITE_POINTER command isn't
implement. It won't be required by bhyve's acpi table generation yet.

Reviewed by:		markj
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38438
2023-04-25 08:29:25 +02:00
John Baldwin
672eba2435 ppp: Use valid prototypes for function declarations with no arguments.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39730
2023-04-24 08:53:49 -07:00
John Baldwin
4b75b42ddb ndp: Use valid prototypes for function declarations with no arguments.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39729
2023-04-24 08:53:49 -07:00
John Baldwin
bd22d268d3 rpc.umntall: Use valid prototype for function declaration with no arguments.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39728
2023-04-24 08:53:49 -07:00
John Baldwin
7b043ce598 rpc.lockd: Use valid prototypes for function declarations with no arguments.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39727
2023-04-24 08:53:49 -07:00
Val Packett
b344bd3a7d ext2fs: extract crc16 into sys/crc16.h
deduplicate this as it might be needed for other drivers (e.g. Apple SPI-HID)

Sponsored by:	https://www.patreon.com/valpackett
Reviewed by:	chuck, imp
MFC after:	1 month
Differential revision:	https://reviews.freebsd.org/D32879
2023-04-24 12:41:52 +03:00
Yuri Pankov
336c4682b6 tzsetup: add baseline file to control parsed zonetab contents
Introduce undocumented option -d to dump parsed zonetab file contents
and add a "baseline" target along with instructions on updating it.

Reviewed by:	philip
Differential Revision:	https://reviews.freebsd.org/D39634
2023-04-23 10:32:02 +02:00
Colin Percival
df53ae0fdd Remove portsnap(8)
Rather than having a tool in the FreeBSD base system for obtaining
the FreeBSD ports tree, users are encouraged to `pkg install git`
and then `git clone https://git.FreeBSD.org/ports.git /usr/ports`.

The portsnap servers will continue operating until FreeBSD 13 reaches
its End-of-Life, and portsnap is available from the ports tree as
ports-mgmt/portsnap.

Requested by:	portmgr
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D39563
X-MFC:		no
2023-04-22 18:12:37 -07:00
Simon J. Gerraty
188bf8876f Build host tools on non-FreeBSD host with DIRDEPS_BUILD
Add Makefile.depend.options to libnetbsd, mkimg and makefs
to ensure libegacy is build if needed.

targets/pseudo/stage/Makefile avoid the need for mtree
the staging process creates target dirs as needed anyway.

Reviewed by:	stevek
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D39757
2023-04-22 13:13:22 -07:00
Rick Macklem
33906122e1 nfsuserd.c: Replace slave with server 2023-04-22 08:18:02 -07:00
Simon J. Gerraty
0c3627f44d bsdinstall avoid subdir depending on parent
When not doing tree walks, it is bad for sub-dirs to depend on
parents.  Move the generation of opt_osname.h to distextract
and have others that need that depend on it.

In usr.sbin/bsdinstall use SUBDIR_DEPEND_ so tree walking still works.

Reviewed by:	obrien
Differential Revision:	https://reviews.freebsd.org/D39742
2023-04-20 22:00:40 -07:00
Ed Maste
dd9059b3e9 makefs: set cd9660 Rock Ridge timestamps for . and ..
DOT and DOTDOT entries have special handling, and previously only Rock
Ridge PX (POSIX attributes) entries were attached.  Add TF (timestamp)
entries as well.

PR:		203531
Reported by:	Thomas Schmitt <scdbackup@gmx.net>
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39662
2023-04-20 12:20:56 -04:00
Yuri Pankov
4fee5114c3 tzsetup(8): update paths to zone tab and tzdata source
tzsetup now uses zone1970.tab and zoneinfo source is located in
contrib/tzdata, update the man page accordingly.

While here, drop obsolete Tn macros and insert vertical breaks (mostly
before Dl in examples) to improve readability.

Reviewed by:	pauamma_gundo.com (manpages)
Differential Revision:	https://reviews.freebsd.org/D39643
2023-04-19 13:56:58 +02:00
Simon J. Gerraty
d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
John Baldwin
35a624c549 keyserv: Use C89 function definitions.
Also use more accurate function pointer types, and trim some duplicate
(but incomplete) function prototypes.

Reviewed by:	zlei
Differential Revision:	https://reviews.freebsd.org/D39533
2023-04-18 11:30:51 -07:00
John Baldwin
69b5038738 yp: Use more accurate function pointer types.
Trim a few duplicate (but incomplete) function prototypes as well.

Reviewed by:	zlei, imp
Differential Revision:	https://reviews.freebsd.org/D39532
2023-04-18 11:28:57 -07:00
John Baldwin
2541accb79 rpc.lockd: Use C89 function definitions.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39530
2023-04-18 11:28:24 -07:00
John Baldwin
e93f27e3ae cron: Use C89 function definitions.
Reviewed by:	zlei
Differential Revision:	https://reviews.freebsd.org/D39529
2023-04-18 11:28:07 -07:00
John Baldwin
525438ea71 sendmail: Silence -Wdeprecated-non-prototype warnings.
These will hopefully be fixed upstream eventually, but silence the
warnings until then.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39518
2023-04-18 11:19:48 -07:00
Ed Maste
79ead08497 makefs: remove unused variable
Reported by:	Clang
Sponsored by:	The FreeBSD Foundation
2023-04-17 08:22:12 -04:00
Ed Maste
10854bf517 makefs: use unsigned and %u for rock_ridge_move_count
For diff reduction against NetBSD's makefs.  Based on NetBSD git mirror
commit 00991aee8248.

With this change our makefs cd9660 support should be in sync up to
NetBSD commit bdae6c9dc792 ("makefs(8): Nix trailing whitespace.").

Sponsored by:	The FreeBSD Foundation
2023-04-17 08:21:28 -04:00
Ed Maste
e5551216d8 makefs: call brelse from bread
This matches NetBSD and rationalizes makefs with the kernel API.

This reverts commit 370e009188.

Reviewed by:	mckusick
Sponsored by:	The FreeBSD Foundation
Obtained from:	NetBSD 0a62dad69f62, 0c4125e1a19f, cb6a5a3575fd
Differential Revision:	https://reviews.freebsd.org/D39070
2023-04-16 15:45:17 -04:00
Ed Maste
c753f49f70 makefs: remove unused cd9660 options
Makefs defined "follow-symlinks" and "help" options, but they did
nothing.  Remove them.

Obtained from:	OpenBSD a8f1645688c2
Sponsored by:	The FreeBSD Foundation
2023-04-16 09:38:02 -04:00
Ihor Antonov
8935a39932 daemon: use kqueue for all events
Refactor daemon to use kqueue/kevent instead of signals.

This changes allows to simplify the code in several ways:
- the execution flow is now linear, no async events.
- several variables became redundant and got removed.
- all event handling is now concentrated inside of the event loop, which
  makes code reading and comprehension easier.
- new kqueuex(2) call is used for CLOEXEC, but maintained closing the
  kq fd prior to execve() to ease later MFC

No UX/API changes are intended.

Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/701
2023-04-14 00:12:21 -05:00
Corvin Köhne
158adced65
bhyve: save softc of ACPI devices
This will be useful for writing device specific ACPI tables or DSDT
methods.

Reviewed by:		markj
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D39322
2023-04-13 08:00:09 +02:00
Corvin Köhne
305edaa479
bhyve: add QEMU_FWCFG_INDEX_MAX_CPUS item
Requested-by:		coreboot
Reviewed by:		<If someone else reviewed your modification.>
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D39315
2023-04-12 09:35:33 +02:00