#
e2e050c8 |
| 20-May-2019 |
Conrad Meyer <cem@FreeBSD.org> |
Extract eventfilter declarations to sys/_eventfilter.h
This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h" in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces hea
Extract eventfilter declarations to sys/_eventfilter.h
This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h" in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header pollution substantially.
EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c files into appropriate headers (e.g., sys/proc.h, powernv/opal.h).
As a side effect of reduced header pollution, many .c files and headers no longer contain needed definitions. The remainder of the patch addresses adding appropriate includes to fix those files.
LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required by sys/mutex.h since r326106 (but silently protected by header pollution prior to this change).
No functional change (intended). Of course, any out of tree modules that relied on header pollution for sys/eventhandler.h, sys/lock.h, or sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped.
show more ...
|
#
9e43c218 |
| 10-Feb-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r343807 through r343955.
|
#
9088a475 |
| 07-Feb-2019 |
Jayachandran C. <jchandra@FreeBSD.org> |
arm64 acpi: Add support for IORT table
Add new file arm64/acpica/acpi_iort.c to support the "IO Remapping Table" (IORT). The table is specified in ARM document "ARM DEN 0049D" titled "IO Remapping T
arm64 acpi: Add support for IORT table
Add new file arm64/acpica/acpi_iort.c to support the "IO Remapping Table" (IORT). The table is specified in ARM document "ARM DEN 0049D" titled "IO Remapping Table Platform Design Document". The IORT table has information on the associations between PCI root complexes, SMMU blocks and GIC ITS blocks in the system.
The changes are to parse and save the information in the IORT table. The API to use this information is added to sys/dev/acpica/acpivar.h.
The acpi_iort.c also has code to check the GIC ITS nodes seen in the IORT table with corresponding entries in MADT table (for validity) and with entries in SRAT table (for proximity information).
Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D18002
show more ...
|
#
67350cb5 |
| 09-Dec-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r340918 through r341763.
|
#
9417fa9e |
| 08-Dec-2018 |
Jayachandran C. <jchandra@FreeBSD.org> |
acpica : move SRAT/SLIT parsing to sys/dev/acpica
This moves the architecture independent parts of sys/x86/acpica/srat.c to sys/dev/acpica/acpi_pxm.c, to be used later on arm64. The function declara
acpica : move SRAT/SLIT parsing to sys/dev/acpica
This moves the architecture independent parts of sys/x86/acpica/srat.c to sys/dev/acpica/acpi_pxm.c, to be used later on arm64. The function declarations are moved to sys/dev/acpica/acpivar.h
We also need to update sys/conf/files.{i386,amd64} to use the new file. No functional changes.
Reviewed by: markj, imp Differential Revision: https://reviews.freebsd.org/D17941
show more ...
|
Revision tags: release/12.0.0 |
|
#
3d5db455 |
| 24-Nov-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r340427 through r340868.
|
#
d4d6ad3f |
| 19-Nov-2018 |
Jayachandran C. <jchandra@FreeBSD.org> |
acpica: rework INTRNG interrupts
On arm64 (where INTRNG is enabled), the interrupts have to be mapped with ACPI_BUS_MAP_INTR() before adding them as resources to devices.
The earlier code did the m
acpica: rework INTRNG interrupts
On arm64 (where INTRNG is enabled), the interrupts have to be mapped with ACPI_BUS_MAP_INTR() before adding them as resources to devices.
The earlier code did the mapping before calling acpi_set_resource(), which bypassed code that checked for PCI link interrupts.
To fix this, move the call to map interrupts into acpi_set_resource() and that requires additional work to lookup interrupt properties. The changes here are to: * extend acpi_lookup_irq_handler() to lookup an irq in the ACPI resources * create a helper function acpi_map_intr() which uses the updated acpi_lookup_irq_handler() to look up an irq, and then map it with ACPI_BUS_MAP_INTR() * use acpi_map_intr() in acpi_pcib_route_interrupt() to map pci link interrupts.
With these changes, we can drop the ifdefs in acpi_resource.c, and we can also drop the call for mapping interrupts in generic_timer.c
Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D17790
show more ...
|
#
fda9adaf |
| 27-Oct-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r339670 through r339812.
|
#
5efca36f |
| 26-Oct-2018 |
Takanori Watanabe <takawata@FreeBSD.org> |
Distinguish _CID match and _HID match and make lower priority probe when _CID match.
Reviewed by: jhb, imp Differential Revision:https://reviews.freebsd.org/D16468
|
#
c6879c6c |
| 23-Oct-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r339015 through r339669.
|
#
8fd10880 |
| 22-Oct-2018 |
Ben Widawsky <bwidawsk@FreeBSD.org> |
acpi: Add an interface to obtain DSM information
The Device Specific Method (_DSM) is on optional object that defines device specific controls. This will be useful for our power management controlle
acpi: Add an interface to obtain DSM information
The Device Specific Method (_DSM) is on optional object that defines device specific controls. This will be useful for our power management controller in upcoming patches. More information can be found in ACPI spec 6.2 section 9.1.1
https://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf
This patch had a minor modification changing ENOMEM to AE_NO_MEMORY after it got review and approval but before committing.
Test Plan: Tested in my s0ix branch
Reviewed by: kib Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D17121
show more ...
|
Revision tags: release/11.2.0 |
|
#
ba425ae4 |
| 15-Mar-2018 |
Jung-uk Kim <jkim@FreeBSD.org> |
Remove local definitions for _STA method in favor of ACPICA.
These macros were added in ACPICA 20051216, more than a decade ago.
|
#
c79126f2 |
| 12-Jan-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r327624 through r327885.
|
#
224c3776 |
| 11-Jan-2018 |
Andrew Turner <andrew@FreeBSD.org> |
Add the start of INTRNG support for ACPI.
This adds a new acpi_bus interface with a map_intr method. This is similar to the Open Firmware map_intr method and allows us to create the needed mapping f
Add the start of INTRNG support for ACPI.
This adds a new acpi_bus interface with a map_intr method. This is similar to the Open Firmware map_intr method and allows us to create the needed mapping from ACPI space to INTRNG space.
Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8617
show more ...
|
Revision tags: release/10.4.0, release/11.1.0 |
|
#
be27b311 |
| 04-May-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r317503 through r317807.
|
#
1ffd07bd |
| 27-Apr-2017 |
John Baldwin <jhb@FreeBSD.org> |
Various fixes for PCI _OSC handling so HotPlug works again.
- Rename the default implementation of 'pcib_request_feature' and add a pcib_request_feature() wrapper function (as is often done for
Various fixes for PCI _OSC handling so HotPlug works again.
- Rename the default implementation of 'pcib_request_feature' and add a pcib_request_feature() wrapper function (as is often done for new-bus APIs implemented via kobj) that accepts a single function. Previously the call to pcib_request_feature() ended up invoking the method on the great-great-grandparent of the bridge device instead of the grandparent. For a bridge that was a direct child of pci0 on x86 this resulted in the method skipping over the Host-PCI bridge driver and being invoked against nexus0 - When invoking _OSC from a Host-PCI bridge driver, invoke device_get_softc() against the Host-PCI bridge device instead of the child bridge that is requesting HotPlug. Using the wrong softc data resulted in garbage being passed for the ACPI handle causing the _OSC call to fail. - While here, perform some other cleanups to _OSC handling in the ACPI Host-PCI bridge driver: - Don't invoke _OSC when requesting a control that has already been granted by the firmware. - Don't set the first word of the capability array before invoking _OSC. This word is always set explicitly by acpi_EvaluateOSC() since it is UUID-independent. - Don't modify the set of granted controls unless _OSC doesn't exist (which is treated as always successful), or the _OSC method doesn't fail. - Don't require an _OSC status of 0 for success. _OSC always returns the updated control mask even if it returns a non-zero status in the first word. - Whine if _OSC ever tries to revoke a previously-granted control. (It is not supposed to do that.) - While here, add constants for the _OSC status word in acpivar.h (though currently unused).
Reported by: adrian Reviewed by: imp MFC after: 1 week Tested on: Lenovo x220 Differential Revision: https://reviews.freebsd.org/D10520
show more ...
|
#
3ffd3530 |
| 16-Dec-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r309817 through r310168.
|
#
0e68afe5 |
| 16-Dec-2016 |
Andrew Turner <andrew@FreeBSD.org> |
Add support to read the _CLS entry if it's present. It is used by memory-mapped devices that are normally PCIe drives. Devices can then use the existing pci_get_class, etc. accessors to query this da
Add support to read the _CLS entry if it's present. It is used by memory-mapped devices that are normally PCIe drives. Devices can then use the existing pci_get_class, etc. accessors to query this data.
The ivar values are different enough from the existing ACPI and ISA values to not conflict.
Reviewed by: jhb Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8721
show more ...
|
Revision tags: 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 ...
|
#
1b424b56 |
| 27-Apr-2016 |
John Baldwin <jhb@FreeBSD.org> |
Adjust prototypes for NUMA-related functions to match the style of the rest of this file.
|
#
4c26ac69 |
| 22-Apr-2016 |
John Baldwin <jhb@FreeBSD.org> |
Optionally return the output capabilities list from _OSC.
Both of the callers were expecting the input cap_set to be modified. This fixes them to request cap_set to be updated with the returned buff
Optionally return the output capabilities list from _OSC.
Both of the callers were expecting the input cap_set to be modified. This fixes them to request cap_set to be updated with the returned buffer.
Reviewed by: jkim Differential Revision: https://reviews.freebsd.org/D6040
show more ...
|
#
cad6d222 |
| 20-Apr-2016 |
Jung-uk Kim <jkim@FreeBSD.org> |
Remove query flag from acpi_EvaluateOSC(). This function does not support return buffer (yet).
|
#
5f3dd91a |
| 20-Apr-2016 |
John Baldwin <jhb@FreeBSD.org> |
Add a wrapper for evaluating _OSC methods.
This wrapper does not translate errors in the first word to ACPI error status returns. Use this wrapper in the acpi_cpu(4) driver in place of the existing
Add a wrapper for evaluating _OSC methods.
This wrapper does not translate errors in the first word to ACPI error status returns. Use this wrapper in the acpi_cpu(4) driver in place of the existing _OSC code. While here, fix a bug where the wrong count of words was passed when invoking _OSC.
Reviewed by: jkim MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D6022
show more ...
|