summaryrefslogtreecommitdiffstats
path: root/sys/i386/acpica
Commit message (Collapse)AuthorAgeFilesLines
* netchild's mega-patch to isolate compiler dependencies into a centraljoerg2005-03-021-2/+6
| | | | | | | | | | | | | | | | place. This moves the dependency on GCC's and other compiler's features into the central sys/cdefs.h file, while the individual source files can then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42. By now, GCC and ICC (the Intel compiler) have been actively tested on IA32 platforms by netchild. Extension to other compilers is supposed to be possible, of course. Submitted by: netchild Reviewed by: various developers on arch@, some time ago
* - Add a new quirk to indicate that pin 0 of the first I/O APIC is reallyjhb2005-02-221-2/+8
| | | | | | | | | IRQ 0 and not an ExtINT pin. The MADT enumerators ignore the PC-AT flag and ignore overrides that map IRQ 0 to pin 2 when this quirk is present. - Add a block comment above the quirks to document each quirk so that we can use more verbose descriptions quirks. MFC after: 2 weeks
* Only export defined symbols. Note that I couldn't find any differencenjl2004-12-121-1/+1
| | | | | | | | between object code generated without the flag but it makes sense and might make a difference in the future. PR: kern/53008 Submitted by: Jens Rehsack rehsack at liwing de
* After discussions with Nate, repo copy the acpi assist drivers fromimp2004-11-153-1710/+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.
* o Change the strcmp() to a strncmp() to allow us to attach to 'E'philip2004-11-121-69/+67
| | | | | | | | | | models of laptops, which are essentially the same as the normal ones, as far as acpi_asus is concerned[1] o Use the above as an excuse to reshuffle the mess I made of the probe function when I originally wrote it. Reported by: Soeren Larsen <soeren@whiteswan.dk>
* Minor whitespace nitpicking to reduce my diffs of Real Changes[tm]philip2004-11-121-9/+6
|
* Add support for gadgets on Asus L4R and M6R notebooks.philip2004-11-081-0/+22
|
* Add power profile support so that the LCD changes brightness levels basednjl2004-11-071-20/+86
| | | | | | | on the AC line state. Submitted by: OGAWA Takaya <t-ogawa@triaez.kaisei.org> MFC after: 1 week
* Fix support for the Asus-compatible gadgets in Samsung P30/P35 laptops.philip2004-11-051-9/+47
| | | | | PR: 73380 Submitted by: Sebastian Schulze Struchtrup <seb@struchtrup.com>
* Add support for Asus M6N laptopsphilip2004-11-021-0/+11
| | | | Submitted by: Andreas Dieling <snow@quantentunnel.de>
* Remove a "needs Giant" flag from the /dev/apm compat device.njl2004-10-221-1/+0
| | | | MFC after: 2 weeks
* Match surrounding style, not style(msmith).njl2004-10-111-16/+16
|
* Move the code for halting the CPU (acpi_cpu_c1) into machdep files.njl2004-10-111-0/+6
| | | | | | This removes the last MD portion of acpi_cpu.c. MFC after: 2 weeks
* Be sure to always unlock the sx lock when exiting the sysctl function.njl2004-08-241-1/+1
| | | | MFC after: 3 days
* Disable interrupts after using pmap_enter() to add the identity mapping.njl2004-08-191-1/+1
| | | | | | | | | | | Since pmap_enter() calls pmap_invalidate_page(), which needs interrupts enabled in the SMP case, we defer the disable to right before saving the register context. This has been incorrect for about a year but caused no real problems because the identity page never actually replaces a previously mapped page and suspend/resume on SMP systems has been uncommon. Tested by: sos MFC after: 3 days
* MPSAFE lockingnjl2004-08-131-2/+20
| | | | | | * Serialize access to the sysctl routines and the notify handler * Assert that the sx lock is held in any functions they call. * Note that recursively calling to re-enable the hotkeys is sub-optimal.
* MPSAFE lockingnjl2004-08-131-2/+15
| | | | | * Serialize access to the sysctl routines and the notify handler * Assert that the sx lock is held in any functions they call.
* MPSAFE lockingnjl2004-08-131-0/+10
| | | | * Serialize access to the sysctl routines and the notify handler.
* Remove the attempt to cache the previous page mapped at our identitynjl2004-08-051-15/+2
| | | | | | | | | | | | | | | location (for the wake code). It should not be needed since we don't map other pages at the same location and if there was an old mapping, it would be restored by a fault. The old code had serious problems, namely that it was restoring the new page it had just removed (not opage) and it could only guess at the right protection (since there's no pmap_extract_protect function). Thanks to Alan Cox for explaining much of this to me. Also, remove a commented-out initializecpu() call since it is not needed. Restoring the cpu context is better than attempting to init from scratch. Reviewed by: alc (earlier version)
* Unbreak LINT by making sure that method is always defined.philip2004-08-041-0/+4
| | | | | Submitted by: roam Pointy hat to: philip
* Further cleanup: merge the three led toggling functionsphilip2004-08-031-41/+55
| | | | | | into a single general function to handle all leds. Approved by: njl
* Use the acpi_{Get,Set}Integer functions instead of rolling custom ones.njl2004-08-031-78/+32
| | | | | Clean up return path of each function to have a single exit point. This reduces diffs against the MPSAFE tree.
* Avoid casts as lvalues. While here, avoid storing 32bit quantities inkan2004-07-281-6/+6
| | | | 16bit locations.
* Use file2c instead of a combination of hexdump, sed and shell script totjr2004-07-271-11/+1
| | | | | generate the wakecode[] array from acpi_wakecode.bin. The old method was not safe in multibyte locales.
* Get the acpi softc via the devclass, not by caching the device. Replacenjl2004-07-241-12/+8
| | | | apm_softc with a single integer since the whole softc is not used.
* Whitespace cleanup and move static variables together.njl2004-07-241-23/+23
|
* Remove unneeded parens and fix whitespace.njl2004-07-241-36/+29
|
* Add the ACPI Panasonic extras driver.nyan2004-07-211-0/+410
| | | | Submitted by: OGAWA Takaya <t-ogawa@triaez.kaisei.org> and nyan
* Push down the acquisition and release of the page queues lock intoalc2004-07-151-2/+0
| | | | | | pmap_protect() and pmap_remove(). In general, they require the lock in order to modify a page's pv list or flags. In some cases, however, pmap_protect() can avoid acquiring the lock.
* Use the proper type and then cast on assignment. This fixes warning whennjl2004-07-061-2/+4
| | | | building with -O2.
* Add machdep quirks functions. On i386, this disables acpi on systems withnjl2004-06-301-0/+24
| | | | BIOS dates earlier than Jan 1, 1999. Add prototypes and quirks flags.
* Update for acpi_id_probe()njl2004-06-292-26/+19
|
* Use APM_UNKNOWN instead of 0xff. Use ~0U instead 0 for the number ofimp2004-06-281-9/+9
| | | | | batteries. This should be -1 to match other code, but since the api is unsigned ~0U is the same thing.
* Do the dreaded s/dev_t/struct cdev */phk2004-06-162-8/+8
| | | | Bump __FreeBSD_version accordingly.
* s/device_get_handle/acpi_get_handlenjl2004-06-151-1/+1
| | | | Submitted by: Hiroyuki Aizu
* Catch one more use of acpi_MatchHid and update for new API.njl2004-06-151-1/+1
|
* Use the new API for acpi_MatchHid(). The difference between ACPI_HANDLEnjl2004-06-142-3/+5
| | | | and device_t isn't caught by the compiler.
* - Use the correct devclass name ("acpi" vs "ACPI") to detect if acpi0 isjhb2004-06-101-6/+0
| | | | | | | present and thus that the PnPBIOS probe should be skipped instead of having ACPI zero out the PnPBIOStable pointer. - Make the PnPBIOStable pointer static to i386/i386/bios.c now that that is the only place it is used.
* Completely ignore disabled CPU entries as their APIC IDs tend to bejhb2004-06-101-13/+8
| | | | invalid.
* Use the local APIC ID rather than the ACPI Processor ID to index the arrayjhb2004-06-011-28/+30
| | | | of CPUs since local APIC IDs are bounded but ACPI IDs are not bounded.
* Add missing #include <sys/module.h>phk2004-05-302-0/+2
|
* Fixup a few bogons in a comment.jhb2004-05-111-3/+3
|
* Rework the APIC mixed mode support a bit:jhb2004-05-101-0/+2
| | | | | | | | | | | | | | | | | - Require the APIC enumerators to explicitly enable mixed mode by calling ioapic_enable_mixed_mode(). Calling this function tells the apic driver that the PC-AT 8259A PICs are present and routable through the first I/O APIC via an ExtINT pin. The mptable enumerator always calls this function for now. The MADT enumerator only enables mixed mode if the PC-AT compatability flag is set in the MADT header. - Allow mixed mode to be enabled or disabled via a 'hw.apic.mixed_mode' tunable. By default this tunable is set to 1 (true). The kernel option NO_MIXED_MODE changes the default to 0 to preserve existing behavior, but adding 'hw.apic.mixed_mode=0' to loader.conf achieves the same effect. - Only use mixed mode to route IRQ 0 if it is both enabled by the APIC enumerator and activated by the loader tunable. Note that both conditions must be true, so if the APIC enumerator does not enable mixed mode, then you can't set the tunable to try to override the enumerator.
* - Change madt_map_table() to verify the checksum of any table it is askedjhb2004-05-101-2/+30
| | | | | | | | | | | to map. If the checksum fails, the table is unmapped and a NULL pointer returned. - For ACPI version >= 2.0, check the extended checksum of the RSDP. AcpiOsGetRootPointer() already checks the version 1.0 checksum. - Remap the full MADT table at the end of madt_probe() so that we verify its checksum before saying it is really there. Requested by: njl
* Make unnecessary globals static and remove unused includes.njl2004-05-062-6/+1
| | | | Pointed out by: cscout
* Style cleanups, u_intXX -> uintXX.njl2004-05-052-45/+28
|
* Have ACPI use BUS_CONFIG_INTR() to force the SCI to level trigger andjhb2004-05-041-1/+4
| | | | | | | | active low polarity when using the PIC interrupt model. This should fix broken SCI interrupts on machines when not using the APIC where the BIOS doesn't program the ELCR to level trigger for the ACPI SCI. Requested by: njl
* - Change the APIC code to mostly use the recently added intr_triggerjhb2004-05-041-36/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | and intr_polarity enums for passing around interrupt trigger modes and polarity rather than using the magic numbers 0 for level/low and 1 for edge/high. - Convert the mptable parsing code to use the new ELCR wrapper code rather than reading the ELCR directly. Also, use the ELCR settings to control both the trigger and polarity of EISA IRQs instead of just the trigger mode. - Rework the MADT's handling of the ACPI SCI again: - If no override entry for the SCI exists at all, use level/low trigger instead of the default edge/high used for ISA IRQs. - For the ACPI SCI, use level/low values for conforming trigger and polarity rather than the edge/high values we use for all other ISA IRQs. - Rework the tunables available to override the MADT. The hw.acpi.force_sci_lo tunable is no longer supported. Instead, there are now two tunables that can independently override the trigger mode and/or polarity of the SCI. The hw.acpi.sci.trigger tunable can be set to either "edge" or "level", and the hw.acpi.sci.polarity tunable can be set to either "high" or "low". To simulate hw.acpi.force_sci_lo, set hw.acpi.sci.trigger to "level" and hw.acpi.sci.polarity to "low". If you are having problems with ACPI either causing an interrupt storm or not working at all (e.g., the power button doesn't turn invoke a shutdown -p now), you can try tweaking these two tunables to find the combination that works.
* Enable the led-toggling magic. Compiling files which are in the kernel intophilip2004-04-231-12/+0
| | | | | | | | | modules is a very nice way to produce hard-to-find panics. Who would look for a bug in a Makefile anyway? Has anyone seen the pointy hat? :-o Approved by: njl (mentor)
* Add the ACPI Asus extras driver. Provides support for cool ACPI-controledphilip2004-04-221-0/+629
| | | | | | | | | gadgets (hotkeys, lcd, ...) on Asus laptops. I aim to closely track the acpi4asus project which implements these features in the Linux kernel. If this breaks your laptop, please let me know how it does it :-) Approved by: njl (mentor)
OpenPOWER on IntegriCloud