5992 Commits
Author SHA1 Message Date
Enji Cooper acc5475119 clk: add config(5) entry for rk_clk_mmc.c
This is needed in order to unbreak the build on armv7.

Reported by:	Jenkins
Fixes:		e32b082ba2 ("clk: rockchip: Add the MMC phase clock")
2026-10-31 17:57:19 -07:00
Kevin Bowling 4bcd10f7c0 tpm: Harvest entropy from TPM 1.2 devices
The TPM 2.0 driver periodically contributes TPM-generated random bytes
to the kernel entropy pool, but the TPM 1.2 driver does not.

Issue TPM_GetRandom every ten seconds and submit successful responses
as RANDOM_PURE_TPM.  Keep each exchange under the TPM transaction lock.
Defer harvesting while the character device is open or a command is
pending so the task cannot consume a user response.  Drain the task for
suspend and detach, rearming it after resume or a failed suspend.

Document the expanded scope of RANDOM_ENABLE_TPM and update the kernel
configuration comments that described it as TPM 2.0-only.

Validated on a STMicroelectronics TPM 1.2 TIS device.  DTrace observed
periodic entropy submissions; a raw GetRandom response remained intact
while the device was held open across a harvest interval; and module
unload/reload deregistered and restored the entropy source cleanly.

Tested by:	zarychtam_plan-b.pwste.edu.pl
MFC after:	2 weeks
Sponsored by:	BBOX.io
Differential Revision:	https://reviews.freebsd.org/D59239
2026-10-30 15:24:16 -07:00
Konstantin Belousov f69d974bf6 sys: centralize SV_* flags definitions for several FreeBSD ABIs
The omitted ABI is compat32 on arm64, which lacks SV_ASLR.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2026-10-20 23:55:16 +03:00
Konstantin Belousov 43c79c64af machine/floatingpoing.h: harmonize all arches
Reported by:	fluffy
Reviewed by:	jhibbits (previous version)
Discussed with:	imp
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D60255
2026-10-16 19:27:39 +03:00
Piotr Kubaj 9d50245a0f machine/ieeefp.h: include <sys/cdefs.h>
The <machine/ieeefp.h> headers wrap their deprecated FPU control
prototypes in __BEGIN_DECLS/__END_DECLS but rely on the includer to
have pulled in <sys/cdefs.h>.  Including <floatingpoint.h> first on
arm, arm64, powerpc and riscv (or amd64 <machine/ieeefp.h> with
__IEEEFP_NOINLINES__) fails with "unknown type name '__BEGIN_DECLS'".
This breaks e.g. devel/py-pyinstaller.

Suggested by:	jhb
Reviewed by:	jhb
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D59659
2026-10-14 18:06:42 +02:00
Mark Johnston 3545fc68f4 sound: Check for errors from sndbuf_resize()
Most implementations of CHANNEL_SETBLOCKSIZE and CHANNEL_SETFRAGMENTS
were not checking this.  This is probably not a big problem: it's
unlikely for sndbuf_resize() to fail due to the refcount check in this
case since it's operating on the hardware buffer, which doesn't get
mmaped.  But, I will add more reasons for it to fail in the next patch,
so let's be more careful.

This change modifies various CHANNEL_SETBLOCKSIZE implementations to
check for errors.  In some cases I reordered things to avoid updating
driver state until after sndbuf_resize() succeeds.

Return 0 from CHANNEL_SETBLOCKSIZE to indicate an error, as it otherwise
returns the new block size.  We could change the interface to return
both an error number and a block size, but that would break at least one
out-of-tree driver and I wish to avoid that here.  Make sure that errors
from CHANNEL_SETFRAGMENTS and CHANNEL_SETBLOCKSIZE are returned to
userspace.

Approved by:	so
Security:	FreeBSD-SA-26:71.sound
Reviewed by:	christos
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D60553
2026-10-14 16:00:47 +00:00
Olivier Certner 42490d5cd2 sched: New scheduler interface definition scheme
Define the scheduler interface once and for all (in 'sys/sys/sched.h')
and remove all code duplication related to it (function signatures, slot
names, dispatch, scheduler instance declaration), making it easier to
modify the interface or to add new schedulers.

This is implemented by defining the interface as X macros, which are
passed a macro (and additional arguments for it) that is "called" with
a variable number of arguments describing a single function of the
interface.  The convention used for a function's parameters is that each
parameter is represented with two macro arguments, the first one being
the type and the second one being the name.  Helper macros allow to
process arguments described in this convention in order to generate
a list of arguments for function definitions (currently, up to
4 function parameters).  The chosen convention eliminates the need for
any specific declaration of functions depending on their number of
arguments.

DECLARE_SCHEDULER() has been changed to automatically declare and fill
a 'struct sched_instance' structure.  Its number of parameters has been
reduced to the minimum, and the symbol part used to produce distinct
structure names can now start with a digit (useful for 4BSD).

The new implementation has the following additional benefits:
1. The name of implementations for the interface functions is imposed
   (same name as the interface function but with the scheduler symbol
   that was passed to DECLARE_SCHEDULER() added just after the 'sched_'
   prefix, e.g., for ULE, 'sched_ule_*()') and checked at compile-time.
2. Missing functions in an implementation are detected at compile-time
   (and not at runtime with a NULL dereference).
3. Failures to fill correctly the 'struct sched_instance' object
   associated to an implementation are eliminated.

Preserve comments/categories of interface functions by moving comments
that were in the old explicit interface declarations to the SCHED_ITF*()
macros, and while here, marginally improve some (and move the common
documentation for sched_initticks() from the implementations to the
interface).  Several of them are not exact, but this will be fixed in
a separate commit.

Make the active scheduler instance object internal, as it is not used
outside of the shim implementation and one of the purposes of the
interface is also to hide the actual implementation.  If the need
arises, it would be easy to add scheduler-specific routines as new
fields in 'struct sched_instance' and to extend the machinery to
automatically assign routines returning EOPNOTSUPP to these fields, and
then to provide a macro to register non-trivial implementation, instead
of making the current instance object visible again.

Additionally, in order to avoid collision with C and C++ keywords:
1. Fields in 'struct sched_instance' are now suffixed with '_impl', so
   that, e.g., 'switch()' does not require special treatment anymore and
   the corresponding implementations can be renamed back to
   `sched_*_switch()`.  This suffix avoids any collision with existing
   C++ keywords as new functions are added to the interface.  (See
   SCHED_ITF_FIELD_NAME().)
2. Actual interface functions' C declarations do not list parameter
   names anymore (sched_class() was causing a problem in C++ with its
   'class' parameter).
allowing to remove the bracketing with '#ifndef __cplusplus'.

Reviewed by:    mchoo, kib
Fixes:          ce38acee8d ("Add kern/sched_shim.c") (+ some followups)
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59988
2026-10-06 15:27:41 +02:00
Olivier Certner ab9fcc5a55 ifuncs: Have DEFINE_*IFUNC() macros expand the passed name
While here, make each <machine/ifunc.h> header include <sys/types.h> so
that it can be included standalone.

Reviewed by:    kib
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60167
2026-10-01 10:23:29 +02:00
Minsoo Choo 4cb357c61c arm: pad minidump page table
libkvm locates the sparse page array after the page-rounded PTE table
size, but the ARM minidump writer emitted only the unrounded size.  When
the table size was not page-aligned, libkvm therefore read every dumped
physical page at the wrong offset.

The mismatch was introduced when libkvm began rounding ptesize.  It has
affected ARM minidumps since ffdeef3234 ("libkvm: Improve physical
address lookup scaling."). It is exposed when the dumped KVA span is not
a multiple of 4 MiB.

Zero-pad the final PTE page and include the padding in the dump size.

Reviewed by:	jhb
Approved by:	jhb (mentor)
Fixes:		ffdeef3234 ("libkvm: Improve physical address lookup scaling.")
MFC after:	2 weeks
Sponsored by:	FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D59716
2026-09-28 11:48:47 -04:00
Michal Meloun e2d42b0e6c ofw: Convert simplebus to device_get_softc_class().
Stop embedding struct simplebus_softc as the first member of subclass
softcs. Use device_get_softc_class() to locate the simplebus portion of
the device softc

MFC after:	2 months
Differential Revision:	https://reviews.freebsd.org/D59837
2026-09-26 10:30:42 +02:00
Dag-Erling Smørgrav 7399be2030 misc: Avoid use of Unicode closing single quote
The Unicode closing single quotation mark is classified as a homoglyph
and can trip automated code quality checks in downstream CI pipelines or
cause code review UIs to refuse to display a file.  If used as an
apostrophe, use the ASCII single quote instead.  If used as a closing
single quote, replace with double quotes or no quotes at all.

Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
Reviewed by:	ziaee, obiwac, olce
Differential Revision:	https://reviews.freebsd.org/D59911
2026-09-23 14:43:13 +02:00
Christos Margiolis 32137c4106 sound: Retire the version constants
They exist only to fill in MODULE_DEPEND() and MODULE_VERSION(), and
every consumer passed the same value for all three, so the version
range never did anything. Use 1, like the rest of the tree does.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Reviewed by:	kib, emaste
Differential Revision:	https://reviews.freebsd.org/D59873
2026-09-22 19:34:16 +02:00
Michal Meloun 4680109c6b ARMADA 8040: Adapt ICU driver to updated device tree. 2026-09-19 10:51:16 +02:00
Christos Margiolis 13fcc9caaf sound: Standardize mixer_init() call order
Device drivers call mixer_init() in a non-standard order - some before
pcm_init(), and some after pcm_register(). However, both approaches are
potentially risky, and logically weak, since pcm_register() is supposed
to be the function that finalizes sound(4) attach.

Standardize the call ordering by moving all mixer_init() calls after
pcm_init(). This is also necessary for a follow-up patch, which expects
pcm_init() to have run first and initialized the PCM lock.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D59069
2026-09-18 21:12:42 +03:00
Sarah Walker 9556306213 arm64: Add ACPI support to GICv5 driver
Add ACPI support to the GICv5 IRS, ITS and IWB drivers. Device parameters are
derived from the MADT and IORT tables.

Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D59171
2026-09-17 10:20:22 +01:00
Alexander Ziaee 32878e64e6 bcm2835_pwm: Fix dev.pwm.0.ratio2 register
A typo in the sysctl for RPI0 PWM channel 2 was causing it to
write to the wrong register, leaving it misconfigured if used.

PR:			298301
MFC after:		3 days (problem reported on 14.4)
Reviewed by:		adrian
Reported by:		Attila Kover <[email protected]>
Differential Revision:	https://reviews.freebsd.org/D59644
2026-09-15 17:01:24 -04:00
Faraz Vahedi 72ed6f9c9d libc: Add WCHAR_WIDTH in <wchar.h> as well
Define __WCHAR_WIDTH in sys/_types.h and derive WCHAR_WIDTH from
that, the same way as WCHAR_MIN and WCHAR_MAX, in both <wchar.h>
and <stdint.h> as per C23 §7.31.1 and §7.22.3.4, respectively.

Reviewed by:	fuz
Approved by:	fuz (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D59385
2026-09-05 14:11:22 +03:30
Benjamin Jacobs 3e6bc5c3b5 sys/arm: Fix DTrace trap hook
Move the dtrace_trap hook at the start of the abort handler to exit
early when a trap is handled by DTrace.

Fix the type argument to be the actual fault type instead of the value
of the FAR. The latter will need to be added to the trapframe, until
then DTrace will report unmapped addresses as the null address.

Correct the comment of the PUSHFRAMEINSVC assembler macro to reflect
that coming from SVC32 mode is expected for DTrace traps.

PR:             298064
MFC after:      1 month
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D59279
2026-09-03 15:05:03 +00:00
Faraz Vahedi ab420c44bc libc: Add PRIb*, PRIB*, and SCNb* macros as per C23
Reviewed by:	fuz
Approved by:	fuz (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D59293
2026-09-02 18:26:58 +03:30
Oskar Holmlund a9fd65d511 TI AM335x: update clock names
Due to upstream has changed to use clock-output-names we need
to update the names in our code aswell.

Approved by: imp(earlier revison), manu(mentor)
Tested by: Rick Richard
Differential revision: https://reviews.freebsd.org/D46713
2026-08-28 19:50:05 +02:00
Oskar Holmlund 541aa93794 TI AM335x: Remove clock_common.*
These helper function will not be needed anymore
because the way that clocks are parsed from the DTS is reworked.

Approved by: imp, manu(mentor)
Tested by: Rick Richard
Differential revision: https://reviews.freebsd.org/D46712
2026-08-28 18:34:55 +02:00
Mark Johnston d70e5b3a73 conf: Add COMPAT_FREEBSD15
Define it everywhere that wants COMPAT_FREEBSD14.

Reviewed by:	imp, kib, emaste
Sponsored by:	OPNsense
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D59017
2026-08-25 18:08:38 +00:00
Dag-Erling Smørgrav 5db5c82fa6 arm: Quote diagnostic message
The C standard does not require diagnostic messages to be quoted, but
some tools get confused by unbalanced quotes such as the apostrophe in
“don't”.  Wrap this message in double quotes to resolve the confusion.

Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
2026-08-25 16:57:45 +02:00
Mark Johnston 97e24b41d2 vchiq: Merge two commits from Linux
6e474d8e3981 ("staging: vchiq_shim: avoid code duplication") refactors
some code which makes applying the subsequent patch easier.

49bec49fd7f2 ("staging: vc04_services: remove vchiq_copy_from_user")
addresses a user-triggerable integer overflow via the
VCHIQ_IOC_QUEUE_MESSAGE ioctl on /dev/vchiq (which has mode 0600 by
default).  It also addresses insufficient validation of user-controlled
addresses in vchiq_copy_from_user().

Update the bcm2835_audio driver to follow the change to
vchi_msg_queue().

Reported by:	Vicki Pfau
Reviewed by:	Abdelkader Boudih <[email protected]>
Tested by:	Abdelkader Boudih <[email protected]>
Tested by:	Marco Devesas Campos <[email protected]>
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D58889
2026-08-21 14:57:31 +00:00
Christos Margiolis f0778a6f9b bcm2835_audio: Remove wrong chn_intr()
chn_trigger() calls bcmchan_trigger() with the channel lock held.
However, bcmchan_trigger() calls chn_intr(), which also tries to lock,
which results in a lock recursion panic. chn_intr() is meant to be
called by the interrupt handler and not inside CHANNEL_TRIGGER()
methods. Remove the call altogether, the bcm2835_worker_play_start()
call that comes after is enough.

Fixes:		69cab2d1bf ("Fix locking in bcm2835_audio driver")
Reported by:	Marco Devesas Campos <[email protected]>
Tested by:	Marco Devesas Campos <[email protected]>
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D59055
2026-08-21 03:47:03 +03:00
Xuqing Yang 95c04b2532 bcm2835_audio: Comment out vchi_service_release()
bcm2835_audio_release() calls vchi_service_close() and then
unconditionally calls vchi_service_release() with the same service
handle.

In the VCHI shim implementation, a successful vchi_service_close() calls
service_free(service). The subsequent vchi_service_release() therefore
dereferences a freed SHIM_SERVICE_T object when it reads
service->handle, resulting in a use-after-free panic.

vchi_service_release(), however, releases a reference which might block
vchi_service_close() from completing successfuly, so comment it out
instead of removing it altogether, until further testing is done.

PR:		297187
MFC after:	2 weeks
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D58921
2026-08-18 23:18:01 +03:00
Mark Johnston 11edc985cd vm: Make sure NULL is defined for vm_memattr_name()
Fixes:	a7e483ee14 ("vm_phys: Add a sysctl to dump registered fictitious memory ranges")
2026-07-19 14:09:46 +00:00
Mark Johnston a7e483ee14 vm_phys: Add a sysctl to dump registered fictitious memory ranges
I've wanted this a couple of times in the past.  Save the memattr in
the fictitious memory segment structure so that we can report it from
the sysctl handler, and add conversion routines for each platform.

Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D58283
2026-07-19 00:29:40 +00:00
Konstantin Belousov 4c41957002 sys: use curthread_pflags_set/restore to manage TDP_DEADLKTREAT for uio
For i386, remove now unused label.
Remove unneeded initialization of the 'save' local.

Reviewed bu:	brooks
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D57726
2026-06-23 17:42:03 +03:00
Brooks Davis fc9b28879e uiomove_*: centralize the copy function selection
Add a uiomove_step() for the central set of switch statements which
choose between userspace and kernel and if data is going to or from the
iovec.

Refactor uiomove_fromphys loops to unconditionally free per-iteration
resources and drop gotos.

While here, switch from bcopy to memcpy.

Reviewed by:	kib
Suggested by:	emaste
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D57688
2026-06-21 17:13:27 +01:00
Brooks Davis 2ee2ef607f pmap: prefer memcpy over bcopy
Alter pmap_copy_page(s) to use memcpy rather than the deprecated bcopy.
We'll be adding non-provenance preserving versions for CHERI support and
would like to avoid introducing variants of deprecated APIs just to
maintain symmetry.

Reviewed by:	kib
Suggested by:	emaste
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D57687
2026-06-21 17:08:12 +01:00
Siva Mahadevan f38cbefef8 GENERIC: enable extended error strings on all archs
This follows commit 3296fda0c3.

PR:		289236
Reviewed by:	kib
MFC after:	3 days
2026-06-16 11:01:32 -04:00
Haoxiang Li 836d0d341a arm/bcm2835: Release mailbox resources on attach failure
Also remove the rid variable since it was unused.

Signed-off-by:	Haoxiang Li <[email protected]>
Reviewed-by:	vexeduxr
Pull-Request:	https://github.com/freebsd/freebsd-src/pull/2255
2026-06-14 19:51:04 +03:00
Haoxiang Li 39217ebb8a arm: allwinner: Fix A10 INTC MMIO resource cleanup
Do not jump to the resource release path when bus_alloc_resource_any()
fails, since no MMIO resource was allocated. If a10_intr_pic_attach()
fails after the MMIO resource has been allocated, release it before
returning.

Signed-off-by:	Haoxiang Li <[email protected]>
Reviewed-by:	vexeduxr
Pull-Request:	https://github.com/freebsd/freebsd-src/pull/2253
2026-06-14 19:51:04 +03:00
Kyle Evans a05af6ddf9 pci: bcm2838: cleanup on attach failure to fix devmatch panic
Specifically on the RPi CM4, we currently don't set the controller up
right and it never moves into the ready state (we don't observe the link
active bit).  Failure to cleanup here actually results in a panic not
long after, due to a use-after-free in the rman bits.  Further down in
pci_host_generic, we have some rman stashed in the softc that are
initialized and placed onto the rman tailq, then the softc is later
freed without an rman_fini() to pull them off of the tailq properly.

Note that PCIe on this board won't come up at boot without something
plugged in, so it currently can't be booted with an empty slot with the
intent to hotplug a supported card.  Some issues with controller startup
have been observed with Broadcom NICs in the wild, but no problems have
been observed with other NICs and a variety of different PCIe cards.

Shout-out to Vince <[email protected]> for the extensive debugging and
analysis to arrive at this conclusion.

Reviewed by:	andrew, imp
Differential Revision:	https://reviews.freebsd.org/D56897
2026-06-04 00:15:14 -05:00
Haoxiang Li d1488cd762 bcm2835_sdhci: Clean up DMA resources on attach failure
bcm_sdhci_attach() allocates a DMA channel with bcm_dma_allocate()
before creating the bus_dma tag and map.  If a later initialization
step fails, the common error path releases the interrupt and memory
resources, but leaves the DMA channel allocated.

Call bcm_dma_free() for cleanup, as it already performs the required
internal checks and can therefore be invoked directly.

Signed-off-by:	Haoxiang Li <[email protected]>
Reviewed by:	mhorne
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2241
2026-05-27 15:12:09 -03:00
Christos Margiolis 1e72608a3c sound: Remove all remaining uses of mixer_get_lock()
These functions are called from sound(4) through MIXER_SET() in
mixer_set(), but nothing mixer-related is used or needs to be locked in
these cases.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Pull Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
2026-05-27 17:32:12 +02:00
John Baldwin dcae0f7d7a sys: Consistently use ptoa() with td_kstack_pages
Suggested by:	kib
Reviewed by:	kib, andrew (arm changes)
Sponsored by:	AFRL, DARPA
Pull Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/23
2026-05-27 09:45:26 -04:00
John Baldwin 8b9023cfc1 sys: Add td_kstack_top inline helper function
This function returns a pointer to the top of the kstack.

Reviewed by:	kib, andrew (arm changes)
Sponsored by:	AFRL, DARPA
Pull Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/23
2026-05-27 09:45:26 -04:00
John Baldwin 2893bb741b cpu_thread_new_kstack: Introduce new MD callback
Previously, the cpu_thread_alloc callback was invoked each time a
kernel stack was allocated for a thread.  This included thread
creation, but it was also invoked if a recycled thread had to allocate
a new kstack.  This means that cpu_thread_alloc could be called
multiple times for a single thread, but cpu_thread_free is only called
once.  Not only that, but the cpu_thread_alloc callback can't tell if
it is being invoked on a new thread object, or a recycled thread.
Calling *_alloc multiple times on an object is also atypical for
kernel APIs.

As a result of this confusion, amd64 was potentially leaking an XSAVE
buffer each time a new kstack was allocated for an existing thread,
since cpu_thread_alloc for amd64 always allocated a new XSAVE buffer.
In practice, this edge case is probably rare.  A process object needs
to be recycled where either the new or old process is a kernel process
with a non-default kernel stack size.

Nevertheless, to ease the confusion, redefine cpu_thread_alloc to only
be called once when a new thread is allocated.  The new callback,
cpu_thread_new_kstack is invoked each time a kstack is allocated for a
thread, including both at thread creation time and if a recycled
thread allocates a new kstack.  The new callback should set any fields
whose value is dependent on td_kstack (e.g. the user frame in
td_frame, or td_pcb if the PCB is allocated on the kstack).

Reviewed by:	kib, andrew (arm changes)
Sponsored by:	AFRL, DARPA
Pull Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/23
2026-05-27 09:45:22 -04:00
John Baldwin 187b46e1c4 cpu_fork: Remove redundant assignments to td_pcb and td_frame
cpu_thread_alloc() already sets these fields anytime td_kstack changes.

Reviewed by:	kib, andrew (arm changes)
Sponsored by:	AFRL, DARPA
Pull Request:	https://ron-dev.freebsd.org/FreeBSD/src/pulls/23
2026-05-27 09:43:43 -04:00
Ryan Libby 94323513dd types: provide __SIZEOF_{INT{8,16,32,64},TIME,TIME32}_T
Suggested by:	kib
Reviewed by:	imp, kib
Discussed with:	emaste, jrtc27
Differential Revision:	https://reviews.freebsd.org/D56783
2026-05-08 12:37:24 -07:00
Dimitry Andric 966fb94cb3 Define stdint.h macros unconditionally
Similar to glibc, define all the stdint.h macros such as `SIZE_MAX`,
`UINT64_C`, etc unconditionally. I.e. no longer check whether
`__STDC_CONSTANT_MACROS` or `__STDC_LIMIT_MACROS` are defined. See also
<https://sourceware.org/bugzilla/show_bug.cgi?id=15366>.

This is part of reverting base 00bee6fcd7, which reverted an upstream
libc++ commit that eliminated libc++'s stdint.h wrapper header.

Submitted by:	Nikolas Klauser <[email protected]>
MFC after:	1 week
Reviewed by:	imp
Differential Revision: https://reviews.freebsd.org/D56746
2026-05-01 20:13:33 +02:00
Adrian Chadd 20baee6bfe qcom_tlmm: prepare for supporting multiple TLMM platforms
* Create a set of callbacks implementing the hardware specific
  GPIO bus operations
* Migrate the IPQ4018 TLMM setup code into qcom_tlmm_ip4018.c

Differential Revision:	https://reviews.freebsd.org/D56349
2026-04-27 08:57:44 -07:00
Lexi Winter c73cd9ca3f if_awg: Add missing awg_poll() prototype
The function awg_poll() was missing a prototype, which causes the build
to fail if DEVICE_POLLING is enabled, which it is in the ARMADAXP config.

MFC after:	2 weeks
Reviewed by:	tuexen, mmel, adrian
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D56651
2026-04-27 07:57:13 +01:00
Timo Völker 1bfd392b9e vtnet: remove loader tunable fixup_needs_csum
Removes the deprecated loader tunable fixup_needs_csum. Removes also
the sysctl counter rx_csum_bad_offset that is no longer in use.

Reviewed by:		tuexen
Event:			Wiesbaden Hackathon 2026
Differential Revision:	https://reviews.freebsd.org/D55588
2026-04-26 11:42:38 +02:00
John Baldwin fe3e92e686 PHYS_TO_DMAP: Return a void * instead of a vm_offset_t
Add a new PHYS_TO_DMAP_ADDR that still returns an address for use in
places that only need an address and not a pointer.

Effort:		CHERI upstreaming
Reviewed by:	kib
Sponsored by:	AFRL, DARPA
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2068
2026-04-23 13:05:54 -04:00
John Baldwin ac7d527402 pmap_map: Use void * for the return value instead of vm_offset_t
Effort:		CHERI upstreaming
Reviewed by:	kib
Sponsored by:	AFRL, DARPA
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2068
2026-04-23 13:05:54 -04:00
John Baldwin fe2957f591 sys: Switch td_kstack from vm_offset_t to char *
Effort:		CHERI upstreaming
Reviewed by:	kib
Sponsored by:	AFRL, DARPA
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2068
2026-04-23 13:05:54 -04:00
John Baldwin 2d0634d2e7 kva_alloc/free: Use void * instead of vm_offset_t
Effort:		CHERI upstreaming
Reviewed by:	kib
Sponsored by:	AFRL, DARPA
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2068
2026-04-23 13:05:54 -04:00