summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
Commit message (Collapse)AuthorAgeFilesLines
* Completely back out 1.37. Something else is going on and John wants tonjl2004-12-011-9/+0
| | | | keep the locking and solve the real problem.
* Fix "Lock ACPI PCI link not exclusively lockedobrien2004-12-011-0/+12
| | | | | | @sys/dev/acpica/acpi_pci_link.c:153" panic by backing out rev 1.37 in the SMP case. It appears that on a dual-proc machine the assertions in the rev 1.37 commit log hold true.
* Don't bother locking in attach(). At boot time, we're single-threadednjl2004-11-301-4/+1
| | | | | anyway and for some reason, witness seems confused about what's already locked and triggers a false panic.
* Make sure the link array is big enough to hold both _CRS and _PRSnjl2004-11-301-8/+30
| | | | | | | | | | | | resource lists. It used to be sized based only on _CRS, hence _PRS could perform an out-of-bounds access if it was larger (i.e., when there are dependent functions). Add asserts to detect this case. Note, this is only a temporary fix and I believe _PRS and _CRS should have separate arrays. Also, fix a typo where the wrong irq was being check for the APIC case. Submitted by: tegge
* Instead of translating PCI to ACPI power states, just use a CTASSERTnjl2004-11-291-18/+10
| | | | that they are equivalent.
* Temporarily disable programming IRQ links on resume. The new code hangsnjl2004-11-261-0/+2
| | | | several of my systems.
* - Remove some no longer used constants.jhb2004-11-231-8/+3
| | | | - Sort function prototypes.
* Rework the ACPI PCI link code.jhb2004-11-235-1060/+697
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use a new-bus device driver for the ACPI PCI link devices. The devices are called pci_linkX. The driver includes suspend/resume support so that the ACPI bridge drivers no longer have to poke the links to get them to handle suspend/resume. Also, the code to handle which IRQs a link is routed to and choosing an IRQ when a link is not already routed is all contained in the link driver. The PCI bridge drivers now ask the link driver which IRQ to use once they determine that a _PRT entry does not use a hardwired interrupt number. - The new link driver includes support for multiple IRQ resources per link device as well as preserving any non-IRQ resources when adjusting the IRQ that a link is routed to. - The entire approach to routing when using a link device is now link-centric rather than pci bus/device/pin specific. Thus, when using a tunable to override the default IRQ settings, one now uses a single tunable to route an entire link rather than routing a single device that uses the link (which has great foot-shooting potential if the user tries to route the same link to two different IRQs using two different pci bus/device/pin hints). For example, to adjust the IRQ that \_SB_.LNKA uses, one would set 'hw.pci.link.LNKA.irq=10' from the loader. - As a side effect of having the link driver, unused link devices will now be disabled when they are probed. - The algorithm for choosing an IRQ for a link that doesn't already have an IRQ assigned is now much closer to the one used in $PIR routing. When a link is routed via an ISA IRQ, only known-good IRQs that the BIOS has already used are used for routing instead of using probabilities to guess at which IRQs are probably not used by an ISA device. One change from $PIR is that the SCI is always considered a viable ISA IRQ, so that if the BIOS does not setup any IRQs the kernel will degenerate to routing all interrupts over the SCI. For non ISA IRQs, interrupts are picked from the possible pool using a simplistic weighting algorithm. Tested by: ru, scottl, others on acpi@ Reviewed by: njl
* Enable throttling/C3 quirks for PIIX4 parts. Defer checking quirks untilnjl2004-11-161-9/+21
| | | | | | | | | after boot so that PCI is initialized and we can probe for the problem chipsets. Note that while probed but unusable states are disabled, they aren't freed yet. In the future, it may make sense to detach them. Tested by: Adam K Kirchoff <adamk at voicenet com> MFC after: 2 days
* After discussions with Nate, repo copy the acpi assist drivers fromimp2004-11-151-168/+0
| | | | | | | | | | i386 to dev/acpi_support. In theory, these devices could be found other than in i386 machines only as amd64 becomes more popular. These drivers don't appear to do anything i386 specific, so move them to dev/acpi_support. Move config lines to files so that those architectures that don't support kernel modules can build them into the kernel. At the same time, rename acpi_snc to acpi_sony to follow the lead of all the other specialty devices.
* s/return_VALUE/return / to fix build breakage when ACPI_DEBUG istruckman2004-11-141-3/+3
| | | | defined.
* Kill ACPI_FUNCTION_TRACE. It is killing the tinderbox build, and itimp2004-11-131-10/+6
| | | | | | | | isn't worth adding to the modules lists that we have to hard code for this to work. Since we print PID right away, we have a trace point already. Minor knf while I'm here.
* Commit takawata-san's Sony Notebook Controller driver, integrated intoimp2004-11-111-0/+172
| | | | | | | | the tree. Small tweaks were made by myself to eliminate unnecessary includes and some other minor issues. Last time I asked takawata-san about this driver, he suggested I commit it. Submitted by: takawata
* Only warn about missing _PRT tables if bootverbose is set. I've yet to seejhb2004-11-111-2/+4
| | | | | | | a bridge without a _PRT were a _PRT was needed. Instead, the warning in dmesg is a false warning and only serves to cause unnecessary concern. MFC after: 1 week
* unsigned long -> u_longnjl2004-11-091-1/+1
|
* Tell the BIOS we want to handle brightness switching as well as outputnjl2004-11-091-24/+33
| | | | | | | switching. Don't initialize variables in their declaration. Reduce stack usage for device names. Minor style cleanups. MFC after: 1 week
* Make the bootverbose output from qualitydetermination of the ACPI timerphk2004-11-031-5/+6
| | | | take up only one line.
* Add TUNABLE_LONG and TUNABLE_ULONG, and use the latter for thedes2004-10-311-2/+2
| | | | | | | hw.pci.host_mem_start tunable. Add comments to TUNABLE_INT and TUNABLE_QUAD recommending against their use. MFC after: 3 weeks
* Whitespace cleanupdes2004-10-311-4/+4
|
* Print before the footer, not after.njl2004-10-131-1/+1
|
* If flags are present, print them like ISA does.njl2004-10-131-0/+2
| | | | MFC after: 1 day
* Attach the device description for ISA devices on the ACPI bus.njl2004-10-121-0/+3
| | | | MFC after: 1 day
* Update C3 support when BM control is not present.njl2004-10-111-16/+28
| | | | | | * Fix a bug where caches were flushed on non-C3 transitions. * Be sure a working flush cache instruction is present before using it. * Disable C3 completely if it isn't present.
* Make the lower range of the memory area 0x80000000 again. Alsoimp2004-10-111-1/+5
| | | | | | introduce hw.{pci,acpi}.host_mem_start tunable to change this. MFC: ASAP
* Notify the user when the battery is critically low. In the future, wenjl2004-10-111-0/+4
| | | | | | | may want to shut down here but the chance of BIOS vendors getting this wrong is high. They're only supposed to announce this when all batteries hit their critical level but past experience indicates we should be conservative about this for now.
* If bus mastering control is not available (PM2_BLK), don't just disablenjl2004-10-111-16/+27
| | | | | C3. Instead, flush caches before entering C3. This may be slower but provides good power savings.
* Move the code for halting the CPU (acpi_cpu_c1) into machdep files.njl2004-10-111-15/+0
| | | | | | This removes the last MD portion of acpi_cpu.c. MFC after: 2 weeks
* Update a quirk for the ASUS P5A to disable the timer. It appears to work finenjl2004-10-083-9/+9
| | | | | | | | | | | | | | with acpi but the timer runs twice as fast. Note that the main problem (system doesn't work properly with acpi disabled) should be fixed separately. Changes: * Add a quirk to disable the timer * Merge the P5A and P5A-B quirks since they appear to be based on the same ASL. PR: i386/72450 Tested by: Kevin Oberman <oberman es.net> MFC after: 3 days
* For older systems with ACPI which don't have a pci <-> pci bridge,imp2004-10-061-3/+3
| | | | | | | allocate unallocated memory resources from the top 32MB of the address space rather than the top 2GB. While the latter works on some chipsets, it fails badly on others. 32MB is more conservative and matches what cheap harware from this era is hardwired to pass.
* When the user overrides the DSDT, replace any SSDTs with a simple no-opnjl2004-10-051-10/+40
| | | | | | | | table. acpidump(8) concatenates the body of the DSDT and SSDTs so an edited ASL will contain all the necessary information. We can't use a completely empty table since ACPI-CA reports this as a problem. MFC after: 3 days
* Allow routing to the SCI even if it's not in the list of valid IRQs.njl2004-09-251-0/+10
| | | | MFC if: no problems
* Add a couple of macros to extract the PCI slot (device) and function fromjhb2004-09-224-7/+11
| | | | | an ACPI _ADR value and use that rather than inlining the same shifts and masks everywhere.
* Initialize the flags value properly. We used to do this in acpi_tz_all_off()njl2004-09-211-33/+2
| | | | | | | but that function has been removed. This avoids a potential unnecessary fan switch on boot. Also remove some commented out code. MFC after: 3 days
* Don't disable acpi in shutdown if we're panicing (panicstr != NULL). Thisnjl2004-09-211-1/+1
| | | | may help with double panics.
* Record a problem we can't workaround for now regarding duplicate interruptsnjl2004-09-201-0/+7
| | | | | because of links left enabled while in APIC mode. A large scale rework of irq links is underway by jhb@ which should fix this eventually.
* Don't print a warning message if the _CRS value is empty. This is alreadynjl2004-09-161-7/+5
| | | | | | covered by other printfs under ACPI_DEBUG and is not a failure case. MFC after: 3 days
* Clean up rev 1.49 by using the temperature conversion for _PSV also andnjl2004-09-081-4/+5
| | | | wrap a long line.
* Don't change the state of the system in acpi_tz_establish(). Before, wenjl2004-09-071-16/+22
| | | | | | | | | | | | | | would turn off all fans when initializing a zone. However, the HP Omnibook 500 generates a notify saying the zone needs to be re-evaluated whenever its fan is switched on or off. This produced an infinite loop. Also, note that running _SCP can generate the same notify. Since we need to make sure old fan references are turned off when getting new ones, run acpi_tz_monitor() first. This will turn off any unneeded fans. Then, check for new settings. After that, run acpi_tz_monitor() again to turn on/off any fans referenced by the new settings. Tested by: brooks
* Instead of trusting _STA from power resources, cache the first valuenjl2004-09-071-5/+11
| | | | | | | returned and then infer the state from calls to _ON/_OFF. This works around a problem in systems that don't correctly report the state (i.e. the HP Omnibook 500 reports "on" for its fan always after it has been turned on once).
* Don't enter the debugger when executing an AML breakpoint instructionnjl2004-09-021-5/+5
| | | | | | unless ACPI_DEBUG is defined. Users don't typically care about errant breakpoint instructions. The HP Pavilion 7915 has this in its PCI0 _INI method for rev 0x6040000 of the RSDT.
* Disable links after getting the possible resources. Even though _DISnjl2004-09-011-12/+12
| | | | | | should only affect current resources, it seems best to wait until all configuration is done before disabling it. If this fixes any problems, it is a MT5 candidate.
* Add a suffix descriptor for the acpi thermal values as a hint for the userlandpeter2004-08-301-10/+10
| | | | sysctl tool to print a more readable value for temperatures.
* Always set the status and move a printf under bootverbose.njl2004-08-271-5/+8
| | | | Tested by: gj
* If getting the current setting after modifying the link failed, we assumenjl2004-08-261-0/+1
| | | | it succeeded. However, we also need to set the status to AE_OK.
* Remove code to initialize the lid state at boot. It interfered with lidnjl2004-08-251-29/+16
| | | | | | | | operation for some users with pure GPE lid switches (vs. embedded controller.) Tested by: Anish Mistry <mistry.7_at_osu.edu> MFC after: 3 days
* Rework sysresource management. Instead of having each sysresource objectnjl2004-08-233-124/+141
| | | | | | | | | | | | | | | | | | | | hold its own values, pass them up to the parent (acpi0) and merge/uniq them on the way. After the namespace evaluation, acpi will reserve these resources and manage them via rman before bus_generic_probe() and bus_generic_attach(). This is necessary because some systems specify conflicting resources in separate sysresource objects. It's also cleaner in that the interface between sysresource and acpi is now merely the parent's resource list. This code handles the following cases: 1. Unique resource: add it to the parent via bus_set_resource(). 2. New wholly contained in old: discard new. 3. New tail overlaps old head: grow old head downward. AND/OR 4. New head overlaps old tail: grow old tail upward. Tested by: Pawel Worach <sajd_at_telia.com> Tested by: Radek Kozlowski <radek_at_raadradd.com> MFC after: 5 days
* Fix PCI link irq programming on resume. A logic bug prevented a devicenjl2004-08-211-1/+1
| | | | | | | match, inverting which links actually got resumed. Submitted by: Hiroyuki Aizu <eyes_at_navi.org> MFC after: 3 days
* Use the new start for the offset, not the old end.njl2004-08-201-1/+1
|
* Correctly handle BIOS resources that are duplicated (!). There are manynjl2004-08-201-4/+49
| | | | | | | | | | | | | | | | | | | | | systems that have overlapping regions specified in their sysresource objects. This patch fixes ATA DMA and acpi_timer allocation for such sysctems. It should eventually be moved to resource_list_add() if it is a valid generalized approach. The minimal approach for 5.3 is: "Loop through all current resources to see if the new one overlaps any existing ones. If so, the old one always takes precedence and the new one is adjusted (or rejected). We check for three cases: 1. Tail of new resource overlaps head of old resource: truncate the new resource so it is contiguous with the start of the old. 2. New resource wholly contained within the old resource: error. 3. Head of new resource overlaps tail of old resource: truncate the new resource so it is contiguous, following the old." Tested by: Radek Kozlowski <radek_at_raadradd.com> Discussed with: imp MFC after: 4 days
* If _CRS fails, assume that it succeeded. The ASUS K8V (and others) definesnjl2004-08-181-2/+1
| | | | | single-entry irq links even though it uses an APIC. It appears that it ignores _SRS when in APIC mode but returns a valid irq at other times.
OpenPOWER on IntegriCloud