| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We retired most obsolete 10 and 10/100 Ethernet NIC drivers in 2019 --
see commits following ebcf740a32ae ("FCP-101: remove obsolete 10 and
10/100 Ethernet drivers.).
le(4) was retained with with the note "Emulated by QEMU, alternatives
don't yet work for mips64." MIPS has since been removed from the tree
and emulators and virtual machines offer many other, more suitable
devices.
Reviewed by: brooks
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55516
|
| |
|
|
|
|
|
|
|
|
| |
virtio_pci uses two loader tunables that should be more visible.
This patch adds these loader tunables to sysctl and describes them
in the virtio(4) man page.
Reviewed by: imp (erlier version), tuexen
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55533
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The SMC firmware revision can prove helpful when determining why the
behavior of a given controller varies from the maintainers' expected
behavior.
This should be a sysctl (eventually), but for now dumping out the
information via `device_printf(..)` suffices, given that only one
asmc(4) compatible device can exist in an Apple platform at any
given point in time. This will become a sysctl in the future after
additional improvements are incorporated from OpenBSD and NetBSD.
MFC after: 1 week
Obtained from: https://github.com/openbsd/src/ (sys/dev/acpi/asmc.c @ 142d064)
Differential Revision: https://reviews.freebsd.org/D55577
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support for AMD IBS. It adds a new class of performance
counter that cotains two events: ibs-fetch and ibs-op events. Unlike
most existing sampled events, IBS events provide a number of values
containing extra information regarding the sample. To support this we
use the existing callchain event, and introduce a new flag for multipart
payloads. The first 8 bytes of the pc_sample contains a header that
defines up to four payloads.
Sponsored by: Netflix
Reviewed by: imp,mhorne
Pull Request: https://github.com/freebsd/freebsd-src/pull/2022
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PMC flags available for DF and L3 counters were not all implemented.
More importantly, the field encodings for the L3 counters changed in an
incompatible way between Family 17h and Family 19h. Similarly, the
field encodings for the DF coutners changed between Family 19h and 1Ah.
I also added the precise retire flag for the 3rd core counter.
Lastly, I added a warning in the jevent parser because ignoring the
unknown fields results in counters incorrectly programmed. We should
not just ignore that.
Sponsored by: Netflix
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2040
|
| |
|
|
|
|
|
|
|
| |
If m_getjcl() fails we want to know the size we requested in order to
have a chance to evaluate the problem better.
MFC after: 3 days
Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D55555
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is required so that ACPI power-off (entering S5) works as expected, as
the ACPI PM1a and PM1b blocks might not be accessible by dom0 directly.
Additionally, Xen also needs to do cleanup before entering a sleep state,
so it needs to be notified about it.
With this patch FreeBSD dom0 now powers off the host correctly:
acpi0: Powering system off...
(XEN) [ 85.686598] arch/x86/hvm/emulate.c:415:d0v0 fixup p2m mapping for page fedc6 added
(XEN) [ 85.687606] arch/x86/hvm/emulate.c:415:d0v0 fixup p2m mapping for page fbc10 added
(XEN) [ 85.692357] Preparing system for ACPI S5 state.
(XEN) [ 85.692702] Disabling non-boot CPUs ...
(XEN) [ 85.694471] Broke affinity for IRQ9, new: {0-7}
[...]
(XEN) [ 85.903118] Entering ACPI S5 state.
Should be a non-functional change when not running as a Xen dom0.
Reviewed by: kib
Sponsored by: Citrix Systems R&D
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D55504
|
| |
|
|
|
|
|
|
|
|
|
| |
Migrate to the new encryption key API rather than poking at the
key struct directly.
Notably this driver was very clear about its expectation the net80211
key layout w/ key, TX MIC and RX MIC matches the firmware layout
and just memcpy()'ed it. That has been refactored.
Differential Revision: https://reviews.freebsd.org/D54484
|
| |
|
|
|
|
|
| |
Migrate to the new encryption key API rather than poking at the
key struct directly.
Differential Revision: https://reviews.freebsd.org/D54482
|
| |
|
|
|
|
|
| |
Migrate to the new encryption key API rather than poking at the
key struct directly.
Differential Revision: https://reviews.freebsd.org/D54481
|
| |
|
|
|
|
|
| |
Migrate to the new encryption key API rather than poking at the
key struct directly.
Differential Revision: https://reviews.freebsd.org/D54480
|
| |
|
|
|
|
|
| |
Migrate to the new encryption key API rather than poking at the
key struct directly.
Differential Revision: https://reviews.freebsd.org/D54479
|
| |
|
|
|
|
|
| |
Reviewed by: slavash
Tested by: Wafa Hamzah <wafah@nvidia.com>
Sponsored by: Nvidia networking
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Do it always for bootverbose if offload was enabled in the kernel
config, not only if the device actually supports all required
capabilities to do the offload. Otherwise, having the code to print the
caps is pointless.
Reviewed by: slavash
Tested by: Wafa Hamzah <wafah@nvidia.com>
Sponsored by: NVidia networking
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having to enter in each of the models for Apple hardware, recompiling,
etc, is tedious. Provide generic models so end-users can leverage some
of the capabilities provided by the driver, i.e., common features like
minimal fans and lights (if present on the generic model) support.
The generic models are as follows:
- Macmini
- MacBookAir
- MacBookPro
- MacPro
This sort of follows the pattern established by the `applesmc` driver in
Linux.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D55395
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apple Mac systems support Wake-on-LAN from powered-off state (S5/G2) via
the AUPO SMC key.
This change adds a convenience sysctl, `dev.asmc.0.wol`. This can be
disabled if set to 0 and enabled if set to 1.
The AUPO key is volatile and resets to 0x00 on every boot, so WoL must
be manually enabled before each shutdown to work from powered-off state.
Users need to run: `sysctl dev.asmc.0.wol=1` before shutting down the
system. The sysctl is best set to persist in `/etc/sysctl.conf`.
MFC after: 1 week
Reviewed By: markj, ngie
Differential Revision: https://reviews.freebsd.org/D54439
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both of the aforementioned macros have been present in FreeBSD
for well over a decade: 2009 for `KOBJMETHOD_END`; 2011 for
`DEVMETHOD_END`.
Adapt all hardcoded references of `{0, 0}` with `DEVMETHOD_END`
and `KOBJMETHOD_END` as appropriate. This helps ensure that
future adaptations to drivers following patterns documented
in driver(9) can be made more easily/without issue.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55414
|
| |
|
|
|
|
| |
Reviewed by: np (earlier version)
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D55470
|
| |
|
|
|
|
|
|
|
|
|
| |
- Use __BUS_ACCESSOR_DEFAULT for the global handle IVAR to preserve
existing behavior for acpi_get_handle.
- Use __BUS_ACCESSOR for the private ACPI IVARs as these are only used
with direct children of acpi0.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55355
|
| |
|
|
|
|
|
|
|
|
|
|
| |
ACPI_IVAR_HANDLE is the only true "global" IVAR that can be used
across multiple bus drivers. The other IVARs are private to direct
children of acpi0. However, they need to be numbered after ISA IVARs
as ACPI mimics an ISA bus device. To ensure this remains true, add an
ISA_IVAR_LAST to use in assert that the private ACPI IVARs do not
overlap with ISA IVARs.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55354
|
| |
|
|
|
|
|
|
|
|
| |
Currently this happens as a side effect of the return type of
sdio_get_function() in the expansion of __BUS_ACCESSOR, but this is
fragile and can break if __BUS_ACCESSOR changes to define other
functions first.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55351
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Panasonic FZ-Y1 and similar models, the EC latches RF_KILL on
shutdown and suspend when battery is at certain level, causing wireless
to boot with hard block.
Call WLSW.SHRF during attach and resume to clear the block.
Tested on Panasonic FZ-Y1 with Intel Wireless 7265.
Reviewed by: adrian, obiwac
Approved by: adrian, obiwac
Differential Revision: https://reviews.freebsd.org/D55265
|
| |
|
|
|
| |
Reviewed by: adrian (previous version)
MFC after: 3 weeks
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The initial import from OpenBSD contained chip revision printf() calls
commented out, as OpenBSD's bare printf() style does not translate to
FreeBSD's device_printf() idiom. The result is that users cannot
distinguish RTL8125 from RTL8125B, RTL8125D_1, RTL8125D_2 etc. via
dmesg alone, even though all variants show as '<RTL8125>' from the PCI
probe string.
Add proper device_printf() calls including the raw hwrev value,
consistent with how re(4) reports chip revisions.
Signed-off-by: Christos Longros <chris.longros@gmail.com>
Reviewed by: zlei, imp, adrian
Differential Revision: https://reviews.freebsd.org/D55402
|
| |
|
|
|
|
|
|
|
|
| |
* Only free busdma memory that was allocated
* Don't free tx/rx rings until their buffers have also been freed
PR: kern/293307
Reviewed by: zlei
Differential Revision: https://reviews.freebsd.org/D55420
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Do the callout init early; since some of the teardown path expects
the callout to be valid
* Handle an invalid ethernet address by generating a local one.
PR: kern/293307
Reviewed by: zlei
Differential Revision: https://reviews.freebsd.org/D55419
|
| |
|
|
|
|
| |
This is a newer version of the "gpio" property.
MFC after: 3 weeks
|
| |
|
|
|
|
|
|
| |
Add support for 64-bit ranges.
Process 'bus-range' property.
Add some debug prints.
MFC after: 3 weeks
|
| |
|
|
|
|
| |
It may be submapped in child drivers.
MFC after: 3 weeks
|
| |
|
|
|
|
| |
I2C devices are permitted to sleep during transfers.
MFC after: 3 weeks
|
| |
|
|
|
|
|
|
| |
Accept the assigned clock on the CPU node.
Don't report a missing "clock-frequency" property if the CPU node has
a "clocks" property.
MFC after: 3 weeks
|
| |
|
|
|
|
| |
The RTC contains a configurable clock output.
MFC after: 3 weeks
|
| |
|
|
|
|
|
| |
Migrate to the new encryption key API rather than poking at the
key struct directly.
Differential Revision: https://reviews.freebsd.org/D54483
|
| |
|
|
|
|
|
|
|
|
| |
This change makes `asmc_detach(..)` reentrant by setting freed resources
to known invalid values when done, and makes `asmc_attach(..)` call
`asmc_detach(..)` instead of attempting to the semi-equivalent way of
cleaning up the driver resources allocated in `asmc_detach(..)`.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55413
|
| |
|
|
|
|
|
|
|
|
|
| |
This way we can avoid edge-cases like
8af6aee96ed609456900c6dd92dafabac5e89c0a ("virtual_oss(8): Remove
floating point formats from preference list").
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D55403
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- Allow `ASMC_DEBUG` to be treated as a variadic macro.
- Add ellipses around `sizeof(..)` calls.
- Reindent some of the lines to better follow style(9) with line
wrapping.
A number of other clang-format changes were not taken as they are not
compatible with style(9).
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55394
|
| |
|
|
|
|
|
|
| |
Previously the size defaulted to the maximum supported size reported
by the remote host. The value of 128 matches the default on Linux and
avoids excessive resource usage for I/O queues.
Sponsored by: Chelsio Communications
|
| |
|
|
|
|
|
|
|
|
|
| |
This code cleanup makes it easier for human readers to understand what each
of the fields actually represents, as well as makes it easier to modify
what the macros actually do under the covers, without introducing
potential human errors.
No functional change intended.
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Use `ASMC_LIGHT_FUNCS_DISABLED` and `ASMC_SMS_FUNCS_DISABLED` instead of
the unrolled versions of the macros.
This makes it easier to adjust the underlying macros/fields for
`struct asmc_model`.
No functional change intended.
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Macmini4,1 model does not have "fansafespeed" support. This issue
typically manifests with messages like so:
```
asmc0: asmc_key_read for key F0Sf failed 10 times, giving up
```
Swap out `ASMC_FAN_FUNCS` with `ASMC_FAN_FUNCS2` to explicitly drop
"fansafespeed" checks in the driver for the model as it doesn't support
that hardware feature.
MFC after: 1 week
Reported by: @probonopd
Closes: https://github.com/helloSystem/ISO/issues/357
|
| |
|
|
|
|
|
|
|
|
|
| |
For now, just describe the error where an unprivileged user attempts to
run a VM without DESTROY_ON_CLOSE semantics, i.e., monitor mode.
Reviewed by: bnovkov
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D54743
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add the vmm group.
- Let /dev/vmmctl belong to the vmm group by default, and give group
write permissions.
- When creating a VM's device files, make them owned by the creating
process' effective UID.
Reviewed by: bnovkov
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D54741
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In preparation for supporting creation of VMs by unprivileged users, add
some restrictions:
- Disallow creation of non-transient VMs by unprivileged users. That
is, if an unprivileged user creates a VM, the VM must be destroyed
automatically once the last fd referencing it is gone.
- Disallow destroying VMs created by a different user, unless the caller
has the PRIV_VMM_DESTROY privilege.
Reviewed by: bnovkov
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D54740
|
| |
|
|
|
|
|
|
| |
placeholder entry end changed to 0 in f591287756368
("iommu_gas: make placeholder entry at the start of the GAS zero size")
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D55326
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
While here, make it print that we are trying to power off upfront, not
really treating differently power off preparation via
acpi_EnterSleepStatePrep() and actual power off via
AcpiEnterSleepState(), which the user does not care about.
While here, capitalize the messages.
Reviewed by: obiwac
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55226
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
To this end, create a small wrapper, acpi_EnterSleepStatePrep(), which
itself prints the failure message.
While here, when trying to power down (acpi_shutdown_final()), and
AcpiEnterSleepStatePrep() failed, print an additional message more
explicit about the power down request having failed.
Reviewed by: obiwac
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55225
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The CAM sim unit numbner should match the nvme device number. We need
this to match unit numbers in some wiring scenarios. For example:
hint.nvme.0.at="UEFI:PciRoot(0x3)/Pci(0x1,0x1)/Pci(0x0,0x0)"
hint.nvme.1.at="UEFI:PciRoot(0x3)/Pci(0x1,0x2)/Pci(0x0,0x0)"
hint.nvme.2.at="UEFI:PciRoot(0x3)/Pci(0x1,0x3)/Pci(0x0,0x0)"
hint.nvme.3.at="UEFI:PciRoot(0x3)/Pci(0x1,0x4)/Pci(0x0,0x0)"
hint.scbus.33.at="nvme0"
hint.nda.0.at="scbus33"
hint.scbus.34.at="nvme1"
hint.nda.1.at="scbus34"
hint.scbus.35.at="nvme2"
hint.nda.2.at="scbus35"
hint.scbus.36.at="nvme3"
hint.nda.3.at="scbus36"
If the devices that are nvme0 and nvme3 are the only ones populated, you
still want them associated with nda0 and nda3.
The nvme_sim device changes meant we were passing the wrong device's
unit number to cam_sim_alloc. This fixes the problem.
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
| |
If we format a drive, and then crash, we'll come back up. nvme_sim_ns
device won't attach because we don't have a namespace. Some drives (all?
I couldn't find it in the standard) send an AER with a namespace change,
which causes a NULL dereference because s_sim wasn't initialized because
we didn't attach. So, if we get into the ns_changed routine, bail early
if we didn't attach. We'll attach later, and deal with the ns correctly
if it's really there, or not attach one if it's not.
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the low bits of a window's limit are hardwired to 1, this
configuration looks like a minimally sized window at address 0.
However, PCI resources are not generally at address 0 (see the
__PCI_BAR_ZERO_VALID macro that was only defined on sparc64), and some
PCI-PCI bridges report these register values after a reset. The
result today is a lot of spam in dmesg as the minimally-sized windows
fail to allocate. By ignoring these windows and treating them as
closed the end result is the same, but there is less spam during boot.
Reported by: jrtc27
Differential Revision: https://reviews.freebsd.org/D43922
|
| |
|
|
|
|
|
| |
This changes the in-kernel ABI, but that is permitted across major
versions and is cleaner than leaving these around forever.
Differential Revision: https://reviews.freebsd.org/D54160
|