summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
Commit message (Collapse)AuthorAgeFilesLines
* MFC 278320,278336,278830,285621:jhb2016-02-011-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add devctl(8): a utility for manipulating new-bus devices. Note that this version does not include the 'suspend' and 'resume' commands present in HEAD as those depend on larger changes to the suspend and resume code in the kernel. 278320: Add a new device control utility for new-bus devices called devctl. This allows the user to request administrative changes to individual devices such as attach or detaching drivers or disabling and re-enabling devices. - Add a new /dev/devctl2 character device which uses ioctls for device requests. The ioctls use a common 'struct devreq' which is somewhat similar to 'struct ifreq'. - The ioctls identify the device to operate on via a string. This string can either by the device's name, or it can be a bus-specific address. (For unattached devices, a bus address is the only way to locate a device.) Bus drivers register an eventhandler to claim unrecognized device names that the driver recognizes as a valid address. Two buses currently support addresses: ACPI recognizes any device in the ACPI namespace via its full path starting with "\" and the PCI bus driver recognizes an address specification of 'pci[<domain>:]<bus>:<slot>:<func>' (identical to the PCI selector strings supported by pciconf). - To make it easier to cut and paste, change the PnP location string in the PCI bus driver to output a full PCI selector string rather than 'slot=<slot> function=<func>'. - Add a devctl(3) interface in libdevctl which provides a wrapper around the ioctls and is the preferred interface for other userland code. - Add a devctl(8) program which is a simple wrapper around the requests supported by devctl(3). - Add a resource_unset_value() function that can be used to remove a hint from the kernel environment. This is used to clear a hint.<driver>.<unit>.disabled hint when re-enabling a boot-time disabled device. 278336: Unbreak the build (memchr is explicitly required by devctl(9) after r278320) 278830: install the man page... 285621: Fix formatting. Approved by: re (marius)
* MFC r288446: Disable suspend during shutdown.cperciva2015-10-081-2/+5
|
* MFC: r283261jkim2015-06-012-11/+18
| | | | Do not probe Intel PIIX4 south bridge quirks on amd64.
* MFC r277796: hook userland threads suspend + resume into acpi suspend codeavg2015-05-111-0/+4
|
* MFC 281159:jhb2015-04-231-1/+1
| | | | | | | | | Move the message complaining about failed system resource allocations under bootverbose. Every example I've seen to date has been due to an ACPI system resource device reserving a range that overlaps with system memory (which ram0 attempts to reserve) or a local or I/O APIC (which apic0 attempts to reserve). These are always harmless but look scary to users.
* MFC r281462:kib2015-04-191-1/+4
| | | | Define capabilities bits from the revision 007 of the document 302223.
* MFC: r281396, r281475jkim2015-04-182-28/+28
| | | | | | Merge ACPICA 20150410. Relnotes: yes
* MFC r272444 (by jkim):dim2015-04-042-13/+9
| | | | | | | | | | | Merge ACPICA 20140926. MFC r278970 (by jkim): Merge ACPICA 20141107 and 20150204. Approved by: jkim Relnotes: yes
* MFC 276724:jhb2015-04-021-3/+14
| | | | | | | | | | On some Intel CPUs with a P-state but not C-state invariant TSC the TSC may also halt in C2 and not just C3 (it seems that in some cases the BIOS advertises its C3 state as a C2 state in _CST). Just play it safe and disable both C2 and C3 states if a user forces the use of the TSC as the timecounter on such CPUs. PR: 192316
* MFC 261790:jhb2015-04-012-1/+88
| | | | | | | | | | | | | | | | | | | | | | Add support for managing PCI bus numbers. As with BARs and PCI-PCI bridge I/O windows, the default is to preserve the firmware-assigned resources. PCI bus numbers are only managed if NEW_PCIB is enabled and the architecture defines a PCI_RES_BUS resource type. - Add a helper API to create top-level PCI bus resource managers for each PCI domain/segment. Host-PCI bridge drivers use this API to allocate bus numbers from their associated domain. - Change the PCI bus and CardBus drivers to allocate a bus resource for their bus number from the parent PCI bridge device. - Change the PCI-PCI and PCI-CardBus bridge drivers to allocate the full range of bus numbers from secbus to subbus from their parent bridge. The drivers also always program their primary bus register. The bridge drivers also support growing their bus range by extending the bus resource and updating subbus to match the larger range. - Add support for managing PCI bus resources to the Host-PCI bridge drivers used for amd64 and i386 (acpi_pcib, mptable_pcib, legacy_pcib, and qpi_pcib). - Define a PCI_RES_BUS resource type for amd64 and i386. PR: 197076
* MFC r271889, 272799, 272800, 274976scottl2015-03-123-8/+65
| | | | | | | | This brings in bus_get_domain() and the related reporting via devinfo, dmesg, and sysctl. Obtained from: adrian, jhb Sponsored by: Netflix, Inc.
* MFC r278871:kib2015-02-231-4/+3
| | | | Array cannot be NULL, remove always true comparision.
* MFC: r277594jkim2015-01-261-11/+7
| | | | Simplify retry loops.
* MFC: r277579jkim2015-01-261-13/+3
| | | | Revert r216942. This commit was premature and caused too many complaints.
* MFC r277318:cperciva2015-01-251-1/+1
| | | | | | | | | | | | | When disabling C3+ CPU states due to the CPU_QUIRK_NO_C3 quirk, don't accidentally enable non-existent states. This bug was triggered if ACPI advertises the presence of a C2 state which we fail to parse via acpi_PkgGas due to our lack of support for FFixedHW resources, and causes an immediate panic when an attempt is made to enter the (NULL) state. One affected platform is the EC2 c4.8xlarge VM instance type; there may be others.
* MFC 273598 273602 273607 273613 273647:rpaulo2014-11-031-6/+75
| | | | Userland HPET support.
* MFC r273733, r273740 and r273773:hselasky2014-10-301-5/+6
| | | | | | | | | | The SYSCTL data pointers can come from userspace and must not be directly accessed. Although this will work on some platforms, it can throw an exception if the pointer is invalid and then panic the kernel. Add a missing SYSCTL_IN() of "SCTP_BASE_STATS" structure. Sponsored by: Mellanox Technologies
* MFC 267883:jhb2014-07-241-5/+14
| | | | | | Expand r261243 even further and ignore any I/O port resources assigned to PCI root bridges except for the one known-valid case on x86 where bridges claim the I/O port registers used for PCI config space access.
* MFC 267647:jhb2014-06-271-13/+4
| | | | | Trust the state of a power resource that we get from a working _STA method instead of trying to cache it.
* MFC r257334, r257336, r257337, r257338, r257341, r257342, r257343, r257370,ian2014-05-141-1/+1
| | | | | | | r257368, r257416 Hints-only devices should return BUS_PROBE_NOWILDCARD from their probe methods.
* MFC r264849 & r264883smh2014-05-081-0/+4
| | | | | | | Exposed debug.acpi.max_tasks and debug.acpi.max_threads via sysctls so their values can be viewed. Sponsored by: Multiplay
* MFC r264878smh2014-05-081-1/+1
| | | | | | | Increase ACPI_MAX_TASKS to be 4 x the number of CPU's as 2 x was still insufficient on some machines Sponsored by: Multiplay
* MFC 261243:jhb2014-03-111-0/+16
| | | | | | | | | | | | | Some BIOSes incorrectly use standard memory resource ranges to list the memory ranges that they decode for downstream devices rather than creating ResourceProducer range resource entries. The result is that we allocate the full range to the PCI root bridge device causing allocations in child devices to all fail. As a workaround, ignore any standard memory resources on a PCI root bridge device. It is normal for a PCI root bridge to allocate an I/O resource for the I/O ports used for PCI config access, but I have not seen any PCI root bridges that legitimately allocate a memory resource.
* MFC r258779,r258780,r258787,r258822:eadler2014-02-041-2/+2
| | | | | | | | | | | | | Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this shifts into the sign bit. Instead use (1U << 31) which gets the expected result. Similar to the (1 << 31) case it is not defined to do (2 << 30). This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD.
* MFC r258164:mav2014-01-051-5/+11
| | | | | | | Handle case when ACPI reports HPET device, but does not provide memory resource for it. In such case take the address range from the HPET table. This fixes hpet(4) driver attach on Asrock C2750D4I board.
* MFC DMAR busdma implementation.kib2013-12-171-0/+29
| | | | | | | | | | | | | | | | | | | | | | MFC r257251: Import the driver for VT-d DMAR hardware. Implement the busdma(9) using DMARs. MFC r257512: Add support for queued invalidation. MFC miscellaneous follow-ups to r257251. MFC r257266: Remove redundand assignment to error variable and check for its value. MFC r257308: Remove redundand declaration. MFC r257511: Return BUS_PROBE_NOWILDCARD from the DMAR probe method. MFC r257860,r257896,r257900,r257902,r257903 (by dim): Fixes for gcc compilation.
* Add support for suspend/resume/migration operations when running as agibbs2013-09-201-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xen PVHVM guest. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Approved by: re (blanket Xen) MFC after: 2 weeks sys/amd64/amd64/mp_machdep.c: sys/i386/i386/mp_machdep.c: - Make sure that are no MMU related IPIs pending on migration. - Reset pending IPI_BITMAP on resume. - Init vcpu_info on resume. sys/amd64/include/intr_machdep.h: sys/i386/include/intr_machdep.h: sys/x86/acpica/acpi_wakeup.c: sys/x86/x86/intr_machdep.c: sys/x86/isa/atpic.c: sys/x86/x86/io_apic.c: sys/x86/x86/local_apic.c: - Add a "suspend_cancelled" parameter to pic_resume(). For the Xen PIC, restoration of interrupt services differs between the aborted suspend and normal resume cases, so we must provide this information. sys/dev/acpica/acpi_timer.c: sys/dev/xen/timer/timer.c: sys/timetc.h: - Don't swap out "suspend safe" timers across a suspend/resume cycle. This includes the Xen PV and ACPI timers. sys/dev/xen/control/control.c: - Perform proper suspend/resume process for PVHVM: - Suspend all APs before going into suspension, this allows us to reset the vcpu_info on resume for each AP. - Reset shared info page and callback on resume. sys/dev/xen/timer/timer.c: - Implement suspend/resume support for the PV timer. Since FreeBSD doesn't perform a per-cpu resume of the timer, we need to call smp_rendezvous in order to correctly resume the timer on each CPU. sys/dev/xen/xenpci/xenpci.c: - Don't reset the PCI interrupt on each suspend/resume. sys/kern/subr_smp.c: - When suspending a PVHVM domain make sure there are no MMU IPIs in-flight, or we will get a lockup on resume due to the fact that pending event channels are not carried over on migration. - Implement a generic version of restart_cpus that can be used by suspended and stopped cpus. sys/x86/xen/hvm.c: - Implement resume support for the hypercall page and shared info. - Clear vcpu_info so it can be reset by APs when resuming from suspension. sys/dev/xen/xenpci/xenpci.c: sys/x86/xen/hvm.c: sys/x86/xen/xen_intr.c: - Support UP kernel configurations. sys/x86/xen/xen_intr.c: - Properly rebind per-cpus VIRQs and IPIs on resume.
* acpi_thermal: Warn about insane _TMP temperature only oncedumbbell2013-08-301-5/+26
| | | | | | | A warning is emitted again if the temperature became briefly valid meanwhile. This avoids spamming the user when the sensor is broken. Other values (ie. not _TMP) always raise a warning.
* Tidy up global locks for ACPICA. There is no functional change.jkim2013-08-131-12/+10
|
* Workaround some broken BIOSes that specify edge-sensitive but active-lowjhb2013-07-161-0/+11
| | | | | | | | | | settings for ACPI-enumerated serial ports by forcing any IRQs that use an ISA IRQ value with these settings to active-high instead of active-low. This is known to occur with the BIOS on an Intel D2500CCE motherboard. Tested by: Robert Ames <robertames@hotmail.com>, lev Submitted by: Juergen Weiss weiss at uni-mainz.de (original patch)
* Don't perform the acpi_DeviceIsPresent() check for PCI-PCI bridges. Ifjhb2013-07-032-10/+7
| | | | | | | | | | | | | | we are probing a PCI-PCI bridge it is because we found one by enumerating the devices on a PCI bus, so the bridge is definitely present. A few BIOSes report incorrect status (_STA) for some bridges that claimed they were not present when in fact they were. While here, move this check earlier for Host-PCI bridges so attach fails before doing any work that needs to be torn down. PR: kern/91594 Tested by: Jack Vogel @ Intel MFC after: 1 week
* Consistently cast ACPICA 64-bit integer types when we print them.jkim2013-06-261-1/+1
|
* Merge ACPICA 20130517.jkim2013-05-201-3/+7
|
* - Prefer ACPI_COMPARE_NAME(a, b) macro over strncmp(a, b, ACPI_NAME_SIZE).jkim2013-05-201-9/+8
| | | | | - Make sure the predefined name is a string type. - Return slightly more useful errors.
* Fix white spaces.jkim2013-05-201-33/+31
|
* - Some BIOSes use an Extended IRQ resource descriptor in _PRS for a linkjhb2013-04-222-2/+12
| | | | | | | | | | that uses non-ISA IRQs but use a plain IRQ resource in _CRS. However, a non-ISA IRQ can't fit into a plain IRQ resource. If we encounter a link like this, build the resource buffer from _PRS instead of _CRS. - Set the correct size of the end tag in a resource buffer. Tested by: Benjamin Lee <ben@b1c1l1.com> MFC after: 2 weeks
* Fix a typo in a comment.rpaulo2013-03-171-1/+1
|
* Add "else" missed at r248154.mav2013-03-111-1/+1
|
* Reduce HPET eventtimer priority on systems with 8 or more cores. Price ofmav2013-03-111-1/+2
| | | | the lock congestion may be too high there (2.5% on 4x4 core AMD Opteron).
* MFcalloutng:mav2013-02-281-17/+9
| | | | | | | Switch eventtimers(9) from using struct bintime to sbintime_t. Even before this not a single driver really supported full dynamic range of struct bintime even in theory, not speaking about practical inexpediency. This change legitimates the status quo and cleans up the code.
* MFcalloutng (r247427 by mav):davide2013-02-281-2/+2
| | | | | We don't need any precision here. Let it be fast and dirty shift then slow and excessively precise 64-bit division.
* MFcalloutng:davide2013-02-281-4/+7
| | | | | | | | | | | When CPU becomes idle, cpu_idleclock() calculates time to the next timer event in order to reprogram hw timer. Return that time in sbintime_t to the caller and pass it to acpi_cpu_idle(), where it can be used as one more factor (quite precise) to extimate furter sleep time and choose optimal sleep state. This is a preparatory change for further callout improvements will be committed in the next days. The commmit is not targeted for MFC.
* revert accidentally committed unneeded changes from r246250avg2013-02-021-2/+2
| | | | | MFC after: 7 days X-MFC with: r246250
* acpi: clear power button status bit after waking up...avg2013-02-021-0/+25
| | | | | | | | so that it is not confused for a new power off request. Learned from: Linux and ACPI specification Tested by: gjb MFC after: 12 days
* acpi: after wakeup from a state > S1 re-enable SCI_EN with a direct writeavg2013-02-021-2/+15
| | | | | | | | | | | This hack is picked up from Linux, which claims that it follows Windows behavior. PR: amd64/174409 Tested by: Sergey V. Dyatko <sergey.dyatko@gmail.com>, KAHO Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>, Slawa Olhovchenkov <slw@zxy.spb.ru> MFC after: 13 days
* Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on ↵sbz2013-01-3017-18/+18
| | | | | | | device_method_t arrays Reviewed by: cognet Approved by: cognet
* Fix two misusages of return_*() macros for ACPICA.jkim2013-01-282-2/+6
| | | | Noticed by: avg
* Fix white spaces for style consistency.jkim2013-01-282-7/+6
|
* Merge ACPICA 20130117.jkim2013-01-171-1/+3
|
* Remove not very useful printf, that can be too chatty.mav2013-01-101-8/+1
| | | | | | | | ASUS P8Z77-V board reports _AC2, _AC3 and _AC4 setpoints as 0C. With active cooling already automatically set to _AC2, that still caused driver to print two useless lines about temperature above _AC3 and _AC4 every ten seconds. Three setponts of 0C is probably a board bug, but the same spam could happen also in correct case if system is runnign not with the lowest cooling level.
OpenPOWER on IntegriCloud