Device tree overlays are installed in /boot/dtb/overlays by default.
Adjust the comment to mention fdt_overlays and loader.conf, but do not
repeat what is said in the parent directory's description.
PR: 261349
Reviewed by: grahamperrin, kevans
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40785
The right unwinding stop indicator should be CFI-undefined PC.
https://dwarfstd.org/doc/Dwarf3.pdf - page 118:
If a Return Address register is defined in the virtual unwind table,
and its rule is undefined (for example, by DW_CFA_undefined), then
there is no return address and no call address, and the virtual
unwind of stack activations is complete.
This requires the crt code be built with unwind tables, for that remove
-fno-asynchronous-unwind-tables to enable unwind tables generation.
PR: 241562, 246322, 246537
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D40780
Older Chromebooks have issues in their embedded controller (EC) firmware
which need working around in atkbd and atkbdc. On these systems, rather
than use a standard EC, Google used their own arm-based EC. For a while,
its firmware incorrectly implemented the i8042, requiring workaroundsd
in the driver.
Implement a heuristic recommended by MrChromebox <mrchromebox@gmail.com>
to detect them: If the bios.version starts with Google_, or the maker is
either Google or GOOGLE, assume that it's a chromebook with the affected
bios. While this isn't strictly true, the number of updated systems
without the bug is very small and this will exclude all the non-Google
coreboot user that use a standard EC. There's no simple way to test the
hardware to see if it's implemented with the buggy EC.
Sponsored by: Netflix
Reviewed by: jon@thesoo.org, MrChromebox
Differential Revision: https://reviews.freebsd.org/D40789
The current code assumes running on big-endian, which causes issues with
e.g. strtod() as reported on https://github.com/ocaml/ocaml/pull/10837#issuecomment-1605346422
This is probably a leftover from when powerpc64le was introduced.
Approved by: jhibbits (on IRC)
Notable upstream pull request merges:
#14925 Another set of vdev queue optimizations
#14964 Use big transactions for small recordsize writes
#14999 ZIL: Fix another use-after-free
Obtained from: OpenZFS
OpenZFS commit: a9d6b0690b
The function that uses nextnum expects to return a u_int32_t, not a mere
int, so let's make nextnum a u_int32_t instead.
Note: retained current u_int32_t style, since the rest of the file uses
it.
Reviewed by: imp, mckusick
Pull Request: https://github.com/freebsd/freebsd-src/pull/734
No functional change intended.
Reviewed by: andrew
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc. (hardware)
Differential Revision: https://reviews.freebsd.org/D40502
This lets consumers fetch the value of a system register and apply a
mask over individual fields. That is, each field in the returned value
will be the "smaller" of the two provided by "mask" and the value saved
in kern_cpu_desc. This will be used by vmm to sanitize host system
register fields.
Reviewed by: andrew
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc. (hardware)
Differential Revision: https://reviews.freebsd.org/D40500
pci_cfgrw() may be called via a write to the extended config space,
which is memory-mapped. In this case, the name "eax" is misleading.
Give it a more generic name. No functional change intended.
Reviewed by: corvink, jhb
MFC after: 1 week
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D40732
The device model effectively assumes that MSI-X is enabled (it never
asserts the legacy interrupt), so any guest which relies on being able
to use the legacy PCI interrupt will fail.
The WIP arm64 port does not implement legacy PCI interrupts, but NVMe
emulation is potentially useful there. Simply remove the call.
Reviewed by: corvink, chuck, jhb
Tested by: chuck
MFC after: 1 month
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D40731
As of f32db40650 quotes may be used to specify login class
capabilities that include commas. This is true in general but is
particularly relevant for setenv, a comma-separated list of environment
variables and values, so mention it there.
PR: 236204
Sponsored by: The FreeBSD Foundation
- Pass down the top-level arglist from main down to camdd_rw and use
it in place of the hardcoded CAMDD_ARG_ERR_RECOVER when calling
camdd_probe_pass. This now disables error recovery by default
unless -E is specified.
- Use the return value of parse_btl to determine if an explicit LUN
was specified.
- Remove most CAMDD_ARG_* flags that are only set and never checked.
CAMDD_ARG_VERBOSE remains, but could perhaps be removed (and possibly
-v should be removed as well since it is currently a no-op).
Reported by: clang -Wunused-but-set-variable (arglist in main)
Differential Revision: https://reviews.freebsd.org/D40666
geom_gettree probably never fails, and if it does there isn't much of
a fallback other than aborting partitioning. However, a few places
were checking the return value and not doing anything with it
triggering a unused-but-set-variable warning. Checking the errors
resolves the warning.
While here, check for errors in other places that weren't checking for
them at all, remove a spurious double call (the second call overwrote
the mesh structure leaking all the pointers from the first), and close
a few resource leaks on error paths.
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D40779
The DMA scatter/gather list for mrsas passthrough ioctl commands is
stored in a SGL at the end of the DCMD frame. Given the SGL member at
the end of the DCMD frame it seems likely this S/G list is formatted
as a fixed-width structure such as the type mrsas_sge64 and not as a
iovec which contains a kernel pointer and length that vary with the
native architecture size.
Reviewed by: imp
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D40727
Since pmap_ps_enabled() is true by default, check it inside of
pmap_promote_l2() instead of at every call site.
Modify pmap_promote_l2() to return true if the promotion succeeded and
false otherwise.
(A similar change was applied to the amd64 pmap in 0d2f98c2f092.)
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D40781
On Purism coreboot systems the quirks mode in atkbdc prevents built in
Keyboard from being used. Add quirk to prevent that.
MFC After: 2 weeks
PR: 271737
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D40405
When searching for a free irq map location continue the search from the
beginning of the list. There may be holes in the map before
irq_map_first_free_idx, e.g. when removing an entries in order will
increase the index past the current free entry.
PR: 271990
Reviewed by: mhorne
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D40768
The quotes are added to prevent word splits and globbing. Some
whitespaces were also removed after variables.
Approved by: imp
Differential Revision: https://reviews.freebsd.org/D40726
It comes as an empty directory by default. While here, use a serial
(Oxford) comma, per the FDP Primer.
PR: 261349
Reported by: karels
Reviewed by: grahamperrin, karels
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40774
So this is a subtle bug I have found in cubic. If you compile a number of options into the kernel (accounting and tracking) then
all of the kernel code "knows" the proper offset of t_rttupdatecnt however cubic does not see the options (and htcp too) and thus
will look for the count in the wrong place seeing 0. Which then means it never builds an MIN RTT which then means it
always hangs in slowstart.
The solution is to put all options that effect tcpcb size into the opt_global.h so that the kernel
has a consistent view of the tcpcb size.
Reviewed by: tuexen, rscheff
Sponsored by: Netflix Inc
Differential Revision:https://reviews.freebsd.org/D40761
Implement list_count_nodes() using a simple loop. This is needed by
an updated wireless driver.
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D40757
lwb->lwb_issued_txg can not be accessed after lwb_state is set to
LWB_STATE_FLUSH_DONE and zl_lock is dropped, since the lwb may be
freed by zil_sync(). We must save the txg number before that.
This is similar to the 55b1842f92, but as I see the bug is not new.
It existed for quite a while, just was not triggered due to smaller
race window.
Reviewed-by: Allan Jude <allan@klarasystems.com>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes#14988Closes#14999
When ZFS appends files in chunks bigger than recordsize, it borrows
buffer from ARC and fills it before opening transaction. This
supposed to help in case of page faults to not hold transaction open
indefinitely. The problem appears when recordsize is set lower than
default 128KB. Since each block is committed in separate transaction,
per-transaction overhead becomes significant, and what is even worse,
active use of of per-dataset and per-pool locks to protect space use
accounting for each transaction badly hurts the code SMP scalability.
The same transaction size limitation applies in case of file rewrite,
but without even excuse of buffer borrowing.
To address the issue, disable the borrowing mechanism if recordsize
is smaller than default and the write request is 4x bigger than it.
In such case writes up to 32MB are executed in single transaction,
that dramatically reduces overhead and lock contention. Since the
borrowing mechanism is not used for file rewrites, and it was never
used by zvols, which seem to work fine, I don't think this change
should create significant problems, partially because in addition to
the borrowing mechanism there are also used pre-faults.
My tests with 4/8 threads writing several files same time on datasets
with 32KB recordsize in 1MB requests show reduction of CPU usage by
the user threads by 25-35%. I would measure it in GB/s, but at that
block size we are now limited by the lock contention of single write
issue taskqueue, which is a separate problem we are going to work on.
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes#14964
Whilst the kernel can support any number of COMPAT_FOO, world can only
build a single libfoo. Upstream this isn't such an issue, since the only
option is lib32 anyway, but downstreams, such as CheriBSD, may wish to
support multiple at the same time. Thus, adjust the top-level Makefiles
to turn _LIBCOMPAT into a _LIBCOMPATS list that gets iterated over, and
adjust bsd.compat.mk to support this use-case.
For the normal NEED_COMPAT/WANT_COMPAT case, LIBCOMPATFOO remain set and
refer to the requested compat's, preserving the current interface. For
the top-level Makefiles those variables are no longer set (since there
is no longer "the" compat) and only the per-compat ones are available.
Reviewed by: brooks, jhb, imp
Differential Revision: https://reviews.freebsd.org/D40571
Currently Makefile.libcompat queries a few MK_FOO variables to determine
what is being built. However, it is plausible (and indeed, downstream
in CheriBSD, this is the case) that these may vary between the native
and the compat architecture. In order to correctly determine their
values for the compat architecture, we need to defer their evaluation
until we are in the compat sub-make where src.opts.mk will give us the
right value for the compat MACHINE_ARCH.
Reviewed by: brooks, jhb, imp
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D40570
This is no longer referenced as of commit 724123b9f4 ("libcompat: Use
WORLDTMP sysroot").
Reviewed by: brooks, jhb, imp
Differential Revision: https://reviews.freebsd.org/D40569
Because fnmatch has no side effects, we can safely avoid calling fnmatch
if the end result does not matter anyway (the compiler cannot see this,
so it calls fnmatch in the event it has side-effects).
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/747
This way a possible clash between FAULT_* and KERN_* numbering is
avoided, and panics checks for fault_status confusion become more
efficient.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D40771
Relevant/interesting changes:
o optimize string matching for ':M' and ':N'
o warn about malformed patterns in ':M', ':N' and '.if make(...)'
o allow guards to be targets as well as variables
The guard targets may include variable references like
__${.PARSEDIR:tA}/${.PARSEFILE}__
o optimization for makefiles protected from multiple-inclusion
skip even opening the file after first include.
o var.c: do not allow delete of readOnly variable
o parse.c: .break takes no args