Commit graph

289110 commits

Author SHA1 Message Date
John Baldwin 0b60d7a600 ofw_pcib: Use bus_generic_rman_*
- Implement bus_map/unmap_resource pulling bits from the previous
  ofw_pcib_activate/deactivate_resource.  One difference here is that
  the bus_unmap_resource implementation uses bus_space_unmap instead
  of pmap_unmapdev as a complement to the existing use of bus_space_map.

- Use bus_generic_rman_* in various routines for memory and I/O port
  resources.

- Use pci_domain_* for PCI_RES_BUS in
  ofw_pcib_activate/deactivate_resource.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D43441
2024-01-23 09:38:09 -08:00
John Baldwin a3d6e0de1c powerpc: Fix bus_space_unmap
Previously it failed to compile since the macro passed too many
arguments to the function.  Fix by adding the bus handle to the
function and adding an implementation that calls pmap_unmapdev.

Reviewed by:	jhibbits
Differential Revision:	https://reviews.freebsd.org/D43440
2024-01-23 09:37:53 -08:00
John Baldwin e5c6dbd576 arm64 thunder: Use bus_generic_rman_* in the pcie_pem driver
- Implement bus_map/unmap_resource pulling bits from the previous
  thunder_pem_activate/deactivate_resource.

- Use bus_generic_rman_* in various routines for memory and I/O port
  resources.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D43439
2024-01-23 09:37:41 -08:00
John Baldwin 4e1d94d997 arm mv_pcib: Use bus_generic_rman_*
- Implement bus_get_rman pulling bits from mv_pcib_alloc_resource.

- Implement bus_map/unmap_resource pulling bits from
  mv_pcib_activate/deactivate_resource.

- Use bus_generic_rman_* to handle memory and I/O resources for
  mv_pcib_alloc/activate/adjust/deactivate/release_resource.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D43438
2024-01-23 09:37:30 -08:00
John Baldwin faeb273e7a arm nexus: Use bus_generic_rman_*
- Implement bus_get_rman pulling bits from nexus_alloc_resource.

- Implement bus_map/unmap_resource pulling bits from
  nexus_activate/deactivate_resource.

- Use bus_generic_rman_* for
  bus_alloc/adjust/activate/deactivate/release_resource except for
  custom interrupt activate/deactivate logic still in
  nexus_activate/deactivate_resource.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D43437
2024-01-23 09:37:13 -08:00
John Baldwin 7b5a5e4eef powerpc nexus: Use bus_generic_rman_*
Reviewed by:	imp, jhibbits
Differential Revision:	https://reviews.freebsd.org/D43436
2024-01-23 09:37:02 -08:00
John Baldwin af081ec6f7 powerpc powermac: Use bus_generic_rman_*
Implement bus_map/unmap_resource and add bus_get_rman for use by
bus_generic_rman_*.

Reviewed by:	imp, jhibbits
Differential Revision:	https://reviews.freebsd.org/D43435
2024-01-23 09:36:49 -08:00
John Baldwin 5a7e717fb7 powerpc mpc85xx: Use bus_generic_rman_*
- Consistently map SYS_RES_IOPORT to SYS_RES_MEMORY for
  bus_activate/deactivate/adjust/release_resource.

- Implement bus_map/unmap_resource.

- Add an implementation of bus_adjust_resource.

Reviewed by:	jhibbits
Differential Revision:	https://reviews.freebsd.org/D43434
2024-01-23 09:36:37 -08:00
John Baldwin d7c16b3334 powerpc psim: Use bus_generic_rman_*
- Split out bits of iobus_activate/deactive_resource to implement
  iobus_map/unmap_resource.

- Use bus_generic_rman_* methods in several bus methods to handle
  memory and I/O port resources.

- Add an implementation of bus_adjust_resource.

Reviewed by:	imp, jhibbits
Differential Revision:	https://reviews.freebsd.org/D43433
2024-01-23 09:36:26 -08:00
John Baldwin 3dd55df982 powerpc ps3bus: Use bus_generic_rman_*
- Split out part of ps3bus_activate_resource into a
  ps3bus_map_resource method.

- Implement ps3bus_unmap_resource via pmap_unmapdev.

- Use bus_generic_rman_* to add bus_adjust_resource,
  bus_deactivate_resource, and bus_release_resource methods.

Reviewed by:	imp, jhibbits
Differential Revision:	https://reviews.freebsd.org/D43432
2024-01-23 09:36:12 -08:00
John Baldwin 9c4effb106 hyperv vmbus_pcib: Use pci_domain_*_bus for PCI_RES_BUS resources
Specifically for bus_activate/adjust/deactivate_bus methods.

Differential Revision:	https://reviews.freebsd.org/D43431
2024-01-23 09:35:58 -08:00
John Baldwin 31e15e531c x86: Use pci_domain_[de]activate_bus for PCI_RES_BUS resources
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D43430
2024-01-23 09:35:47 -08:00
John Baldwin e9eb353b32 pci_host_generic: Use pci_domain_[de]activate_bus for PCI_RES_BUS resources
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D43429
2024-01-23 09:35:36 -08:00
John Baldwin c2d4fef658 acpi_pcib: Use pci_domain_[de]activate_bus for PCI_RES_BUS resources
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D43428
2024-01-23 09:35:22 -08:00
John Baldwin 23e3b83ab6 pcib: Add helper routines for [de]activating PCI_RES_BUS resources
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D43427
2024-01-23 09:35:08 -08:00
Mark Johnston 5f086566e0 bhyve: Prepare to add arm64 support to the gdb stub
In particular:
- Stop assuming that the breakpoint size is one byte.
- Avoid referencing the "rip" field in machine-independent code, use a
  helper.

No functional change intended.

Reviewed by:	corvink, jhb
MFC after:	1 week
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D43483
2024-01-23 11:41:13 -05:00
Mark Johnston 5e728af444 bhyve: Simplify register definitions a bit
It's awkward to have separate tables for information which is logically
connected.  Merge the gdb_regset[] and gdb_regsize[] arrays and update
gdb_read_regs() to cope with the result.  This makes the addition of
arm64 support a bit cleaner.

No functional change intended.

Reviewed by:	corvink, jhb
MFC after:	1 week
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D43481
2024-01-23 11:40:52 -05:00
Mark Johnston cfa2c78aee bhyve: Avoid underflows when handling remote commands
Reviewed by:	corvink, jhb
MFC after:	1 week
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D43480
2024-01-23 11:40:40 -05:00
Igor Ostapenko 380b7eb309 sysctl.8: fix format typo
Signed-off-by: Igor Ostapenko <pm@igoro.pro>
2024-01-23 16:40:14 +01:00
Christos Margiolis 9f550134a4 acpiconf: remove trailing space in "Mesurement Accuracy" output
No functional change intended.

MFC after: 1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D43561
2024-01-23 17:39:40 +02:00
Dag-Erling Smørgrav 7edbf69b79 stand: Add 1440p to the list of known resolutions.
MFC after:	1 week
Reviewed by:	manu, kevans, imp
Differential Revision:	https://reviews.freebsd.org/D43391
2024-01-23 15:20:27 +01:00
Elliott Mitchell a8b2189c90 arm/mpic: remove empty pic_init_secondary() hook
The default hook does nothing, so having an empty handler is pointless.
Simple cleanup.

Reviewed by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D40475
2024-01-23 02:52:37 +00:00
Ed Maste 3f4f82c0d7 bsdlabel: limit to 8 partitions
bsdlabel is intended to support up to 20 partitions, but the disklabel
struct has a d_partitions array with only BSD_NPARTS_MIN (8) entries.
Previously, an attempt to operate on a bsdlabel with more than eight
partitions resulted in a buffer overflow.

As a stopgap limit bsdlabel to 8 partitions until this is fixed
properly.

PR:		276517
2024-01-22 21:17:23 -05:00
Brian Behlendorf 435b173fd9
ZTS: Apply zfs_bclone_enabled to bclone tests
If block cloning is disabled by default then enable it when running
the bclone tests.  Follow up to #15529.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #15796
2024-01-22 16:14:08 -08:00
Gordon Bergling e125371fb6 dwc: Fix two typos in a source code comment
- s/recevied/received/
- s/descriptr/descriptor/

MFC after:	3 days
2024-01-22 22:03:29 +01:00
Gordon Bergling ad92f3d9d0 meta2deps.py: Fix a typo in a source code comment
- s/follwing/following/

MFC after:	3 days
2024-01-22 22:00:36 +01:00
Gordon Bergling 97a4045aaf virtio(4): Fix a typo in a source code comment
- s/recevied/received/

MFC after:	3 days
2024-01-22 21:59:06 +01:00
Gordon Bergling d743711016 usb: Fix a typo in a source code comment
- s/recevied/received/

MFC after:	3 days
2024-01-22 21:57:06 +01:00
Gordon Bergling b2c48aa4d1 vmd(4): Fix typos in source code comments
- s/harwdare/hardware/

MFC after:	3 days
2024-01-22 21:55:33 +01:00
Gordon Bergling c1ada39783 net80211: Fix a typo in a source code comment
- s/recevied/received/

MFC after:	3 days
2024-01-22 21:54:36 +01:00
Gordon Bergling ab6d773dbf rtsock: Fix a typo in a source code comment
- s/adddress/address/

MFC after:	3 days
2024-01-22 21:53:21 +01:00
Gordon Bergling c90f1ed104 netlink(4): Fix a typo in a source code comment
- s/permament/permanent/

MFC after:	3 days
2024-01-22 21:52:16 +01:00
Gordon Bergling cde9ec6a45 netpfil: Fix a typo in a source code comment
- s/strucutre/structure/

MFC after:	3 days
2024-01-22 21:50:57 +01:00
Gordon Bergling 9b035689f1 tcp_fastopen: Fix a typo in a source code comment
- s/posession/possession/

MFC after:	3 days
2024-01-22 21:49:47 +01:00
Gordon Bergling 496432f192 netinet6: Fix two typos in source code comments
- s/adddress/address/

MFC after:	3 days
2024-01-22 21:48:34 +01:00
Gordon Bergling b971c51a4d aic7xxx: Fix two typos in source code comments
- s/recevied/received/

MFC after:	3 days
2024-01-22 21:47:23 +01:00
Gordon Bergling d04df66477 bootpd(8): Fix a typo in a source code comment
- s/adddress/address/

MFC after:	3 days
2024-01-22 21:46:31 +01:00
Gleb Smirnoff 7f3184ba79 tcp: remove outdated comment
This paragraph should have been removed in 446ccdd08e.
2024-01-22 12:42:21 -08:00
Kristof Provost 63a5fe8343 pflow: limit to no more than 128 flow exporters
While there are no inherent limits to the number of exporters we're
likely to scale rather badly to very large numbers. There's also no
obvious use case for more than a handful. Limit to 128 exporters to
prevent foot-shooting.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2024-01-22 18:02:10 +01:00
Kristof Provost 484e977f24 pflow: observation domain is an unsigned integer
Ensure we print it as such, rather than as a signed integer, as that
would lead to confusion.

Reported by:	Jim Pingle <jimp@netgate.com>
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2024-01-22 18:02:10 +01:00
Piotr Pawel Stefaniak 8297ff13fb tcp_wrappers: silence a few warnings
Mostly -Wdeprecated-non-prototype.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D43531
2024-01-22 17:23:49 +01:00
Aaron LI 43be2d7aaf wg: detach bpf upon destroy as well
bpfattach() is called in wg_clone_create(), but the bpfdetach() is
missing from wg_close_destroy().  Add the missing bpfdetach() to avoid
leaking both the associated bpf bits as well as the ifnet that bpf will
hold a reference to.

PR:		276526
MFC after:	3 days
2024-01-22 10:22:44 -06:00
Cy Schubert c19fb1f963 sqlite3: Vendor import of sqlite3 3.45.0
Release notes at https://www.sqlite.org/releaselog/3_45_0.html

Obtained from:  https://www.sqlite.org/2024/sqlite-autoconf-3450000.tar.gz

MFC after:	2 weeks
Merge commit 'cdad538768db9e2c8258d19e9282fb5aaae80e46'
2024-01-22 07:35:06 -08:00
Cy Schubert cdad538768 sqlite3: Vendor import of sqlite3 3.45.0
Release notes at https://www.sqlite.org/releaselog/3_45_0.html

Obtained from:  https://www.sqlite.org/2024/sqlite-autoconf-3450000.tar.gz
2024-01-22 07:10:03 -08:00
Kristof Provost 57c50d6b36 pf tests: test ICMP6 packet too big with binat
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D43500
2024-01-22 13:49:56 +01:00
Kristof Provost 54c62e3e5d pf: work around icmp6 packet-too-big not being sent when binat-ing
If we're applying NPTv6 we pass a packet with a modified source and/or
destination address to the network stack.

If that packet then turns out to be larger than the MTU of the sending
interface the stack will attempt to generate an icmp6 packet-too-big
error, but may fail to look up the appropriate source address for that
error message. Even if it does, pf would still have to undo the binat
operation inside the icmp6 packet so the sending host can make sense of
the error.

We can avoid both problems entirely by having pf also perform the MTU
check (taking the potential refragmentation into account), and
generating the icmp6 error directly in pf.

See also:	https://redmine.pfsense.org/issues/14290
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D43499
2024-01-22 12:52:14 +01:00
Christos Margiolis f7d3d0a4de sound: use device_set_descf() to set device descriptions
Commit 6b6914c1e2 introduced a printf-like version of
device_set_desc(), so use it to simplify device description setting in
the audio stack.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Reviewed by:	dev_submerge.ch, markj
Differential Revision:	https://reviews.freebsd.org/D43467
2024-01-22 11:44:51 +02:00
Alexander Ziaee c8bf9f09ee newfs_msdos.8: example for specific cluster size
The usual use case in 2024 for newfs_msdosfs is creating filesystems on SD cards
for older hardware. In most tutorials, they call the cluster size "allocation
size". Therefore, add a small note next to cluster size that it is also called
allocation size, and add an example for how to do this.

Reviewed by:	jhb
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1045
2024-01-21 21:39:16 -08:00
Lexi Winter 4261507a5e netlink.h: s/typeof/__typeof
typeof() does not exist in -std=c99 mode and the relevant #define is
only for _KERNEL, so use __typeof here instead.

Reviewed by:	jhb
MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1070
2024-01-21 18:15:14 -08:00
Ricardo Branco e4b646ce16 find: Add -readable, -writable & -executable options
Reviewed by:	jhb, Mina Galić
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1080
2024-01-21 17:33:46 -08:00