Revision tags: release/13.4.0, release/14.1.0 |
|
#
0f5116d7 |
| 12-May-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
AMD IOMMU driver
This driver is functionally equivalent to the in-tree Intel DMAR code. It handles busdma and interrupt remapping from the host OS. There is no integration with bhyve, and the stub
AMD IOMMU driver
This driver is functionally equivalent to the in-tree Intel DMAR code. It handles busdma and interrupt remapping from the host OS. There is no integration with bhyve, and the stub iommu drivers in bhyve code cannot coexist with this driver (planned).
The biggest architectural problem with the code is that the AMD IOMMU units are enumerated as PCIe-attached security devices, which is much later after HPET and IOAPIC drivers attached and actived interrupts. Because of this, HPET FSB interrupts and IOAPIC interrupts are always identity-mapped.
The code is of late alpha quality. By default the driver is disabled. To enable for testing, set in loader.conf: hw.amdiommu.enable=1 hw.iommu.dma=1 <- to enable iommu busdma hw.iommu.ir=1 <- to enable interrupt remapping
Discussed with: emaste Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D47256
show more ...
|
#
5a0e9036 |
| 25-Jul-2024 |
Warner Losh <imp@FreeBSD.org> |
ipmi: Sort ipmi lines.
Sponsored by: Netflix
|
#
ddf0ed09 |
| 19-Jun-2024 |
Mark Johnston <markj@FreeBSD.org> |
sdt: Implement SDT probes using hot-patching
The idea here is to avoid a memory access and conditional branch per probe site. Instead, the probe is represented by an "unreachable" unconditional fun
sdt: Implement SDT probes using hot-patching
The idea here is to avoid a memory access and conditional branch per probe site. Instead, the probe is represented by an "unreachable" unconditional function call. asm goto is used to store the address of the probe site (represented by a no-op sled) and the address of the function call into a tracepoint record. Each SDT probe carries a list of tracepoints.
When the probe is enabled, the no-op sled corresponding to each tracepoint is overwritten with a jmp to the corresponding label. The implementation uses smp_rendezvous() to park all other CPUs while the instruction is being overwritten, as this can't be done atomically in general. The compiler moves argument marshalling code and the sdt_probe() function call out-of-line, i.e., to the end of the function.
Per gallatin@ in D43504, this approach has less overhead when probes are disabled. To make the implementation a bit simpler, I removed support for probes with 7 arguments; nothing makes use of this except a regression test case. It could be re-added later if need be.
The approach taken in this patch enables some more improvements: 1. We can now automatically fill out the "function" field of SDT probe names. The SDT macros let the programmer specify the function and module names, but this is really a bug and shouldn't have been allowed. The intent was to be able to have the same probe in multiple functions and to let the user restrict which probes actually get enabled by specifying a function name or glob. 2. We can avoid branching on SDT_PROBES_ENABLED() by adding the ability to include blocks of code in the out-of-line path. For example:
if (SDT_PROBES_ENABLED()) { int reason = CLD_EXITED;
if (WCOREDUMP(signo)) reason = CLD_DUMPED; else if (WIFSIGNALED(signo)) reason = CLD_KILLED; SDT_PROBE1(proc, , , exit, reason); }
could be written
SDT_PROBE1_EXT(proc, , , exit, reason, int reason;
reason = CLD_EXITED; if (WCOREDUMP(signo)) reason = CLD_DUMPED; else if (WIFSIGNALED(signo)) reason = CLD_KILLED; );
In the future I would like to use this mechanism more generally, e.g., to remove branches and marshalling code used by hwpmc, and generally to make it easier to add new tracepoint consumers without having to add more conditional branches to hot code paths.
Reviewed by: Domagoj Stolfa, avg MFC after: 2 months Differential Revision: https://reviews.freebsd.org/D44483
show more ...
|
#
40d951bc |
| 25-May-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
x86/iommu: extract useful utilities into x86_iommu.c
related to the page tables page allocation and mapping.
Sponsored by: The FreeBSD Foundation Sponsored by: Advanced Micro Devices (AMD) MFC afte
x86/iommu: extract useful utilities into x86_iommu.c
related to the page tables page allocation and mapping.
Sponsored by: The FreeBSD Foundation Sponsored by: Advanced Micro Devices (AMD) MFC after: 1 week
show more ...
|
#
ecaab0fb |
| 01-May-2024 |
Stephen J. Kiernan <stevek@FreeBSD.org> |
guestrpc module to handle VMware backdoor port GuestRPC functionality
Convert existing FreeBSD vmware_hvcall function to take a channel and parameter arguments.
Added vmware_guestrpc_cmd() to send
guestrpc module to handle VMware backdoor port GuestRPC functionality
Convert existing FreeBSD vmware_hvcall function to take a channel and parameter arguments.
Added vmware_guestrpc_cmd() to send GuestRPC commands to the VMware hypervisor. The sbuf argument is used for both the command to send and to store the data to return to the caller.
The following KPIs can be used to get and set FreeBSD-specific guest information in key/value pairs: * vmware_guestrpc_set_guestinfo - set a value into the guestinfo.fbsd.<keyword> key * vmware_guestrpc_get_guestinfo - get the value stored in the guestinfo.fbsd.<keyword> key
Add VMware devices to x86 NOTES
Reviewed by: jhb Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D44528
show more ...
|
#
b9c6fa33 |
| 12-Apr-2024 |
John Baldwin <jhb@FreeBSD.org> |
files.x86: Pull in some more duplicate lines from files.{amd64,i386}
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44759
|
Revision tags: release/13.3.0 |
|
#
34467bd7 |
| 22-Feb-2024 |
Chuck Silvers <chs@FreeBSD.org> |
x86/ucode: add support for early loading of CPU ucode on AMD.
Sponsored by: Netflix Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43318
|
Revision tags: release/14.0.0 |
|
#
64fbda90 |
| 20-Aug-2023 |
Val Packett <val@packett.cool> |
Add atopcase, the Apple HID over SPI input driver
The driver provides support for Human Interface Devices (HID) on Serial Peripheral Interface (SPI) buses on Apple Intel Macs produced in 2015-2018.
Add atopcase, the Apple HID over SPI input driver
The driver provides support for Human Interface Devices (HID) on Serial Peripheral Interface (SPI) buses on Apple Intel Macs produced in 2015-2018.
The driver appears to work more stable after installation of Darwin OSI in acpi(4) driver. To install Darwin OSI insert following lines into /boot/loader.conf:
hw.acpi.install_interface="Darwin" hw.acpi.remove_interface="Windows 2009, Windows 2012"
Reviewed by: wulf Differential revision: https://reviews.freebsd.org/D39863
show more ...
|
#
031beb4e |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
#
1f166509 |
| 07-Jun-2023 |
Andrey V. Elsukov <ae@FreeBSD.org> |
ipmi: add Block Transfer interface support
Reviewed by: ambrisko Obtained from: Yandex LLC MFC after: 2 weeks Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D40421
|
#
1f40866f |
| 24-Apr-2023 |
Val Packett <val@packett.cool> |
intelspi: add PCI attachment (Lynx/Wildcat/Sunrise Point)
Also adds fixups and cleanups:
- apply the child's mode/speed - implement suspend/resume support - use RF_SHAREABLE interrupts - use bus_de
intelspi: add PCI attachment (Lynx/Wildcat/Sunrise Point)
Also adds fixups and cleanups:
- apply the child's mode/speed - implement suspend/resume support - use RF_SHAREABLE interrupts - use bus_delayed_attach_children since the transfer can use interrupts - add support for newly added spibus features (cs_delay and flags)
Operation tested on Broadwell (Wildcat Point) MacBookPro12,1. Attachment also tested on Kaby Lake (Sunrise Point) Pixelbook.
Reviewed by: wulf MFC after: 1 month Differential revision: https://reviews.freebsd.org/D29249
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0, release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0 |
|
#
5e2183da |
| 14-Jan-2014 |
Julien Grall <julien@xen.org> |
xen/intr: move sys/x86/xen/xen_intr.c to sys/dev/xen/bus/
The event channel source code or equivalent is needed on all architectures. Since much of this is viable to share, get this moved out of x8
xen/intr: move sys/x86/xen/xen_intr.c to sys/dev/xen/bus/
The event channel source code or equivalent is needed on all architectures. Since much of this is viable to share, get this moved out of x86-land. Each interrupt interface then needs a distinct back-end implementation.
Reviewed by: royger Submitted by: Elliott Mitchell <ehem+freebsd@m5p.com> Original implementation: Julien Grall <julien@xen.org>, 2014-01-13 17:41:04 Differential Revision: https://reviews.freebsd.org/D30236
show more ...
|
#
af610cab |
| 21-Apr-2021 |
Elliott Mitchell <ehem+freebsd@m5p.com> |
xen/intr: adjust xen_intr_handle_upcall() to match driver filter
xen_intr_handle_upcall() has two interfaces. It needs to be called by the x86 assembly code invoked by the APIC. Second, it needs t
xen/intr: adjust xen_intr_handle_upcall() to match driver filter
xen_intr_handle_upcall() has two interfaces. It needs to be called by the x86 assembly code invoked by the APIC. Second, it needs to be called as a driver_filter_t for the XenPCI code and for architectures besides x86.
Unfortunately the driver_filter_t interface was implemented as a wrapper around the x86-APIC interface. Now create a simple wrapper for the x86-APIC code, which calls an architecture-independent xen_intr_handle_upcall().
When called via intr_event_handle(), driver_filter_t functions expect preemption to be disabled. This removes the need for critical_enter()/critical_exit() when called this way.
The lapic_eoi() call is only needed on x86 in some cases when invoked directly as an APIC vector handler.
Additionally driver_filter_t functions have no need to handle interrupt counters. The intrcnt_add() calling function was reworked to match the current situation. intrcnt_add() is now only called via one path.
The increment/decrement of curthread->td_intr_nesting_level had previously been left out. Appears this was mostly harmless, but this was noticed during implementation and has been added.
CONFIG_X86 is a leftover from use with Linux. While the barrier isn't needed for FreeBSD on x86, it will be needed for FreeBSD on other architectures.
Copyright note. xen_intr_intrcnt_add() was introduced at 76acc41fb7c7 by Justin T. Gibbs. xen_intrcnt_init() was introduced at fd036deac1695 by John Baldwin.
sys/x86/xen/xen_arch_intr.c was originally created by Julien Grall in 2015 for the purpose of holding the x86 interrupt interface. Later it was found xen_intr_handle_upcall() was better earlier, and the x86 interrupt interface better later. As such the filename and header list belong to Julien Grall, but what those were created for is later.
Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D30006
show more ...
|
#
2fee8756 |
| 23-Feb-2023 |
John-Mark Gurney <jmg@FreeBSD.org> |
abstract out the vm detection via smbios..
This makes the detection of VMs common between platforms that have SMBios.
Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D38800
|
#
e4d3f1e4 |
| 05-Feb-2023 |
Yuri <yuri@aetern.org> |
hv_hid: Hyper-V HID driver
Hyper-V HID driver using hidbus/hms.
Reviewed by: wulf MFC after: 1 week PR: 221074 Differential revision: https://reviews.freebsd.org/D38140
|
#
d969aeab |
| 14-Dec-2022 |
Li-Wen Hsu <lwhsu@FreeBSD.org> |
Complete retire cp(4)
Sponsored by: The FreeBSD Foundation
|
#
9729f076 |
| 27-Oct-2022 |
Souradeep Chakrabarti <schakrabarti@microsoft.com> |
arm64: Hyper-V: enablement for ARM64 in Hyper-V (Part 3, final)
This is the last part for ARM64 Hyper-V enablement. This includes commone files and make file changes to enable the ARM64 FreeBSD gues
arm64: Hyper-V: enablement for ARM64 in Hyper-V (Part 3, final)
This is the last part for ARM64 Hyper-V enablement. This includes commone files and make file changes to enable the ARM64 FreeBSD guest on Hyper-V. With this patch, it should be able to build the ARM64 image and install it on Hyper-V.
Reviewed by: emaste, andrew, whu Tested by: Souradeep Chakrabarti <schakrabarti@microsoft.com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D36744
show more ...
|
#
8c6e5d8c |
| 07-Sep-2022 |
Andrew Turner <andrew@FreeBSD.org> |
Import an optimized str{n}cmp on arm64
These are from the Arm Optimized Routines and don't use the VFP so are safe to use in the kernel.
Sponsored by: The FreeBSD Foundation
|
#
648edd63 |
| 09-Aug-2022 |
Mateusz Guzik <mjg@FreeBSD.org> |
x86: remove MP_WATCHDOG
It does not work with ULE, which is the default scheduler for over a decade.
Reviewed by: emaste, kib Differential Revision: https://reviews.freebsd.org/D36094
|
#
f4f56ff4 |
| 27-Jul-2022 |
Mark Johnston <markj@FreeBSD.org> |
qat: Rename to qat_c2xxx and remove support for modern chipsets
A replacement QAT driver will be imported, but this replacement does not support Atom C2xxx hardware. So, the existing driver will be
qat: Rename to qat_c2xxx and remove support for modern chipsets
A replacement QAT driver will be imported, but this replacement does not support Atom C2xxx hardware. So, the existing driver will be kept around to provide opencrypto offload support for those chipsets.
Reviewed by: pauamma, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35817
show more ...
|
#
d68cc5a8 |
| 07-Apr-2022 |
John Baldwin <jhb@FreeBSD.org> |
isci: Disable set but unused warnings.
|
#
e0516c75 |
| 13-Jan-2022 |
Roger Pau Monné <royger@FreeBSD.org> |
x86/apic: remove apic_ops
All supported Xen instances by FreeBSD provide a local APIC implementation, so there's no need to replace the native local APIC implementation anymore.
Leave just the ipi_
x86/apic: remove apic_ops
All supported Xen instances by FreeBSD provide a local APIC implementation, so there's no need to replace the native local APIC implementation anymore.
Leave just the ipi_vectored hook in order to be able to override it with an implementation based on event channels if the underlying local APIC is not virtualized by hardware. Note the hook cannot use ifuncs, because at the point where ifuncs are resolved the kernel doesn't yet know whether it will benefit from using the optimization.
Sponsored by: Citrix Systems R&D Reviewed by: kib Differential revision: https://reviews.freebsd.org/D33917
show more ...
|
#
a1198336 |
| 22-Nov-2021 |
N.J. Mann <njm@njm.me.uk> |
pchtherm: Let the driver be compiled into the kernel
PR: 259776 MFC after: 1 week
|
#
6aae3517 |
| 21-Oct-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Retire synchronous PPP kernel driver sppp(4).
The last two drivers that required sppp are cp(4) and ce(4).
These devices are still produced and can be purchased at Cronyx <http://cronyx.ru/hardware
Retire synchronous PPP kernel driver sppp(4).
The last two drivers that required sppp are cp(4) and ce(4).
These devices are still produced and can be purchased at Cronyx <http://cronyx.ru/hardware/wan.html>.
Since Roman Kurakin <rik@FreeBSD.org> has quit them, they no longer support FreeBSD officially. Later they have dropped support for Linux drivers to. As of mid-2020 they don't even have a developer to maintain their Windows driver. However, their support verbally told me that they could provide aid to a FreeBSD developer with documentaion in case if there appears a new customer for their devices.
These drivers have a feature to not use sppp(4) and create an interface, but instead expose the device as netgraph(4) node. Then, you can attach ng_ppp(4) with help of ports/net/mpd5 on top of the node and get your synchronous PPP. Alternatively you can attach ng_frame_relay(4) or ng_cisco(4) for HDLC. Actually, last time I used cp(4) back in 2004, using netgraph(4) instead of sppp(4) was already the right way to do.
Thus, remove the sppp(4) related part of the drivers and enable by default the negraph(4) part. Further maintenance of these drivers in the tree shouldn't be a big deal.
While doing that, remove some cruft and enable cp(4) compilation on amd64. The ce(4) for some unknown reason marks its internal DDK functions with __attribute__ fastcall, which most likely is safe to remove, but without hardware I'm not going to do that, so ce(4) remains i386-only.
Reviewed by: emaste, imp, donner Differential Revision: https://reviews.freebsd.org/D32590 See also: https://reviews.freebsd.org/D23928
show more ...
|
#
2b6eec53 |
| 12-Sep-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
x86: duplicate acpi_wakeup.c per i386 and amd64
The file as is is the maze of #ifdef passages, all slightly different. Divorcing i386 and amd64 version actually makes changing the code easier, also
x86: duplicate acpi_wakeup.c per i386 and amd64
The file as is is the maze of #ifdef passages, all slightly different. Divorcing i386 and amd64 version actually makes changing the code easier, also no changes for i386 are planned.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31931
show more ...
|