summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
Commit message (Collapse)AuthorAgeFilesLines
* Don't force an immediate probe/attach for all devices when compiled withnjl2004-07-261-3/+0
| | | | | | | | ACPI_DEBUG. This upset the ordering that acpi_probe_order() was meant to provide, causing devices to attach before the sysresource object. This debugging feature has been unnecessary for a while so just remove it. Testing by: marcel
* Fix a bug where an item was being removed from a list without usingnjl2004-07-241-34/+29
| | | | | | FOREACH_SAFE. Remove bad cast of retp and instead use an additional arg to pass back the number of valid outputs. Use the package convenience functions for parsing packages.
* Reinsert the bus space handle and tag, they are needed for the timer test.njl2004-07-221-0/+2
|
* Instead of doing everything in identify, do a proper probe/attach. Also,njl2004-07-221-23/+45
| | | | | | | don't add another device if identify is called twice. Minor reworking by myself. Submitted by: marcel
* Remove unused (and bogus) locking, style cleanup, remove unnecessary casts.njl2004-07-221-145/+84
|
* Use ACPI_ALL_NOTIFY instead of registering handlers separately.njl2004-07-162-8/+4
|
* Fix acpi_video loading. When we started cleaning up the duplicate handlesnjl2004-07-161-5/+4
| | | | | | | | | | | | | | | left around after the PCI probe, acpi_video stopped attaching because while it was an acpi child device, it really is a PCI device. Fix this by making it a PCI child. * Remove non-handle ivars accesses since child busses only implement acpi_get_handle(). * Access the acpi softc directly through the devclass instead of through the implied parent. * Clean up a potential panic on unload by freeing the sysctl context before storing NULL in the OID. Found by: marks
* Update the interface for child drivers. Add acpi_scan_children, whichnjl2004-07-152-21/+146
| | | | | | | allows a bus to re-enumerate its child handles and optionally replace them with new children, arranged to the bus's liking. (The current device space is flat with all devices immediately under acpi0). Add comments for each interface.
* Some laptops report the "design-capacity" instead of the "real-capacity"marks2004-07-141-0/+9
| | | | | | | | when the battery is fully charged. That breaks some of the arithmetic in calculating the remaining capacity (ends up with more than 100%). This commit makes sure the max is 100. Approved by: njl
* Follow PnP location string change in acpi.c.takawata2004-07-141-1/+1
|
* Clean up our pnpinfo and location strings.njl2004-07-131-7/+5
|
* Call device_identify routines after doing the namespace walk. This isnjl2004-07-131-8/+6
| | | | | | | | | needed so that sysresource objects are created first to reserve all regions, then other devices can allocate from them. Otherwise, acpi_timer (the only ACPI device with an identify routine), would allocate its resources from the nexus, causing the later sysresource reserve to fail. Debugging by: Taku YAMAMOTO, Andrea Campi
* Add the ability to detach a battery. Now batteries that are detached arenjl2004-07-123-1/+33
| | | | also removed from the battery list.
* Update for the KDB framework:marcel2004-07-101-2/+3
| | | | o Call kdb_enter() instead of Debugger().
* Make the default memory range in the top 2GB of ram in the hopes thatimp2004-07-041-3/+5
| | | | | | | this more accurately reflects what the underlying hardware of most acpi machines that don't have children pci busses. We still need a better way to get this information from acpi/hardware.
* Remove duplicate FreeBSD id.njl2004-07-021-2/+0
|
* Get rid of the strict aliasing error by retrieving the ECDT via a tablenjl2004-07-021-2/+3
| | | | | | header pointer and then casting it to the ecdt pointer. This fixes the -O2 build. I'm unsure what changed recently to reveal this error since this code has been unchanged for months.
* After re-exporting rman, et al, __RMAN_RESOURCE_VISIBLE is no longerimp2004-07-011-1/+0
| | | | | necessary for this file. It just needed the size and guts of struct rman.
* Trim a few things from the dmesg output and stick them under bootverbose tojhb2004-07-011-9/+12
| | | | | | | cut down on the clutter including PCI interrupt routing, MTRR, pcibios, etc. Discussed with: USENIX Cabal
* Rework the code that waits for a response from the EC. Use an sx locknjl2004-07-011-48/+35
| | | | | | | | | | | instead of a mutex so we do not unblock it in msleep(). If we do this, another event could occur, resetting the status register since reads reset it. While I'm here, remove the backoff approach. Instead, sleep in 10 ms chunks for up to the configured timeout using either DELAY (if we aren't booted yet) or tsleep. Help from: dillon Tested by: Andrew Thompson andy AT fud.org.nz
* Add missing function debug trace macros to the new powerres functions.njl2004-06-301-0/+4
| | | | Reported by: phk
* Hide struct resource and struct rman. You must defineimp2004-06-301-0/+1
| | | | | | __RMAN_RESOURCE_VISIBLE to see inside these now. Reviewed by: dfr, njl (not njr)
* Move flags into a private ivar so it can't collide with device flags.njl2004-06-306-124/+137
| | | | | | | Unify the code to disable GPEs with the enable code. Shutdown is handled the same way. ACPI now does all wake/sleep prep for child devices so now they no longer need to call external functions in the suspend/resume path. Add the flags to non-ACPI busses (i.e., pci).
* Add a method for referencing/switching power resources based on _PRW.njl2004-06-301-11/+56
| | | | | | This brings us into line with the standard, which requires power resources be enabled when wake is enabled for a given device. Move the dereferencing code into its own function, +acpi_pwr_dereference_resource().
* Disable the EC GPE in the shutdown path. This is correct but is not knownnjl2004-06-301-0/+13
| | | | to fix any bug.
* Diff reduction for style.njl2004-06-301-6/+3
|
* Add new quirk code that disables problem BIOS versions. Remove old quirknjl2004-06-301-74/+19
| | | | | | | code that was never really used. Print a message when disabling ACPI via a quirk. Allow the user to override the blacklist decision by setting hint.acpi.0.disabled="0". Add missing AcpiTerminate() calls; they are needed to clean up if bailing out after AcpiInitializeSubsystem().
* Add the table quirk matching code. It matches rules defined in acpi_quirksnjl2004-06-301-0/+183
| | | | | and sets the flags. It also calls the machdep quirk code first. This allows table quirks (or whitelists) to override machdep quirks.
* Add machdep quirks functions. On i386, this disables acpi on systems withnjl2004-06-301-0/+6
| | | | BIOS dates earlier than Jan 1, 1999. Add prototypes and quirks flags.
* Staticize acpi_MatchHid() and include acpi_if.hnjl2004-06-291-1/+1
|
* Use the acpi_id_probe() method instead of acpi_MatchHid(), which is nownjl2004-06-298-66/+73
| | | | static.
* Add implementation of the ACPI methods which hands them off to ACPI-CA.njl2004-06-291-5/+58
| | | | | acpi_id_probe() returns NULL for no match or the ID string that matched if the driver should attach.
* Add acpi methods for HID/CID probing, evaluating objects, and walking thenjl2004-06-291-0/+77
| | | | | | namespace. This is to allow decoupling of attachments from ACPI where they need some functionality when ACPI is present but do not want to require ACPI to always be loaded.
* Use a default of the FADT for matching CreatorId quirks. Use XSDT to meannjl2004-06-291-6/+6
| | | | "match either RSDT or XSDT."
* Include isa/pnpvar.h and remove a duplicate copy of PNP_EISAID.njl2004-06-291-13/+2
|
* While booting, use DELAY() for waiting for the EC to respond instead ofnjl2004-06-281-6/+13
| | | | | | msleep(). Until we're finally up, msleep is a no-op. Explained by: peter
* rman_reserve_resource doesn't set the bushandle, so we have to do it here.imp2004-06-281-1/+1
| | | | | Badness noted by: njl Perforce reply not read by: imp
* MFp4: Set the bus handle to the bus handle of the resource, not theimp2004-06-271-3/+2
| | | | | | | | | starting value. This is more pedantically correct (since the handle isn't always identical to the start of the resource) and also doesn't access the innards of struct resource direct (which I forbid in my tree). We need to do this for all resource types, not just ioport. Reviewed by: njl
* Update some comments and remove non-standard notation.njl2004-06-241-4/+7
|
* Add a quirks array based on matching ACPI tables. The entries in this filenjl2004-06-241-0/+482
| | | | | | are currently all bad BIOS revisions that will never be able to support ACPI. They were derived by examining which BIOS's are blacklisted by other operating systems. Other types of quirks will be possible here as well.
* Attach the correct handle, not the one that was just deleted. Also,njl2004-06-241-3/+2
| | | | remove some duplicated code.
* Run the power off code directly instead of using indirection throughnjl2004-06-241-28/+11
| | | | | | | smp_rendezvous() to ensure we run on the BSP. This reverts rev 1.128. Add a comment indicating that MI code should be the one that runs all shutdown functions on the BSP with the APs halted. This should work around problems in power off while waiting for the MI code to be improved.
* Use uintmax_t for CPU statistics and add a cast to prevent truncation ofnjl2004-06-241-2/+2
| | | | | | the statistics in a multiply. Pointed out by: YONETANI Tomokazu
* - Defer BUS_CONFIG_INTR() on ACPI IRQ resources until the resources arejhb2004-06-234-34/+143
| | | | | | | | | | | | | | | | | actually used. For most ACPI devices this means deferring the call until bus_alloc_resource(). - Add a function acpi_config_intr() to call BUS_CONFIG_INTR() for an ACPI IRQ resource using the trigger mode and polarity information stored in the ACPI resource object. - Add a function acpi_lookup_irq_resource() to lookup the ACPI IRQ resource that corresponds to a specified rid and new-bus resource. - Have the ACPI PCI bridge driver call BUS_CONFIG_INTR() on interrupts that it routes through link devices. - Remove needactivate variable from acpi_alloc_resource() by changing the function not modify the flags variable but just mask off RF_ACTIVE when calling rman_reserve_resource(). Reviewed by: njl (1, an earlier version)
* Now that we associate a device_t with ACPI device handles, lookup thejhb2004-06-231-7/+41
| | | | | | | device associated with any PCI devices that are enumerated in the ACPI tree when adding children to an ACPI PCI bus and remove the duplicate ACPI-only device_t and replace the device_t associated with the handle with the ACPI and PCI aware device_t.
* Fix typos and add spaces before `(' in some commentsbrueffer2004-06-221-3/+3
| | | | | | Submitted by: markus Approved by: njl MFC after: 3 days
* Add more precision to the cx_usage sysctl output and special-case 0%.njl2004-06-191-5/+11
| | | | Submitted by: YONETANI Tomokazu <qhwt+freebsd-acpi AT les.ath.cx>
* Remove compat code and unused lock declarations.njl2004-06-181-22/+2
|
* Remove compat defines.njl2004-06-181-4/+0
|
* Do the dreaded s/dev_t/struct cdev */phk2004-06-162-4/+4
| | | | Bump __FreeBSD_version accordingly.
OpenPOWER on IntegriCloud