sctp: Use __sdt_used for variables only used by SDT probes
Previously this used a home-rolled version.
Reviewed by: tuexen, imp, markj
Differential Revision: https://reviews.freebsd.org/D55165
sdhci_fdt_rockchip: Don't return 0 from probe routine
The only write to the softc is a no-op (softcs are initialized to all
zeroes), so remove that and just use BUS_PROBE_DEFAULT.
Reviewed by: bnovkov
Differential Revision: https://reviews.freebsd.org/D55159
sdhci_fdt_rockchip: Move ofw_bus_status_okay check
This fixes a warning from GCC:
sys/dev/sdhci/sdhci_fdt_rockchip.c: In function 'sdhci_fdt_rockchip_probe':
sys/dev/sdhci/sdhci_fdt_rockchip.c:120:14: error: statement will never be executed [-Werror=switch-unreachable]
120 | if (!ofw_bus_status_okay(dev))
| ^~~~~~~~~~~~~~~~~~~~~~~~
Reviewed by: bnovkov, imp, emaste
Differential Revision: https://reviews.freebsd.org/D55158
llvm: Link private LLVM libraries against compiler_rt for aarch64
This is required for GCC which uses libcalls for outlined atomics.
Reviewed by: dim
Differential Revision: https://reviews.freebsd.org/D55157
libmd aarch64: Use ands instead of bics to round down the length
GNU as does not accept bics with two register operands but instead
requires three register operands. However, clang assembles the bics
instruction to ands anyway, so just use ands directly.
Reviewed by: fuz
Differential Revision: https://reviews.freebsd.org/D55155
aw_mmc: Reset card
On H616 (and I think H6, but this isn't verified) we need to reset the
card to have a functioning device.
With this commit all my pending patches for H616 are in tree. We run
well on my test device (Orange Pi Zero3), however there is an
uninvestigated issue with ethernet and graphics are an open question.
Reviewed by: manu, adrian
MFC After: 1 week
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55097
CONTRIBUTING.md: Clarify GitHub pull requests
Make the guidelines more prescriptive (while remaining clear that Pull
Requests are merely one, not-preferred method for submitting changes).
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55089
libc/aarch64: Add memset for a 64 byte dc zva
On arm64 we can use the "dc zva" instruction to zero memory. The CPU
tells software if the instruction is implemented, and if so the size
and alignment it will use.
When the size is 64-bytes the Arm Optimized Routines implementation of
memset can use dc zva to zero memory, and has a build flag to skip
checking.
Use this flag to build a version of memset that will be used when this
assumption is true.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D54776
(cherry picked from commit 32d1f18865abe94d351a6f178a93b7195595ec69)
arm64/vmm: Set and use the fine-grained traps
Set the Fine-grained trap registers to trap any features we don't
support. These are expected to be more useful when we support nested
virtualisation, so for now just the base features and GICv3 are not
trapped.
As nested virtualisation will require VHE we only set the fine-grained
trap registers when VHE is used.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D54687
(cherry picked from commit a4f0e93c514280bfd0ff3897e5171ec7bbe4796b)
virtio_p9fs: Use VIRTIO_SIMPLE_PNPINFO
This allows us to also use the common VIRTIO_SIMPLE_PROBE and to have
devmatch load the driver when detected.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D54684
(cherry picked from commit 2f3f5055e7f69567f7aaca2f5b77655df34c4bb0)
arm64: Attach the vgic even if there is no ITS
If there is no ITS device so no memory resources the gicv3 driver would
exit attaching early. This caused the vgic driver to also not be
attached, even if it could.
Reported by: novel@
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D54791
(cherry picked from commit c12d6cc326b70326d776324067bdf07e4fa328aa)
arm/gic: Detect broken configurations
Some virtualization platforms provide broken configurations. There
is a GIC interrupt controller, however accessing the CPU interface
registers leads to an external data abort. As these are needed to
handle interrupts we are unable to boot further.
Detect this misconfiguration and panic to tell the user the issue.
Reviewed by: emaste
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D54832
(cherry picked from commit 6c5fdba45a63d66984e15ddc6996f5e88a55f22c)
arm64: Fix kernel panic in get_arm64_sve during core dump
The coredump logic calls get_arm64_sve twice: once to get the note size,
and once to get the data. The note size calculation depended on the
volatile `PCB_FP_SVEVALID` flag. If this flag was cleared between the
two calls (e.g., due to a context switch clearing the flag to comply
with the ABI), the second call would expect a smaller buffer size than
the first, triggering a KASSERT panic ("invalid size").
Fix this by ensuring the SVE state is saved to the PCB before we decide
whether to use SVE or VFP.
PR: 292195
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D54532
(cherry picked from commit 93d3ac1daa0ef3ac54ffcd5cc64a14638d04bd60)
arm64: Fix MAIR_ATTR_MASK
Use the correct value when calculating the mask.
(commit message by andrew@)
Sponsored by: Arm Ltd
(cherry picked from commit bdaa120b30006d7ef841a966414795416ce93eea)
arm64: Enable MOPS in userspace
Detect presence of FEAT_MOPS, and enable instruction set and set HWCAP2 flag
if present.
Add handler for MOE exceptions.
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D54558
(cherry picked from commit 591c7a08bf8addce4b047ef9c8033c33099e4688)
chio: Add SPDX-License-Identifier tags
Some BSD-4-Clause files under bin/chio were missing the
SPDX-License-Identifier-tag.
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55193