#
7dd1f0dc |
| 26-Oct-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
acpica: add domain ivar
Specialize acpi bus_get_domain method to read ivar. Execute and cache the _PXM result in the ivar at namespace enumeration time.
If there is no _PXM, driver for the child ca
acpica: add domain ivar
Specialize acpi bus_get_domain method to read ivar. Execute and cache the _PXM result in the ivar at namespace enumeration time.
If there is no _PXM, driver for the child can set the ivar to the value obtained by other means.
Move acpi_get_domain() to acpi_pci.c, it now serves pci buses and devices on them.
Suggested and reviewed by: jhb Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D47291
show more ...
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
916a5d8a |
| 19-Apr-2022 |
John Baldwin <jhb@FreeBSD.org> |
acpi: Remove unused devclass arguments to DRIVER_MODULE.
|
#
d0a20e40 |
| 28-Feb-2022 |
Warner Losh <imp@FreeBSD.org> |
Add UEFI locator for bus_get_device_path, pci acpi
Add a UEFI locator type. It prints the UEFI device names for a FreeBSD device_t name. It works with PCI and ACPI device nodes. USB forthcoming.
Sp
Add UEFI locator for bus_get_device_path, pci acpi
Add a UEFI locator type. It prints the UEFI device names for a FreeBSD device_t name. It works with PCI and ACPI device nodes. USB forthcoming.
Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D32749
show more ...
|
#
cae7d9ec |
| 28-Feb-2022 |
Warner Losh <imp@FreeBSD.org> |
bus: Add ACPI locator support
Add support for printing ACPI paths. This is a bit of a degenerate case for this interface since it's always just the device handle if the device has one. But it is ill
bus: Add ACPI locator support
Add support for printing ACPI paths. This is a bit of a degenerate case for this interface since it's always just the device handle if the device has one. But it is illustrtive of how to do this for a few nodes in the tree.
Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D32748
show more ...
|
#
c6df6f53 |
| 10-Dec-2021 |
Warner Losh <imp@FreeBSD.org> |
Create wrapper for Giant taken for newbus
Create a wrapper for newbus to take giant and for busses to take it too. bus_topo_lock() should be called before interacting with newbus routines and unlock
Create wrapper for Giant taken for newbus
Create a wrapper for newbus to take giant and for busses to take it too. bus_topo_lock() should be called before interacting with newbus routines and unlocked with bus_topo_unlock(). If you need the topology lock for some reason, bus_topo_mtx() will provide that.
Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D31831
show more ...
|
Revision tags: release/12.3.0 |
|
#
ddfc9c4c |
| 23-Jun-2021 |
Warner Losh <imp@FreeBSD.org> |
newbus: Move from bus_child_{pnpinfo,location}_src to bus_child_{pnpinfo,location} with sbuf
Now that the upper layers all go through a layer to tie into these information functions that translates
newbus: Move from bus_child_{pnpinfo,location}_src to bus_child_{pnpinfo,location} with sbuf
Now that the upper layers all go through a layer to tie into these information functions that translates an sbuf into char * and len. The current interface suffers issues of what to do in cases of truncation, etc. Instead, migrate all these functions to using struct sbuf and these issues go away. The caller is also in charge of any memory allocation and/or expansion that's needed during this process.
Create a bus_generic_child_{pnpinfo,location} and make it default. It just returns success. This is for those busses that have no information for these items. Migrate the now-empty routines to using this as appropriate.
Document these new interfaces with man pages, and oversight from before.
Reviewed by: jhb, bcr Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D29937
show more ...
|
Revision tags: release/13.0.0, release/12.2.0 |
|
#
6186bfbd |
| 29-Sep-2020 |
Ruslan Bukin <br@FreeBSD.org> |
Rename kernel option ACPI_DMAR to IOMMU. This is mostly needed for a common arm64/amd64 iommu code.
Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D265
Rename kernel option ACPI_DMAR to IOMMU. This is mostly needed for a common arm64/amd64 iommu code.
Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D26587
show more ...
|
#
025730aa |
| 29-Sep-2020 |
Ruslan Bukin <br@FreeBSD.org> |
o Rename acpi_iommu_get_dma_tag() -> iommu_get_dma_tag(). This function isn't ACPI dependent and we may use it on FDT systems as well. o Don't repeat the function declaration, include iommu.h ins
o Rename acpi_iommu_get_dma_tag() -> iommu_get_dma_tag(). This function isn't ACPI dependent and we may use it on FDT systems as well. o Don't repeat the function declaration, include iommu.h instead.
Reviewed by: andrew, kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D26584
show more ...
|
#
82c28121 |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
acpica: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0 |
|
#
43843cc2 |
| 26-May-2020 |
Ruslan Bukin <br@FreeBSD.org> |
Rename dmar_get_dma_tag() to acpi_iommu_get_dma_tag(). This is needed for a new IOMMU controller support.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D24943
|
Revision tags: release/12.1.0 |
|
#
65db3aa8 |
| 15-Oct-2019 |
John Baldwin <jhb@FreeBSD.org> |
Install an ACPI PCI bus notify handler.
Rescan a PCI bus when the ACPI_NOTIFY_BUS_CHECK event is posted to a PCI bus.
Reviewed by: scottl MFC after: 2 weeks Differential Revision: https://reviews.f
Install an ACPI PCI bus notify handler.
Rescan a PCI bus when the ACPI_NOTIFY_BUS_CHECK event is posted to a PCI bus.
Reviewed by: scottl MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D21948
show more ...
|
#
8c9861f5 |
| 15-Oct-2019 |
John Baldwin <jhb@FreeBSD.org> |
Support hot insertion and removal of PCI devices on EC2.
Install ACPI notify handlers on PCI devices with an _EJ0 method. This handler is invoked when devices are added or removed.
- When an ACPI_
Support hot insertion and removal of PCI devices on EC2.
Install ACPI notify handlers on PCI devices with an _EJ0 method. This handler is invoked when devices are added or removed.
- When an ACPI_NOTIFY_DEVICE_CHECK event posts, rescan the parent bus device. Note that strictly speaking we only need to rescan the specified device, but BUS_RESCAN is what is available, so we rescan the entire bus. - When an ACPI_NOTIFY_EJECT_REQUEST event posts, detach the device associated with the ACPI handle, invoke the _EJ0 method, and then delete the device.
Eventually this might be changed to vector notify events to devd in userspace where devctl can be used instead to permit more complex actions such as graceful unmounting of filesystems.
Tested by: cperciva Reviewed by: cperciva, imp, scottl MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D21948
show more ...
|
Revision tags: 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 |
|
#
8d791e5a |
| 09-May-2016 |
John Baldwin <jhb@FreeBSD.org> |
Add a new bus method to fetch device-specific CPU sets.
bus_get_cpus() returns a specified set of CPUs for a device. It accepts an enum for the second parameter that indicates the type of cpuset to
Add a new bus method to fetch device-specific CPU sets.
bus_get_cpus() returns a specified set of CPUs for a device. It accepts an enum for the second parameter that indicates the type of cpuset to request. Currently two valus are supported:
- LOCAL_CPUS (on x86 this returns all the CPUs in the package closest to the device when DEVICE_NUMA is enabled) - INTR_CPUS (like LOCAL_CPUS but only returns 1 SMT thread for each core)
For systems that do not support NUMA (or if it is not enabled in the kernel config), LOCAL_CPUS fails with EINVAL. INTR_CPUS is mapped to 'all_cpus' by default. The idea is that INTR_CPUS should always return a valid set.
Device drivers which want to use per-CPU interrupts should start using INTR_CPUS instead of simply assigning interrupts to all available CPUs. In the future we may wish to add tunables to control the policy of INTR_CPUS (e.g. should it be local-only or global, should it ignore SMT threads or not).
The x86 nexus driver exposes the internal set of interrupt CPUs from the the x86 interrupt code via INTR_CPUS.
The ACPI bus driver and PCI bridge drivers use _PXM to return a suitable LOCAL_CPUS set when _PXM exists and DEVICE_NUMA is enabled. They also and the global INTR_CPUS set from the nexus driver with the per-domain set from _PXM to generate a local INTR_CPUS set for child devices.
Compared to the r298933, this version uses 'struct _cpuset' in <sys/bus.h> instead of 'cpuset_t' to avoid requiring <sys/param.h> (<sys/_cpuset.h> still requires <sys/param.h> for MAXCPU even though <sys/_bitset.h> does not after recent changes).
show more ...
|
#
8a08b7d3 |
| 03-May-2016 |
John Baldwin <jhb@FreeBSD.org> |
Revert bus_get_cpus() for now.
I really thought I had run this through the tinderbox before committing, but many places need <sys/types.h> -> <sys/param.h> for <sys/bus.h> now.
|
#
bc153c69 |
| 02-May-2016 |
John Baldwin <jhb@FreeBSD.org> |
Add a new bus method to fetch device-specific CPU sets.
bus_get_cpus() returns a specified set of CPUs for a device. It accepts an enum for the second parameter that indicates the type of cpuset to
Add a new bus method to fetch device-specific CPU sets.
bus_get_cpus() returns a specified set of CPUs for a device. It accepts an enum for the second parameter that indicates the type of cpuset to request. Currently two valus are supported:
- LOCAL_CPUS (on x86 this returns all the CPUs in the package closest to the device when DEVICE_NUMA is enabled) - INTR_CPUS (like LOCAL_CPUS but only returns 1 SMT thread for each core)
For systems that do not support NUMA (or if it is not enabled in the kernel config), LOCAL_CPUS fails with EINVAL. INTR_CPUS is mapped to 'all_cpus' by default. The idea is that INTR_CPUS should always return a valid set.
Device drivers which want to use per-CPU interrupts should start using INTR_CPUS instead of simply assigning interrupts to all available CPUs. In the future we may wish to add tunables to control the policy of INTR_CPUS (e.g. should it be local-only or global, should it ignore SMT threads or not).
The x86 nexus driver exposes the internal set of interrupt CPUs from the the x86 interrupt code via INTR_CPUS.
The ACPI bus driver and PCI bridge drivers use _PXM to return a suitable LOCAL_CPUS set when _PXM exists and DEVICE_NUMA is enabled. They also and the global INTR_CPUS set from the nexus driver with the per-domain set from _PXM to generate a local INTR_CPUS set for child devices.
Reviewed by: wblock (manpage) Differential Revision: https://reviews.freebsd.org/D5519
show more ...
|
#
0edd2576 |
| 16-Apr-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
6cd99ae8 |
| 15-Apr-2016 |
John Baldwin <jhb@FreeBSD.org> |
Add a new PCI bus interface method to alloc the ivars (dinfo) for a device.
The ACPI and OFW PCI bus drivers as well as CardBus override this to allocate the larger ivars to hold additional info bey
Add a new PCI bus interface method to alloc the ivars (dinfo) for a device.
The ACPI and OFW PCI bus drivers as well as CardBus override this to allocate the larger ivars to hold additional info beyond the stock PCI ivars.
This removes the need to pass the size to functions like pci_add_iov_child() and pci_read_device() simplifying IOV and bus rescanning implementations.
As a result of this and earlier changes, the ACPI PCI bus driver no longer needs its own device_attach and pci_create_iov_child methods but can use the methods in the stock PCI bus driver instead.
Differential Revision: https://reviews.freebsd.org/D5891
show more ...
|
#
876d357f |
| 11-Apr-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
65252317 |
| 07-Apr-2016 |
John Baldwin <jhb@FreeBSD.org> |
Associate device_t objects with ACPI handles via PCI_CHILD_ADDED().
Previously, the ACPI PCI bus driver did a single pass over the devices in the namespace that were a child of a given PCI bus to as
Associate device_t objects with ACPI handles via PCI_CHILD_ADDED().
Previously, the ACPI PCI bus driver did a single pass over the devices in the namespace that were a child of a given PCI bus to associate the PCI bus-enumerated device_t devices with the corresponding ACPI handles. However, this meant that handles were only established at runtime for devices found during the initial PCI bus scan.
PCI_IOV adds devices that show up after the initial PCI bus scan, and coming changes to add a bus rescan can also add devices after the initial scan.
This change adds a pci_child_added() callback to the ACPI PCI bus that walks the namespace to find the ACPI handle for each device that is added. Using a callback means that the handle is correctly set for any device no matter how it is added (initial scan, IOV, or a bus rescan).
show more ...
|
#
496dfa89 |
| 06-Apr-2016 |
John Baldwin <jhb@FreeBSD.org> |
Convert pci_delete_child() to a bus_child_deleted() method.
Instead of providing a wrapper around device_delete_child() that the PCI bus and child bus drivers must call explicitly, move the bulk of
Convert pci_delete_child() to a bus_child_deleted() method.
Instead of providing a wrapper around device_delete_child() that the PCI bus and child bus drivers must call explicitly, move the bulk of the logic from pci_delete_child() into a bus_child_deleted() method (pci_child_deleted()). This allows PCI devices to be safely deleted via device_delete_child(). - Add a bus_child_deleted method to the ACPI PCI bus which clears the device_t associated with the corresponding ACPI handle in addition to the normal PCI bus cleanup. - Change cardbus_detach_card to call device_delete_children() and move CardBus-specific delete logic into a new cardbus_child_deleted() method. - Use device_delete_child() instead of pci_delete_child() in the SRIOV code. - Add a bus_child_deleted method to the OpenFirmware PCI bus drivers which frees the OpenFirmware device info for each PCI device.
Reviewed by: imp Tested on: amd64 (CardBus and PCI-e hotplug) Differential Revision: https://reviews.freebsd.org/D5831
show more ...
|
Revision tags: release/10.3.0, release/10.2.0 |
|
#
98e0ffae |
| 27-May-2015 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge sync of head
|
#
e6e746bf |
| 25-Mar-2015 |
Glen Barber <gjb@FreeBSD.org> |
MFH: r278968-r280640
Sponsored by: The FreeBSD Foundation
|
#
fa1e92b6 |
| 04-Mar-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
ca65be80 |
| 04-Mar-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r279313 through r279595.
|